Installation

Step-by-step guide to install Supascale on your server.

This guide walks you through installing Supascale on your Linux server.

Quick Install

Download and run the installer:

# Download the installer
curl -O https://releases.supascale.com/install.sh

# Make it executable
chmod +x install.sh

# Run with sudo
sudo ./install.sh

Interactive Installation

The installer will guide you through configuration:

1. Prerequisites Check

The installer verifies required software:

  • Node.js 18+
  • npm 9+
  • Docker 20.10+
  • Docker Compose v2+

Missing software can be installed automatically.

2. Installation Directory

Choose where to install Supascale:

Installation directory [/opt/supascale-web]:

Press Enter for default or specify a custom path.

3. Project and Backup Directories

Projects base directory [/home/user]: /var/supascale/projects
Backups base directory [/home/user/.supascale_backups]: /var/supascale/backups

4. Application Port

Application port [3000]:

Default port 3000 works for most setups. Change if needed.

5. Admin Account

Create your administrator account:

Admin username [admin]:
Admin password: ************
Confirm password: ************

Password requirements:

  • Minimum 12 characters
  • At least one uppercase letter
  • At least one lowercase letter
  • At least one number
  • At least one special character

6. License Information

License email: you@example.com
Update token: your-update-token

Get these from your license dashboard.

7. Web Server Setup

Choose your reverse proxy:

Web server setup:
1) Nginx (recommended)
2) Apache
3) Caddy
4) Skip (manual setup)

8. SSL Configuration

If you selected a web server:

Configure SSL with Let's Encrypt? [y/N]: y
Domain name: supascale.yourdomain.com
Email for SSL notifications: admin@yourdomain.com

9. Firewall Configuration

Configure UFW firewall? [y/N]: y

Manual Installation

For advanced users who prefer manual setup:

1. Download and Extract

# Download release
curl -O https://releases.supascale.com/supascale-latest.tar.gz

# Extract to installation directory
sudo mkdir -p /opt/supascale-web
sudo tar -xzf supascale-latest.tar.gz -C /opt/supascale-web

# Set permissions
sudo chown -R $USER:$USER /opt/supascale-web

2. Configure Environment

cd /opt/supascale-web

# Copy example environment file
cp .env.example .env.local

# Edit configuration
nano .env.local

Essential variables:

# Authentication
NEXTAUTH_URL=http://your-server:3000
NEXTAUTH_SECRET=$(openssl rand -base64 32)

# Database encryption
DB_ENCRYPTION_KEY=$(openssl rand -hex 32)

# Directories
PROJECTS_BASE_DIR=/var/supascale/projects
BACKUPS_BASE_DIR=/var/supascale/backups

# License
LICENSE_EMAIL=you@example.com
UPDATE_TOKEN=your-update-token

3. Create Admin User

node scripts/setup-admin.js admin "YourSecurePassword123!"

4. Configure PM2

# Create PM2 ecosystem file
cat > ecosystem.config.js << EOF
module.exports = {
  apps: [{
    name: 'supascale-web',
    script: '.build/standalone/server.js',
    cwd: '/opt/supascale-web',
    instances: 1,
    exec_mode: 'fork',
    max_memory_restart: '500M',
    env: {
      NODE_ENV: 'production',
      PORT: 3000
    }
  }]
};
EOF

# Start with PM2
pm2 start ecosystem.config.js
pm2 save
pm2 startup

5. Configure Nginx (Optional)

sudo nano /etc/nginx/sites-available/supascale
server {
    listen 80;
    server_name supascale.yourdomain.com;

    location / {
        proxy_pass http://127.0.0.1:3000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_cache_bypass $http_upgrade;
    }
}
sudo ln -s /etc/nginx/sites-available/supascale /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx

Verify Installation

After installation, verify everything is working:

# Check PM2 status
pm2 status

# Check application logs
pm2 logs supascale-web

# Test the endpoint
curl http://localhost:3000/api/version

Next Steps

  1. Complete first login
  2. Create your first project