logo
Custom Server Environment

Getting Started

Server Setup

This guide covers deploying ProShot on your own server (VPS, dedicated server, or cloud VM). You will need root or sudo access to the server and a domain name pointed to it.

Connecting to Your Server

SSH into your server from your local terminal:

ssh root@your-server-ip

Installing Nginx

Nginx acts as a reverse proxy, forwarding incoming HTTP requests to your Next.js application running on port 3000.

Install Nginx

sudo apt update && sudo apt upgrade -y
sudo apt install nginx -y

Configure Firewall

Allow HTTP and HTTPS traffic through the firewall:

sudo ufw allow "Nginx HTTP"
sudo ufw allow "Nginx HTTPS"
sudo ufw allow OpenSSH
sudo ufw enable

Verify the firewall status:

sudo ufw status

Configure Reverse Proxy

Create a new Nginx configuration for your app:

sudo nano /etc/nginx/sites-enabled/nextjs.conf

Paste the following, replacing your-domain.com with your actual domain:

server {
    listen 80;
    server_name your-domain.com www.your-domain.com;

    location / {
        proxy_pass http://localhost:3000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
}

Save the file (Ctrl+O, then Ctrl+X), remove the default config, and restart Nginx:

sudo rm /etc/nginx/sites-enabled/default
sudo systemctl restart nginx

Installing Node.js

ProShot requires Node.js v22. Install it using the NodeSource repository:

curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt install nodejs -y

Verify the installation:

node --version

Installing pnpm

ProShot uses pnpm as its package manager:

npm install -g pnpm

Installing Docker (Optional)

Docker is only required if you plan to self host Supabase on the same server. If you are using Supabase Cloud, you can skip this step.

curl -fsSL https://get.docker.com | sudo sh
sudo systemctl start docker && sudo systemctl enable docker

Install Docker Compose:

sudo apt install docker-compose-plugin -y

Verify both are installed:

docker --version && docker compose version

Use Certbot to get a free SSL certificate from Let's Encrypt:

sudo apt install certbot python3-certbot-nginx -y
sudo certbot --nginx -d your-domain.com -d www.your-domain.com

Certbot will automatically configure Nginx to use HTTPS and set up auto renewal.

This completes the initial server setup. Next, configure your environment variables.