Production Checklist
Before deploying to production:Choose deployment mode
Configure
authenticated mode with public exposure for internet-facing deployments.Deployment Modes
Paperclip supports two deployment modes:local_trusted
For: Local development, single-operator workflows- No login required
- Localhost-only binding
- Company deletion enabled
- Fastest startup
authenticated
For: Production, multi-user, internet-facing deployments Two exposure policies:Private Exposure
For: Private network access (VPN, Tailscale, LAN)- Login required
- Auto URL detection
- Lower friction setup
- Private-host trust policy
Public Exposure
For: Internet-facing deployments- Login required
- Explicit public URL required
- Stricter deployment checks
- Enhanced security validation
Configuration
Interactive Setup
Run the onboarding wizard:- Deployment mode (
local_trustedorauthenticated) - Exposure policy (if
authenticated):privateorpublic - Public base URL (if
authenticated + public)
Environment Variables
For automated deployments, use environment variables:Hosted Database Setup
Supabase
- Create a project at database.new
- Get connection string from Project Settings > Database > Connection string
- Use connection pooling (port 6543) for the application:
- Update
packages/db/src/client.tsto disable prepared statements:
- Push schema using direct connection (port 5432):
AWS RDS
- Create PostgreSQL 17 instance
- Configure security groups for your deployment
- Set connection string:
Other Providers
Any PostgreSQL 17+ provider works:- Google Cloud SQL
- Azure Database for PostgreSQL
- DigitalOcean Managed Databases
- Neon
- Railway
Storage Configuration
S3-Compatible Storage
For production, use S3 or compatible services:MinIO or Custom S3 Endpoint
Authentication Setup
Paperclip uses Better Auth for session management.Set Public Base URL
Bootstrap Admin User
On first deployment inauthenticated mode, the system creates a board claim URL. Check startup logs:
- Sign in as a regular user
- Visit the claim URL
- You’re promoted to instance admin
Allowed Hostnames
For multi-domain deployments:Logging and Monitoring
Application Logs
Logs are written to:- Console: INFO level and above (JSON format in production)
- File:
.paperclip/logs/server.log(DEBUG level)
server/src/middleware/logger.ts:1.
Health Checks
Monitor/api/health endpoint:
Heartbeat Monitoring
Heartbeat scheduler runs every 30 seconds by default:Docker Production Deployment
Build Production Image
Run with Production Config
Docker Compose Production
Validation
Run the doctor command to validate production setup:- Deployment mode configuration
- Database connectivity
- Secret provider setup
- Storage provider configuration
- Authentication readiness
--repair to auto-fix issues:
Platform-Specific Guides
Railway
Click Deploy: Configure DATABASE_URL from Railway Postgres plugin
Render
Web Service + Postgres: Set environment variables in dashboard
Fly.io
Use fly.toml: Attach Postgres, configure secrets
AWS ECS
Task definition: Use RDS for database, S3 for storage
Security Best Practices
Use strict secrets mode
Use strict secrets mode
Always enable in production:
Disable company deletion
Disable company deletion
Prevent accidental data loss:
Use connection pooling
Use connection pooling
For hosted databases, use pooled connections (e.g., Supabase port 6543)
Rotate secrets master key
Rotate secrets master key
Store master key in a secure vault, not in environment variables
Monitor health endpoint
Monitor health endpoint
Set up uptime monitoring on
/api/healthNext Steps
Security
Secure your deployment with best practices
Database
Advanced database configuration and migrations