git clone https://github.com/magooney-loon/pb-deployer
cd pb-deployer
go run cmd/scripts/main.go --install- Server Registration: Add remote host connection details
- Server Setup: Automated user creation and directory structure
- Security Lockdown: Firewall, fail2ban, disable root SSH (Optional)
- App Deployment: Upload prod dist, systemd service creation
- Version Management: Rollback support with file storage
/opt/pocketbase/
├── apps/ # Application deployments (per app directory)
├── backups/ # Deployment backups (timestamped)
├── logs/ # Application logs
└── staging/ # Temporary staging during deployments
- Downloading and staging deployment package
- Checking service status
- Stopping existing service
- Creating backup of current deployment
- Preparing deployment directory
- Installing new version
- Creating/updating systemd service
- Creating superuser (if initial deployment)
- Starting service
- Verifying & finalizing deployment
See **/*/README.md for detailed docs.
Make sure you loaded your SSH keys, check with ssh-add -l
PRs are encouraged, but consider opening a discussion first for minor/major changelogs.