What a host needs
- x86_64 Linux with KVM. Ubuntu 24.04 is what ephemera is tested on. Check with
ls /dev/kvm. A bare-metal server, a spare PC, or a cloud VM with nested virtualization all work. - About 2 GB of disk for the guest image, plus what sandboxes write. Each sandbox’s disk is sparse: it takes only what’s written.
- Memory sets how many sandboxes fit. An idle sandbox costs about 60 MB, so a 16 GB machine holds well over a hundred idle ones. A busy one uses what its workload uses, up to its limit, 1 GB by default.
- A way to reach it. The host connects out to the central server by itself and needs no open port for that. But the machine you run
ephemeraon sends files and reads output straight from the host, on port 7701. Any of these works:- the same LAN as your laptop,
- a VPN you already use, with tcp:7701 allowed to the host,
- the machine’s public address, with a firewall that lets in only your own address,
- no network at all: SSH into the machine and run
ephemerathere. See Use it over SSH. - or make your laptop the host: see Run it on one machine.
Join it to your account
1
Make a join code
In the dashboard, under Hosts, choose Make a join code. It looks like
ej_ and 26 letters and digits, works once, and lasts 15 minutes.On a central server you run, make one with sudo ephemera-server join-code create instead.2
Install the host agent
On the machine, with the code at the end:It checks KVM, installs Firecracker and the host agent from the latest release, checking each download against its checksum, and builds the guest image (a few minutes; it downloads Ubuntu’s packages). Then it joins your account with the code and runs the agent as the A public address works too, such as a rented server’s, but then the host’s port, 7701, is open to the internet. The host serves TLS with its own key and checks each sandbox’s token, but it’s safer to let only your own address through the firewall. Or pass
ephemera-host systemd service. It sets up no network of its own.Your laptop reaches the host at the machine’s private address. With exactly one, the installer uses it; with several, such as a LAN address and a VPN address, it lists them and asks you to pick one with --address:--address 127.0.0.1 and use ephemera on the machine itself, over SSH.3
Check it
The installer prints the host’s key fingerprint when it joins, then waits until the host is connected:The dashboard shows the host online, with the same fingerprint. From your laptop:For a host that’s offline, LAST SEEN says when it last checked in, such as
4 days ago.Use it over SSH
If you work on the machine over SSH anyway, run ephemera there too, and skip the network: with--address 127.0.0.1, the host listens only on the machine itself, and nothing is open to anyone else.
ephemera login prints a code and a page to open. Open it on any device, such as your laptop, and approve. Then run ephemera from a checkout on the machine. Changes you make on your laptop need to reach that checkout first, with git or rsync.
ephemera dev forwards the sandbox’s ports to the machine’s own localhost. To open one in your laptop’s browser, forward it over SSH as well:
127.0.0.1 just keeps everything else out.
Already have ephemera-host
To join a machine that has the binary:/var/lib/ephemera/host.key if there isn’t one, joins, and saves what it joined as in /var/lib/ephemera/host.json. From then on the host signs in with that key; there’s no shared secret. --name sets its name in your account; the default is the machine’s hostname.
Keys and pinning
Every host has an Ed25519 key. It signs the host in, makes the host’s TLS certificate, and signs its records. The first time your CLI uses a host, it checks the key against the central server’s record and pins it. If the key changes later, the CLI refuses the host until you accept it:Settings
Pass host agent flags through the installer, for example:
These host agent flags are the ones you’re most likely to want:
The host reference lists every flag.
Upgrade a host
Run the installer again, without a code:Remove a host
In the dashboard, under Hosts, choose Remove. Its sandboxes are destroyed, and it can’t sign in again until it joins with a new code. With a token instead:DELETE /v1/hosts/<id>, see the API reference.
To take ephemera off the machine itself:
--purge, it keeps the host’s key and guest image in /var/lib/ephemera.