Requirements
- OS: Ubuntu 22.04+ / Debian 12+ (or any Linux with Node.js support)
- RAM: 1GB minimum, 2GB recommended
- Disk: 5GB minimum
- Node.js: 20.x or later
- Ports: 80, 443 (with reverse proxy) or custom port
Quick Setup
1
Install Node.js
2
Clone and Install
3
Configure Environment
4
Download Pocketbase
5
Start the Server
Production Setup with PM2
Use PM2 to keep tinykit running and restart on crashes:PM2 Commands
Reverse Proxy Setup
Caddy (Recommended)
Caddy automatically handles SSL certificates:nginx
Systemd Service (Alternative to PM2)
Create a systemd service for automatic startup:Firewall Setup
Updating
Backup
Database Backup
Automated Backups
Troubleshooting
Pocketbase won't start
Pocketbase won't start
Check permissions:Ensure the binary matches your architecture (amd64 vs arm64).
Permission denied errors
Permission denied errors
Ensure the user running tinykit owns the directory:
Port already in use
Port already in use
Check what’s using the port:Kill the process or change the PORT in your config.
SSL certificate errors
SSL certificate errors
With Caddy, certificates are automatic. With nginx + Certbot:
Out of memory
Out of memory
Check memory usage:Consider adding swap or upgrading your VPS.
Security Checklist
- Keep the system updated:
sudo apt update && sudo apt upgrade - Use strong passwords for Pocketbase admin
- Enable firewall (ufw)
- Use HTTPS (Caddy or Certbot)
- Don’t expose port 3000 directly—use a reverse proxy
- Regular backups
- Consider fail2ban for brute-force protection