Skip to main content
Bring your own compute (BYOC) runs rigs on hardware you control. You install the amika-hostd daemon on a machine, it registers that machine with Amika as a host, and each rig you create on that host runs there as a local VM. By default (transport = "tunnel"), the daemon dials out to Amika’s gateway, so the machine needs no open port and works behind a home router or firewall. If you’d rather expose a port yourself, the daemon can listen on one instead.

Requirements

  • Linux x86_64 or arm64 with glibc 2.34+ and KVM, or macOS on Apple silicon.
  • e2fsprogs, which smolvm needs for disks under 20 GiB. The installer adds it if it is missing.
  • Outbound HTTPS from the machine to Amika.
  • A user-scoped Amika API key, owned by you rather than your organization. Create one under Settings → API Keys at app.amika.dev, or with the CLI during setup. A listening host also accepts an organization key.
Node.js and smolvm, which the daemon needs, are installed for you when the machine doesn’t already have them.

Set up a host

1

Install the daemon

On the machine you want to run rigs:
See Installer options to pin a version, skip smolvm, or preview the install with --dry-run.If resize2fs is missing, the installer installs e2fsprogs. On macOS it runs brew install e2fsprogs. On Linux it uses apt-get, dnf, or yum as root or with sudo, and asks first. With --install-deps it installs without asking, but only as root or when sudo needs no password. When it can’t install, it prints a warning with the reason and the exact command to run, and the install still succeeds.The installer creates a config file at $XDG_CONFIG_HOME/amika-hostd/config.toml (~/.config/amika-hostd/config.toml by default).
2

Store your credentials

It asks for this host’s name and your Amika API key, and generates the secret key Amika uses to reach the daemon. Secrets go in the system keychain. On a server with no keychain, set secret_store = "file" in the config file before running setup.To set up a host without prompts, for a script or an AI agent, pipe the API key into setup --non-interactive. amika auth api-key create writes a new key straight to a file without printing it:
--non-interactive asks nothing. It keeps any secret key the host already has, and it stops without changing anything if the hostname is invalid or no key arrives on stdin.
amika auth api-key create needs amika CLI v0.24.0 or later. Run it while signed in as yourself (amika auth login): an organization key can’t create a user key. Otherwise, create the key in the web UI and save it to a file.
amika-hostd setup --skill prints step-by-step instructions an AI agent can follow to set up the host, including whether to use the gateway or listen on a port, and how to get the API key without seeing it.
3

Start the daemon

To listen on a port instead, set transport = "listen" in the config first.
This registers the host with Amika, connects the daemon to Amika’s gateway, and starts smolvm alongside it. Amika assigns the host’s address, so there is no URL to set up. Pass --fg to stay in the foreground.

Listen on a port instead

The daemon can instead listen on a port that you expose to the internet over HTTPS, with ngrok or Cloudflare Tunnel, for example. Set this in the config file, above its first [ line (the installer’s config has it commented out):
The daemon listens on 127.0.0.1:3020 by default. To use another address or port, set host and port in the config, or pass --host and --port to up. Expose the port, then start the daemon:
To set the URL later, or when it changes (a free ngrok URL changes on every restart), run amika-hostd register-url https://<public-url>.
Register a bare HTTPS hostname, such as https://hostd.example.com, with no path or port. Browsers can only open previews on such a host. Other URLs still work for creating and managing rigs.Browser previews and amika rig ssh reach the daemon directly at that URL, so don’t limit it to Amika’s IP addresses or put it behind an access gate.
A host set up before the gateway was the default has no transport line in its config. Its next amika-hostd up moves it to the gateway and drops its registered URL. Add transport = "listen" first to keep it listening.

Create a rig on your host

--size takes one of that host’s own sizes, not the cloud size names. Omit --host and the rig runs on Amika Cloud. On a host with more than one runtime, --runtime picks one (smol, lume or bare_metal). Without it, the rig uses its preset’s runtime. To boot from a snapshot, add --snapshot <name>. It must be a snapshot taken on that same host (see Snapshots on your host).The first amika-hostd up downloads the preset images in the background, and a rig created before that finishes can time out. The daemon logs the progress.

Configure sizes and images

The config file you set up above sets the rig sizes this host offers and the preset image each rig boots. Every amika-hostd up publishes the sizes to Amika, so the file is the source of truth for them. Preset images stay local: the host pins the version it boots. Edit the file and restart the daemon either way.
:latest follows each release. To hold a version, pin a 12-character commit SHA instead, such as amika-coder:855d403678d5.
amika-hostd 0.7.0 and later refuse to start with the old [preset_images] table. Run amika-hostd config upgrade to convert it. The installer runs it for you when it upgrades the daemon.
Keep disk_gib at 20 or more. Below that, smolvm doesn’t cache the rig’s image, so every create downloads it again.

Runtimes

A runtime is the way a host runs rigs. A host can offer more than one. Turn a runtime on or off with one command. It installs what the runtime needs, updates the config file, and reloads the running daemon:
It refuses to turn off a runtime that still has rigs. amika host list shows each host’s runtimes.

Snapshots on your host

You can snapshot a rig that runs on your host. The snapshot is a .smolmachine file that stays on that host’s disk, and it can only boot new rigs on the same host.
  • Snapshot and delete is the only mode. The daemon stops the rig to pack its disks, so Snapshot everything, which keeps the source rig running, isn’t offered.
  • Repository and organization default snapshots don’t apply. A host rig boots its preset image unless you pick one of that host’s snapshots when you create it.
  • Snapshots are large. Each one is several gigabytes. Point snapshot_dir in the config (or AMIKA_HOSTD_SNAPSHOT_DIR) at a disk with room for them. By default they go under ~/.local/state/amika-hostd/snapshots.
amika snapshot list --long shows a HOST column, so you can tell which snapshots belong to which host.

Previews and service access

Each service on a host rig gets a preview link. Opening it asks you to sign in to Amika, and only members of your organization get through. The link carries no credential, so sharing it gives no one access. Where it points depends on the host’s transport: On a listening host, all previews share one origin and one sign-in:
  • A page in one preview can act on any other preview you’ve opened there, so don’t run untrusted code on that host.
  • Open one preview at a time. Root-relative assets, such as a Vite or Next.js dev server’s, follow the preview you opened last.
For scripts and tools like curl, mint a short-lived service token with the HTTP API. It works only for rigs on your own hosts, never for amikad.
The response gives the service’s url, the header to send the token in (X-Amika-Authorization), the token, and expires_at. Tokens last an hour by default and at most a day.

Manage hosts

Hosts register themselves, so there is no command to add one. A host that still has rigs on it can’t be deleted: delete the rigs first. You can also delete a host from Hosts in the sidebar. To take a host offline, run amika-hostd down on the machine. That stops the daemon and the VMs it is running, keeping their disks. The next up brings the daemon back, but not the rigs: start those with amika rig start. Deleting the host record alone leaves the machine untouched, so it registers itself again on the next amika-hostd up.

Rigs on a host that’s gone

Deleting a rig needs its host to answer. When the host is offline, the delete fails and the web UI offers Remove from Amika only. That deletes Amika’s record of the rig but leaves anything still running on the machine, which you then clean up yourself. The HTTP API does the same with DELETE /api/v0beta1/rigs/{id}?forget=true.

Uninstall the daemon

Run the installer with --uninstall on the host:
It shows what it found and asks you to confirm, stops the daemon, and deletes the launcher and its files. It then asks separately whether to remove the config and state directory, the keychain secrets, and smolvm. smolvm is removed only if you type remove smolvm at its prompt.
Uninstalling changes nothing in Amika. The host stays registered, and its API key still works. Delete the host with amika host delete, and revoke its API key under Settings → API Keys.

Installer options

Pass flags after sh -s --, for example curl -fsSL .../install-amika-hostd.sh | sh -s -- --dry-run. AMIKA_INSTALL_DIR sets where the launcher goes (default /usr/local/bin), and AMIKA_HOSTD_HOME where the daemon’s files go.

Next steps

amika host reference

Every flag for the amika host commands.

Create a rig

The full rig creation flow, on cloud or your own host.

Bare-metal rigs

Make your host machine itself a rig, and reach it over SSH.