Skip to content

bhatti serve

bhatti serve server only

Section titled “bhatti serve ”

Start the bhatti daemon.

sudo bhatti serve

Starts the HTTP API listener, the thermal manager, the public proxy (if domain mode or public_proxy_listen is configured), the port scanner, and the metrics + event recorders. Recovers any previously running sandboxes from the SQLite database on startup and re-attaches their TAP devices.

Requires:

  • Linux with KVM (/dev/kvm)
  • Root, because Firecracker needs it
  • Config at /etc/bhatti/config.yaml (or $BHATTI_CONFIG)
  • The Firecracker binary, kernel image, and at least one rootfs image present at the paths in the config

Logs are emitted as structured JSON to stdout. Set BHATTI_LOG_LEVEL=debug for verbose logging. Most operators run this under systemd; the install script sets up the unit file at /etc/systemd/system/bhatti.service.

Terminal window
# Foreground (development)
sudo bhatti serve
Terminal window
# Under systemd (production)
sudo systemctl start bhatti
sudo journalctl -u bhatti -f
Terminal window
# Verbose logs
BHATTI_LOG_LEVEL=debug sudo bhatti serve

This command takes no flags. Configuration is via /etc/bhatti/config.yaml. See Configuration.

  • Startup: load config → open store → initialise engine → recover VMs → start servers (API + optional public proxy + optional internal loopback).
  • Shutdown (SIGTERM / SIGINT): drain HTTP, snapshot all running VMs to disk, close store, exit. Snapshots are restored on the next start.