Deployment
Docker Compose on a VPS (DigitalOcean, Hetzner, OVH). From zero to production in four steps.
Tip
A $5/month VPS with 1 GB RAM is enough to run Stacktura in production. The Docker Compose setup includes Nginx, PHP-FPM, PostgreSQL, Redis, and the Next.js frontend.
Server setup
SSH into your server and install Docker:
ssh root@your-server
apt update && apt install -y docker.io docker-compose-plugin Upload & configure
Transfer your project and set up environment variables:
scp -r ./my-saas root@your-server:/opt/my-saas
ssh root@your-server
cd /opt/my-saas
cp .env.example .env
# Edit .env and backend/.env with production values Start the stack
docker compose up -d --build HTTPS with Caddy
Caddy handles automatic HTTPS certificates. Add this to your Caddyfile:
yourdomain.com {
reverse_proxy localhost:3000
}
api.yourdomain.com {
reverse_proxy localhost:8000
} Production Checklist
Before going live
Double-check every item. A misconfigured APP_DEBUG=true in production exposes stack traces and environment variables.
| Item | Action |
|---|---|
| APP_DEBUG | false |
| APP_ENV | production |
| DB_PASSWORD | Strong password |
| STRIPE_* | Live keys (not test) |
| HTTPS | Required for Stripe + auth cookies |
| Backups | PostgreSQL backups (pg_dump cron) |