1
Provision a VPS
Any provider works: DigitalOcean, Hetzner, Linode, Vultr. Minimum recommended: 2 vCPU, 2 GB RAM, 20 GB SSD. Ubuntu 22.04 LTS.After provisioning, SSH in as root:Create a non-root user:Switch to the deploy user for the rest of this guide:
2
Install Docker
3
Clone your repository
4
Configure environment variables
5
Generate production JWT keys
.env as JWT_PRIVATE_KEY and JWT_PUBLIC_KEY, then delete the key files:6
Start services with production Docker Compose
api, frontend, postgres, and redis all in running state.7
Run migrations and seed
8
Install and configure Nginx
yourdomain.com and api.yourdomain.com with your actual domains):9
Set up SSL with Let's Encrypt
10
Configure Stripe production webhook
Now that your API has a public HTTPS URL:
- Stripe Dashboard → Developers → Webhooks → Add endpoint
- URL:
https://api.yourdomain.com/api/v1/webhooks/stripe - Events: checkout.session.completed, customer.subscription.updated, customer.subscription.deleted, invoice.payment_failed, invoice.payment_succeeded
- Copy signing secret → update
STRIPE_WEBHOOK_SECRETin.env - Restart the API:
docker compose -f docker-compose.prod.yml restart api
11
Verify
https://yourdomain.com in a browser and log in with admin credentials.