Use the manual install when you need full control over the build, want to run on an unusual platform, or cannot use the interactive installer. For most users, the automatic install is easier and faster.
Prerequisites
- A Linux host (x86_64 or aarch64)
- Rust toolchain (1.85+) via rustup
- PostgreSQL 16+ installed and reachable
- Node.js 20+ and pnpm 11+ (for the front-end)
- Build essentials:
gcc, make, pkg-config
- Nix (optional but recommended) - the project flake provides all dependencies automatically. See dev environment.
Clone the repository
To build a specific release instead of main:
Build the daemon
From the back-end/ directory:
Using the Nix devshell (recommended)
If you have Nix with flakes enabled:
This provides the Rust toolchain, PostgreSQL tools, MinGW cross-compilation, and all native dependencies. Then build:
Without Nix
Make sure you have Rust, pkg-config, and the development headers for your system’s libvirt (if using the libvirt provider). Then:
SQLX_OFFLINE=true tells sqlx to verify queries against the checked-in cache instead of a live database. This is required unless you have a migrated database running.
Selecting features
The daemon binary supports Cargo features for choosing which providers and provisioners to compile in. The default build includes all of them. To select specific ones:
Available features:
| Feature | Description |
|---|
provider-libvirt | KVM/QEMU via libvirt |
provisioner-ansible | Machine provisioning with Ansible |
Install the binaries
Copy the built binaries to a directory on your PATH:
Build and install the front-end
Copy the built assets:
Set up PostgreSQL
Create the database and role. The exact commands depend on your PostgreSQL setup. For a typical local install:
Run the migrations:
Generate configuration
Use the CLI to write a default configuration file:
This writes ~/.config/malbox/malbox.toml and ~/.config/malbox/cli.toml.
Edit malbox.toml to match your environment. At minimum, check the [database] section:
See the configuration reference for all available settings.
Start the daemon
The daemon starts the HTTP API on http://127.0.0.1:8080 by default.
Optional: systemd service
Create a systemd user service to start the daemon automatically:
Enable and start it:
If you want the service to keep running after you log out, enable lingering: loginctl enable-linger
Upgrading manually
Pull the latest changes (or check out a new tag), rebuild, and replace the binaries:
Run any new migrations:
Restart the daemon: