Prerequisites
Before deploying Budgetron, ensure you have:- PostgreSQL Database (version 14 or higher)
- Node.js 20+ (if running without Docker)
- Docker (recommended for containerized deployments)
- 2GB RAM minimum (4GB recommended)
- 1 CPU core minimum (2+ recommended)
- 10GB storage (for application and database)
Deployment Options
Option 1: Docker on VPS
The simplest self-hosting approach using a Linux VPS.1. Set Up PostgreSQL
Install PostgreSQL on your VPS:2. Install Docker
3. Create Environment File
Create a.env file with your configuration:
4. Run Budgetron
5. Set Up Reverse Proxy
Install and configure Nginx:Option 2: Docker Compose Stack
Deploy Budgetron with all dependencies using Docker Compose. Createdocker-compose.yml:
.env file:
Option 3: Standalone Node.js
Run Budgetron without Docker.1. Install Dependencies
2. Clone and Build
3. Configure Environment
4. Run Migrations
5. Start Server
Option 4: Platform as a Service (PaaS)
Deploy to PaaS platforms with minimal configuration.Railway
- Fork the Budgetron repository
- Create new project on Railway
- Add PostgreSQL database service
- Connect your GitHub repository
- Add environment variables in Railway dashboard
- Deploy automatically on push
Render
- Create new Web Service on Render
- Connect repository:
https://github.com/budgetron-org/budgetron - Configure:
- Build Command:
pnpm install && pnpm run build - Start Command:
pnpm start
- Build Command:
- Add PostgreSQL database
- Set environment variables
- Deploy
Fly.io
Createfly.toml:
Database Management
Backups
Automate PostgreSQL backups:Restore from Backup
Updates and Maintenance
Updating Docker Deployment
Updating Docker Compose
Updating Standalone
Monitoring
Container Logs
Resource Usage
Application Health
Check if the application is responding:Troubleshooting
Database Connection Issues
Verify PostgreSQL is running:Container Won’t Start
Check logs for errors:- Invalid
DB_URLformat - Database not accessible
- Missing required environment variables
Port Already in Use
Find and kill the process:Migration Failures
Run migrations manually:Security Considerations
- Use strong, unique passwords for database and auth secrets
- Keep PostgreSQL on localhost or private network
- Enable SSL/TLS for all external connections
- Regularly update Budgetron and dependencies
- Use firewall to restrict access (ufw, iptables)
- Enable automatic security updates on your VPS
Next Steps
- Docker Deployment - Docker-specific configuration
- Production Setup - Production best practices
- Environment Variables - Complete configuration reference