Complete guide to deploy PrivacyMetrics for free (without Netlify)
| Platform | Free Tier | Database | SSL | Uptime | Best For |
|---|---|---|---|---|---|
| Railway | $5/month credits | ✅ PostgreSQL | ✅ | 99.9% | Full-stack apps |
| Render | ✅ Free | ✅ PostgreSQL | ✅ | 99% | Small projects |
| PlanetScale | ✅ Free | MySQL | ✅ | 99.9% | Database only |
| Fly.io | ✅ Free | Optional | ✅ | 99.99% | Docker apps |
| Heroku | ❌ (discontinued) | ❌ | ✅ | 99.9% | Legacy |
| Vercel | ✅ Free | No DB | ✅ | 99.99% | Frontend only |
| AWS Free Tier | 12 months free | ✅ RDS | ✅ | 99.99% | Full control |
| DigitalOcean | $5/month | ✅ Managed DB | ✅ | 99.99% | Very affordable |
| Replit | ✅ Free | Optional | ✅ | 95% | Learning/testing |
Pros:
Cons:
Setup Steps:
Sign up at render.com
Name: privacymetrics
Environment: Node
Build Command: npm install && npm run build
Start Command: npm run start
.env.example:
DATABASE_URL=postgresql://...
JWT_SECRET=your-secret-here
IP_SALT=your-salt-here
NODE_ENV=production
DATABASE_URLyourapp.onrender.comPros:
Setup Steps:
Sign up at railway.app
DATABASE_URLCost: Free for first month, then $5 included per account
Pros:
Setup Steps:
# Windows (PowerShell)
iwr https://fly.io/install.ps1 -useb | iex
flyctl auth signup
cd your-project
flyctl launch
FROM node:22-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
EXPOSE 8080
CMD ["npm", "run", "start"]
flyctl secrets set DATABASE_URL=postgresql://...
flyctl secrets set JWT_SECRET=your-secret
flyctl secrets set IP_SALT=your-salt
flyctl deploy
Cost: Free tier includes 3 shared-cpu-1x 256MB instances
Pros:
Setup Steps:
ssh -i key.pem ubuntu@your-instance-ip
sudo apt update
sudo apt install nodejs npm postgresql -y
git clone your-repo
cd your-project
npm install
npm run build
npm run start
Pros:
Setup Steps:
Component: Web Service
Build: npm run build
Run: npm run start
HTTP Port: 8080
Monthly Cost: $5 app + $15 database = $20 (or $5 if using cheaper database)
If you prefer to host the app elsewhere, use a managed database:
# Create account at planetscale.com
# Create database
# Get connection string
# Use as DATABASE_URL
# Sign up at supabase.com
# Create project
# Get connection string
# Includes 500 MB storage, 2GB bandwidth
# Sign up at mongodb.com/cloud
# Create cluster
# Get connection string
# Includes 512MB storage
Go to render.com
Click “New +” → “Web Service”
Name: privacymetrics
Environment: Node
Build Command: npm install && npm run build
Start Command: npm start
Branch: main
privacymetrics-db.env.example:
NODE_ENV=production
JWT_SECRET=<generate-random-32-chars>
IP_SALT=<generate-random-32-chars>
DATABASE_URL=<from-PostgreSQL-service>
⏱️ Total Time: 10-15 minutes
Before deploying, ensure you have:
NODE_ENV=productionJWT_SECRET (32-byte random string)IP_SALT (32-byte random string)DATABASE_URL (PostgreSQL connection string)PORT=8080 (optional, Render auto-sets)Generate Secure Values:
# PowerShell
[System.Convert]::ToBase64String([System.Security.Cryptography.RNGCryptoServiceProvider]::new().GetBytes(32))
# Linux/Mac
openssl rand -base64 32
# Test API health
curl https://your-app.onrender.com/api/ping
# Use Render's Shell access
npx prisma migrate deploy
# Create test account
curl -X POST https://your-app.onrender.com/api/v1/auth/register \
-H "Content-Type: application/json" \
-d '{
"email": "test@example.com",
"password": "TestPassword123",
"name": "Test User"
}'
flyctl logspackage.json has correct start scriptDATABASE_URL is set correctlynpx prisma migrate deploy| Service | Recommendation | Monthly Cost | When to Use |
|---|---|---|---|
| Render | ✅ Best Free | $0 | Just starting out |
| Railway | ✅ Good Balance | $5 | Small production |
| Fly.io | ✅ Performance | $0 | High traffic free |
| AWS | For Scale | $0-$50+ | Enterprise |
| DigitalOcean | Sweet Spot | $20 | Professional apps |
Do you want free hosting?
├─ YES, small project → Render.com ✅
├─ YES, better performance → Fly.io ✅
├─ YES, include database → Railway.app ($5)
└─ NO, I'll pay → DigitalOcean ($5-20)
Do you want managed database?
├─ YES → Use platform's built-in
└─ NO → PlanetScale or Supabase
docs/DEPLOYMENT_GUIDE.md with your choiceHappy deploying! 🚀