https://github.com/magooney-loon/pb-deployer
pocketbase deployer
https://github.com/magooney-loon/pb-deployer
automation pocketbase self-hosted sveltekit vps-deployment
Last synced: 4 months ago
JSON representation
pocketbase deployer
- Host: GitHub
- URL: https://github.com/magooney-loon/pb-deployer
- Owner: magooney-loon
- License: agpl-3.0
- Created: 2025-08-08T12:12:45.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-11-25T21:11:44.000Z (7 months ago)
- Last Synced: 2025-11-29T02:16:53.485Z (7 months ago)
- Topics: automation, pocketbase, self-hosted, sveltekit, vps-deployment
- Language: Svelte
- Homepage:
- Size: 6.74 MB
- Stars: 32
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-pocketbase - pb-deployer - Automates the lifecycle of deploying PocketBase apps to production  (Self Hosting)
README
pb-deployer
Automates the lifecycle of deploying PocketBase apps to production
**WARNING**HOBBY PROJECT**
[](https://deepwiki.com/magooney-loon/pb-deployer)
## 🚀 Quick Start
```bash
git clone https://github.com/magooney-loon/pb-deployer
cd pb-deployer
go run cmd/scripts/main.go --install
```
## Core Workflow
1. **Server Registration**: Add remote host connection details
2. **Server Setup**: Automated user creation and directory structure
3. **Security Lockdown**: Firewall, fail2ban, disable root SSH (Optional)
4. **App Deployment**: Upload prod dist, systemd service creation
5. **Version Management**: Rollback support with file storage
## Directory Structure
```
/opt/pocketbase/
├── apps/ # Application deployments (per app directory)
├── backups/ # Deployment backups (timestamped)
├── logs/ # Application logs
└── staging/ # Temporary staging during deployments
```
## Deployment Steps
1. **Downloading and staging deployment package**
2. **Checking service status**
3. **Stopping existing service**
4. **Creating backup of current deployment**
5. **Preparing deployment directory**
6. **Installing new version**
7. **Creating/updating systemd service**
8. **Creating superuser (if initial deployment)**
9. **Starting service**
10. **Verifying & finalizing deployment**
See `**/*/README.md` for detailed docs.
Make sure you loaded your SSH keys, check with `ssh-add -l`
## Contribution
PRs are encouraged, but consider opening a discussion first for minor/major changelogs.