Railway
Deploy Inboxorcist to Railway with one click.
Railway offers simple deployment with a generous free tier. Perfect for getting started quickly.
One-Click Deploy
Steps
- Click the deploy button above
- Sign in with your GitHub account
- Configure the required environment variables:
- JWT_SECRET — Must be at least 32 characters. Generate with:
openssl rand -base64 32 - ENCRYPTION_KEY — Must be a 64-character hex string. Generate with:
openssl rand -hex 32
- JWT_SECRET — Must be at least 32 characters. Generate with:
- Click Deploy
Railway automatically provisions a PostgreSQL database and connects it via DATABASE_URL.
After Deployment
- Open your app URL (shown in Railway dashboard)
- Go to
/setupto configure Google OAuth credentials - Connect your Gmail and start cleaning!
Manual Deployment
Step 1: Create a New Project
- Log in to Railway
- Click New Project
- Select Deploy from GitHub repo
- Connect your GitHub account and select the Inboxorcist repository
Step 2: Configure Build Settings
Railway auto-detects the Dockerfile. Verify settings:
- Builder: Dockerfile
- Dockerfile Path:
Dockerfile - Watch Paths: Leave default
Step 3: Set Environment Variables
Go to Variables and add:
# Required - Security (generate these)
JWT_SECRET=your-jwt-secret-min-32-chars
ENCRYPTION_KEY=your-64-character-hex-encryption-key
# App URL (your Railway domain)
APP_URL=https://your-app.up.railway.app
# Optional - Google OAuth (can also be configured via /setup UI)
# GOOGLE_CLIENT_ID=your-client-id.apps.googleusercontent.com
# GOOGLE_CLIENT_SECRET=GOCSPX-your-secretGenerate secrets:
# JWT_SECRET
openssl rand -base64 32
# ENCRYPTION_KEY
openssl rand -hex 32Google OAuth credentials are optional. You can configure them via the web UI at /setup after deployment.
Step 4: Deploy
Click Deploy or push to your repository. Railway will build and deploy automatically.
Step 5: Configure Google OAuth
After deployment, configure Google OAuth either:
- Via the web UI at
https://your-app.up.railway.app/setup, or - By adding
GOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRETto your Railway variables
If using the Google Cloud Console, add your Railway URL to Authorized redirect URIs:
https://your-app.up.railway.app/auth/google/callbackDatabase Options
Option A: Railway Managed PostgreSQL (Recommended)
Railway provides managed PostgreSQL databases:
- In your Railway project, click New
- Select Database > Add PostgreSQL
- Railway automatically sets
DATABASE_URLin your service
Option B: External PostgreSQL
If you have an existing PostgreSQL database (e.g., Supabase, Neon, or your own):
- Go to Variables in your Railway service
- Add
DATABASE_URLwith your connection string:postgres://user:password@host:5432/dbname
Option C: SQLite (Default)
If no DATABASE_URL is set, Inboxorcist uses SQLite automatically. Data is stored in the container's /usr/src/app/data directory.
SQLite data may not persist across Railway deployments. For production, use Railway's managed PostgreSQL.
Custom Domain
- Go to Settings > Domains
- Click Generate Domain or Add Custom Domain
- Update environment variables and Google OAuth redirect URI accordingly
Monitoring
View Logs
Click on your service and select Deployments to view build and runtime logs.
Check Metrics
Railway provides CPU, memory, and network metrics in the Metrics tab.
Updating
Railway automatically deploys when you push to the connected branch. To manually redeploy:
- Go to Deployments
- Click Redeploy
Pricing
Railway offers a free tier with:
- $5 of usage credits per month
- 500 hours of execution time
For larger mailboxes or persistent databases, consider their paid plans.
Troubleshooting
Build Fails
Check build logs in the Deployments tab. Common issues:
- Missing Dockerfile at specified path
- Network issues pulling base images
App Crashes on Start
Check runtime logs for environment variable validation errors:
- Ensure all required variables are set
- Verify
JWT_SECRETis at least 32 characters - Verify
ENCRYPTION_KEYis exactly 64 hex characters
OAuth Errors
Ensure your Google Cloud Console redirect URI matches ${APP_URL}/auth/google/callback:
- Must use
https://(Railway provides HTTPS automatically) - Must match exactly:
https://your-app.up.railway.app/auth/google/callback
