What is PocketBase?
PocketBase is an open-source backend consisting of a single binary file. It includes an embedded SQLite database, real-time subscriptions, built-in auth, file storage, and an admin dashboard. Perfect for small to medium applications.
Installation
mkdir -p /opt/pocketbase && cd /opt/pocketbase
wget https://github.com/pocketbase/pocketbase/releases/latest/download/pocketbase_0.22.0_linux_amd64.zip
unzip pocketbase_*.zip
chmod +x pocketbase
./pocketbase serve --http="0.0.0.0:8090"
Features
- Single binary deployment (no dependencies)
- SQLite database with real-time subscriptions
- Built-in authentication (email, OAuth2)
- File storage with image thumbnails
- Admin dashboard UI
- REST API auto-generated from schema
- JavaScript/Go hooks for custom logic
- Backups with simple file copy
Systemd Service
cat > /etc/systemd/system/pocketbase.service << EOF
[Unit]
Description=PocketBase
After=network.target
[Service]
ExecStart=/opt/pocketbase/pocketbase serve --http="0.0.0.0:8090"
WorkingDirectory=/opt/pocketbase
Restart=always
[Install]
WantedBy=multi-user.target
EOF
systemctl enable --now pocketbase