WARNING: THIS PROJECT IS STILL IN DEVELOPMENT AND NOT PRODUCTION READY.
A single-container solution for running multiple isolated PocketBase instances with path-based routing.
domain.com/myapp/_/).This project follows a monorepo-style structure:
├── apps/
│ ├── dashboard/ # SvelteKit Dashboard
│ ├── docs/ # Documentation
│ └── web/ # Landing Page (Future)
├── core/
│ ├── api/ # Node.js API Server
│ ├── cli/ # Shell Scripts (add-instance, etc.)
│ └── entrypoint.sh
├── Dockerfile # Main container build
└── install.sh # Installer script
See the Development Guide for more details on project structure and testing.
git clone https://github.com/n3-rd/multi-pb.git
cd multi-pb
# Recommended: Use Bun for speed
bun install
./install.sh
Access dashboard at: http://localhost:25983/dashboard
By default, the API is open to anyone who can reach it. To secure it, set an admin token:
Option 1: Environment variable (recommended)
export MULTIPB_ADMIN_TOKEN="$(openssl rand -hex 24)"
# Or add to docker-compose.yml:
# environment:
# - MULTIPB_ADMIN_TOKEN=your-secret-token-here
Important: Restart the container/server for the environment variable to take effect.
Option 2: Instant CLI (No restart required) To instantly set or change the token without restarting:
docker exec multipb set-admin-token.sh "your-secret-token-here"
This updates config.json immediately. To remove the token, pass an empty string:
docker exec multipb set-admin-token.sh ""
Option 3: Config file
Edit /var/multipb/data/config.json:
{
"adminToken": "your-secret-token-here"
}
The API server watches this file and will reload the token instantly.
Note: The token in config.json takes precedence over the environment variable.
Using the token in the dashboard:
http://localhost:25983/dashboardThe token is stored in your browser and sent with every API request. See SECURITY.md for more details and curl examples.
Multi-PB uses a Supervisord process manager to run multiple PocketBase binaries alongside a Caddy reverse proxy and a Node.js API server for management.
[ Docker Container ]
├── Caddy (Reverse Proxy & Routing)
├── Node.js API (Management & Monitoring)
└── Supervisord
├── PocketBase Instance 1
├── PocketBase Instance 2
└── ...
MIT