Skip to main content
Before deploying ArcHive, you need to install and configure several prerequisite software components.

Server Requirements

VPS Specifications

  • CPU: 1 vCPU Core (minimum)
  • RAM: 4 GB (minimum)
  • Storage: 50 GB NVMe/SSD
  • Bandwidth: 4 TB
  • OS: Ubuntu 22.04 LTS (recommended)

Network Requirements

  • Public IP address
  • Domain name with DNS access
  • Ports 80 (HTTP) and 443 (HTTPS) accessible

Initial Server Setup

Connect to Your VPS

ssh root@your-vps-ip
# Or if you created a user during setup:
ssh your-user@your-vps-ip

Update System Packages

sudo apt update
sudo apt upgrade -y

Install Essential Tools

sudo apt install -y git curl wget build-essential

Install Node.js

ArcHive requires Node.js 20 LTS.
1

Add NodeSource Repository

curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
2

Install Node.js

sudo apt install -y nodejs
3

Verify Installation

node --version  # Should show v20.x.x
npm --version

Install Bun Runtime

Bun is the JavaScript runtime used for the ArcHive backend.
1

Install Bun

curl -fsSL https://bun.sh/install | bash
2

Add to PATH

echo 'export BUN_INSTALL="$HOME/.bun"' >> ~/.bashrc
echo 'export PATH="$BUN_INSTALL/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
3

Verify Installation

bun --version
If deploying with a site user (e.g., via CloudPanel), install Bun for that user as well:
su - archive-api
curl -fsSL https://bun.sh/install | bash
source ~/.bashrc

Install PM2 Process Manager

PM2 manages and monitors the Node.js application and background workers.
sudo npm install -g pm2

# Verify installation
pm2 --version

Install Nginx Web Server

Nginx serves as a reverse proxy for the backend API.
1

Install Nginx

sudo apt install -y nginx
2

Start and Enable Nginx

sudo systemctl start nginx
sudo systemctl enable nginx
3

Verify Status

sudo systemctl status nginx
If using CloudPanel, Nginx is pre-installed and managed automatically.

Domain Configuration

Configure DNS records to point your domain to the VPS.

DNS Records

In your domain registrar’s DNS settings, add these records:
TypeNameValueTTL
A@YOUR_VPS_IP3600
AwwwYOUR_VPS_IP3600
AapiYOUR_VPS_IP3600
Example:
  • Domain: archive.example.com
  • API: api.archive.example.com
  • WWW: www.archive.example.com

Verify DNS Propagation

# Check if DNS is propagated (run on your local machine)
dig archive.example.com
dig api.archive.example.com

# Or use online tool: https://dnschecker.org
DNS propagation can take 5 minutes to 48 hours. Wait for DNS to propagate before proceeding with SSL certificate setup.

Configure Firewall

Set up UFW (Uncomplicated Firewall) to secure your server.
# Allow SSH
sudo ufw allow OpenSSH

# Allow HTTP and HTTPS
sudo ufw allow 'Nginx Full'

# If using CloudPanel
sudo ufw allow 8443/tcp

# Enable firewall
sudo ufw enable

# Check status
sudo ufw status

Install Additional Dependencies

For Screenshot Worker (Puppeteer)

sudo apt install -y \
  libnss3 \
  libatk1.0-0 \
  libatk-bridge2.0-0 \
  libcups2 \
  libdrm2 \
  libxkbcommon0 \
  libxcomposite1 \
  libxdamage1 \
  libxrandr2 \
  libgbm1 \
  libasound2

CloudPanel Setup (Optional)

If using CloudPanel for simplified management:

CloudPanel Access

  • URL: https://your-vps-ip:8443
  • Default credentials: Set during VPS setup

Benefits of CloudPanel

  • Automatic Nginx configuration
  • One-click SSL certificates via Let’s Encrypt
  • Site isolation with dedicated users
  • Web-based file manager
  • Database management UI
CloudPanel is already installed on some VPS providers like Hostinger KVM1. Check with your provider.

Verification Checklist

Before proceeding to database setup, verify:
  • Server is accessible via SSH
  • System packages are updated
  • Node.js 20.x is installed
  • Bun runtime is installed
  • PM2 is installed globally
  • Nginx is running
  • DNS records are configured
  • Firewall is configured
  • Puppeteer dependencies are installed

Next Steps

Database Setup

Install and configure MongoDB and Redis

Build docs developers (and LLMs) love