Requirements
System Requirements
- OS: Ubuntu 22.04+ / Debian 11+ / CentOS 8+ (or any Linux distribution)
- RAM: Minimum 1GB, 2GB+ recommended
- Storage: 5GB+ for application and data
- CPU: 1+ cores
- Network: Public IP address and open ports 80/443
Software Requirements
- Bun: Latest version (runtime)
- Node.js: 18+ (alternative to Bun)
- PostgreSQL: 14+ (recommended) or SQLite
- Nginx: Latest (reverse proxy)
- systemd: For process management
- Git: For deployment
Installation
Process Management with systemd
Create systemd service files to manage Pongo processes.Web Dashboard Service
Create/etc/systemd/system/pongo-web.service:
pongo-web.service
Scheduler Service
Create/etc/systemd/system/pongo-scheduler.service:
pongo-scheduler.service
Archiver Service (Optional)
Create/etc/systemd/system/pongo-archiver.service:
pongo-archiver.service
Enable and Start Services
Nginx Reverse Proxy
Configure Nginx as a reverse proxy with SSL termination.Install Nginx and Certbot
Configure Nginx
Create/etc/nginx/sites-available/pongo:
pongo
Enable Site and Obtain SSL Certificate
Auto-Renewal
Certbot automatically sets up certificate renewal. Test it:Firewall Configuration
Monitoring and Logs
View Logs
Service Status
Backup and Restore
PostgreSQL Backup
Automated Backups
Create/opt/pongo/backup.sh:
backup.sh
Updating Pongo
Troubleshooting
Services won’t start
- Check logs:
sudo journalctl -u pongo-web -n 50 - Verify environment variables:
sudo cat /opt/pongo/.env - Check file permissions:
sudo chown -R www-data:www-data /opt/pongo
Database connection errors
- Verify PostgreSQL is running:
sudo systemctl status postgresql - Test connection:
psql -h localhost -U pongo -d pongo - Check
DATABASE_URLformat in.env
Nginx errors
- Test configuration:
sudo nginx -t - Check logs:
sudo tail -f /var/log/nginx/error.log - Verify port 3000 is listening:
sudo netstat -tlnp | grep 3000
High memory usage
- Check process memory:
sudo systemctl status pongo-web - Adjust database connection pool size
- Consider upgrading server resources
Security Recommendations
- Keep system packages updated:
sudo apt update && sudo apt upgrade - Use strong passwords for
ACCESS_CODEand database - Restrict SSH access: Disable password auth, use SSH keys
- Enable automatic security updates
- Configure fail2ban to prevent brute force attacks
- Regular backup verification
- Monitor logs for suspicious activity
- Use a dedicated user (not root) for running services