Run kumobad as a service
On a server, give each setting an explicit path instead of relying on ~/.kumoba. Configuration lists every setting.
-
Unpack the release tarball for your platform into
/opt/kumoba. It containsbin/(kumobad,kumoba,kumoba-worker,kumoba-guest),lib/(libkrun and its firmware),licenses/and amanifest.jsonof checksums. -
Put an image in
/opt/kumoba/images/default.raw. -
Create a systemd unit:
[Service] User=kumoba Environment=KUMOBAD_STATE_DIR=/var/lib/kumoba/state Environment=KUMOBAD_IMAGES=default=/opt/kumoba/images/default.raw Environment=KUMOBAD_TOKEN_FILE=/etc/kumoba/token Environment=KUMOBAD_SOCKET=/run/kumoba/kumobad.sock Environment=KUMOBAD_PREVIEW_LISTEN=127.0.0.1:7789 Environment=KUMOBAD_PREVIEW_URL=https://previews.example.com Environment=KUMOBAD_MAX_RUNNING=4 ExecStart=/opt/kumoba/bin/kumobad ExecReload=/bin/kill -HUP $MAINPID KillMode=mixed TimeoutStopSec=90KillMode=mixedsends the stop signal to kumobad alone, so it can shut each guest down cleanly and record why each sandbox stopped; the default sends it to every VM process too, which ends the guests at once and records them ascrash. kumobad gives up on sandboxes that are still stopping after 60 seconds, soTimeoutStopSec=90leaves it time to finish before systemd kills what is left.systemctl reload kumobadthen re-reads the token and TLS files without stopping sandboxes; see Rotate certificates and tokens.On hosts of different sizes,
Environment=KUMOBAD_MAX_RUNNING=autosizes the limit from memory and CPUs instead, andMemoryMax=andCPUQuota=in the unit cap the memory and CPUs it counts. Configuration has the formula. -
Put a reverse proxy in front of the preview listener if browsers on other machines need
exposelinks or the desktop live view, and setKUMOBAD_PREVIEW_URLto its public address. Preview links carry their own signature, so they need no token. -
If your application runs on another machine, serve the API over TLS instead of the socket. Run sandboxes on another machine has the steps:
Environment=KUMOBAD_TLS_CERT=/etc/kumoba/server.pem Environment=KUMOBAD_TLS_KEY=/etc/kumoba/server.key Environment=KUMOBAD_LISTEN=0.0.0.0:7788
Intranets and corporate proxies
Environment=KUMOBAD_ALLOW_PRIVATE_HOSTS=gitlab.corp.example,10.20.0.0/16
Environment=KUMOBAD_UPSTREAM_PROXY=http://proxy.corp.example:3128
Environment=KUMOBAD_NO_PROXY=.corp.exampleSee Control network access for what each one does.
Last updated on
Give a sandbox a token without revealing it
Give code in a sandbox an API token it can use but never see: the guest gets a placeholder, and kumobad sends the real value only to the hosts you allow.
Run sandboxes on another machine
Run kumobad on a separate machine with KVM or Apple silicon and reach it over TLS: certificates, client certificates, token rotation and fleet pairing.