Other Deployment Options
Open Sky Commerce is a standard Next.js application and runs anywhere Node.js 18+ is supported. Below are guides for three additional deployment targets beyond DigitalOcean App Platform and Vercel.
Railway
Railway is a developer-friendly platform that provisions both the app server and a PostgreSQL database in one place, making it one of the fastest ways to get a full-stack deployment running.
Steps
- Create an account at railway.app.
- Click New Project → Deploy from GitHub and select your repository.
- Add a PostgreSQL plugin to the project. Railway automatically injects
DATABASE_URLinto your app. - In your service's Variables tab, add the remaining environment variables:
NEXTAUTH_URL=https://yourapp.up.railway.app NEXTAUTH_SECRET=your-secret NEXT_PUBLIC_SITE_URL=https://yourapp.up.railway.app - Railway will detect Next.js and set the build command to
npm run buildand start command tonpm startautomatically. - After the first deploy, run migrations from your local machine:
DATABASE_URL="postgresql://..." npx prisma migrate deploy
Custom Domain
In your service settings, go to Settings → Domains and add your custom domain. Railway provides DNS instructions and handles SSL automatically.
Notes
- Railway's free tier has usage limits — suitable for development and low-traffic sites. Production sites should use a paid plan.
- Railway uses ephemeral filesystems. All media uploads must be configured to go to DigitalOcean Spaces or another external service.
Self-Hosted VPS (Ubuntu / Debian)
If you want full control over your server environment, you can run Open Sky Commerce on any VPS (DigitalOcean Droplet, Linode, Hetzner, AWS EC2, etc.) using Node.js and a process manager.
Prerequisites
- A VPS running Ubuntu 22.04 or Debian 12
- A domain name pointed at your server's IP address
- PostgreSQL installed on the server or a managed database
Steps
1. Install Node.js
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs2. Install PM2 (process manager)
sudo npm install -g pm23. Copy your code to the server
# Option A: SCP from your machine
scp -r ./open-sky-commerce user@your-server-ip:/var/www/
# Option B: Clone your private repo on the server
git clone https://github.com/yourname/yourrepo.git /var/www/open-sky-commerce4. Install dependencies and build
cd /var/www/open-sky-commerce
cp .env.example .env
# Edit .env with your production values
nano .env
npm install
npx prisma migrate deploy
npm run build5. Start with PM2
pm2 start npm --name "open-sky-commerce" -- start
pm2 save
pm2 startup # follow the on-screen command to enable startup on reboot6. Configure Nginx as a reverse proxy
sudo apt install nginx -y# /etc/nginx/sites-available/open-sky-commerce
server {
listen 80;
server_name yourdomain.com www.yourdomain.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;
}
}sudo ln -s /etc/nginx/sites-available/open-sky-commerce /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx7. Enable HTTPS with Certbot
sudo apt install certbot python3-certbot-nginx -y
sudo certbot --nginx -d yourdomain.com -d www.yourdomain.comCertbot automatically renews certificates. HTTPS will be active immediately.
8. Update your environment for the live URL
NEXTAUTH_URL=https://yourdomain.com
NEXT_PUBLIC_SITE_URL=https://yourdomain.comRebuild the app after changing environment variables:
npm run build
pm2 restart open-sky-commerceUpdating the App
cd /var/www/open-sky-commerce
git pull origin main # or copy new files
npm install
npx prisma migrate deploy # if migrations changed
npm run build
pm2 restart open-sky-commerceDocker
Open Sky Commerce does not ship with a Dockerfile by default, but containerization is straightforward. A minimal example:
# Dockerfile
FROM node:20-alpine AS base
WORKDIR /app
COPY package*.json ./
RUN npm ci --omit=dev
COPY . .
RUN npx prisma generate
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]# Build and run
docker build -t open-sky-commerce .
docker run -p 3000:3000 --env-file .env open-sky-commerceFor production Docker deployments, use Docker Compose or Kubernetes to manage the app container alongside PostgreSQL and run prisma migrate deploy as an init container or entrypoint step before the app starts.
Which Option Should I Choose?
| Platform | Best for | Effort | Cost |
|---|---|---|---|
| DigitalOcean App Platform | Most stores — recommended default | Low | From $5/mo |
| Vercel | Fastest deploys, preview URLs, Next.js team behind it | Very low | Free tier, then $20/mo |
| Railway | Full-stack in one place, good developer UX | Very low | Free trial, then usage-based |
| Self-hosted VPS | Full control, lowest cost at scale | High | From $4/mo (server only) |
| Docker | Existing container infrastructure | Medium | Depends on host |