Install from DEB packages
For production deployments on DEB-based systems (Ubuntu, Debian), you can install PatchBase from our APT repository.
Set up the repository
# Add the PatchBase APT repository
curl -fsSL https://packages.patchbase.net/keys/patchbase.asc | sudo gpg --dearmor -o /usr/share/keyrings/patchbase.gpg
echo "deb [signed-by=/usr/share/keyrings/patchbase.gpg] https://packages.patchbase.net/deb stable main" | sudo tee /etc/apt/sources.list.d/patchbase.list
sudo apt update
Install the server
sudo apt install patchbase-server
This installs:
- The
patchbase-serverbinary at/usr/bin/patchbase-server - A systemd service at
/usr/lib/systemd/system/patchbase-server.service - A sample config at
/etc/patchbase-server/config.example.yaml
Configure the server
sudo cp /etc/patchbase-server/config.example.yaml /etc/patchbase-server/config.yaml
sudo nano /etc/patchbase-server/config.yaml
At minimum, set the following:
encryption_key: "<openssl rand -hex 32>"
api:
jwt_secret_key: "<openssl rand -hex 32>"
database:
url: "postgres://user:password@localhost:5432/patchbase?sslmode=disable"
Make sure PostgreSQL is running and the patchbase database exists before proceeding.
Run migrations
sudo patchbase-server migrate
Start the service
sudo systemctl enable --now patchbase-server
Check it's running:
sudo systemctl status patchbase-server
The server should now be listening on port 5199. If you have a firewall (UFW), open it:
sudo ufw allow 5199/tcp
Install the agent
On each host you want to monitor:
sudo apt install patchbase-agent
Then enroll the agent with a registration token you create from the dashboard:
sudo patchbase-agent enroll http://<server-ip>:5199 pb_reg_<your-token>
Enable the systemd timer so the agent syncs automatically:
sudo systemctl enable --now patchbase-agent.timer
See the agent onboarding guide for full instructions.