DocsBring your own host

Bring your own host

Enrol your own Linux box and hatch Eggs on your metal: a one-line install, the agent pulls from Ruust, and there are no inbound ports.

Bring your own host (BYOH) lets you run Eggs on hardware you own. You enrol a Linux box, Ruust connects it to the byo region ("Your infrastructure"), and Eggs you place there hatch on your metal. The compute is yours, so the price is a flat £2 per Egg, capped at £20 per host, and egress is free because it is your network. A Coop lives in one region, so a Coop is either all-managed (in a managed region) or all-BYOH (the byo region); to run both, use a separate Coop for each.

The agent is open source. It runs the ruust-agent binary on your box and PULLS desired state from the control plane. Nothing at Ruust ever opens a connection to your host, so you do not expose any inbound ports and you do not hand us SSH.

What your box needs

  • A Linux host you control (a bare-metal server, a VM or a spare machine).
  • Docker installed and running.
  • cgroups v2 enabled (the default on any recent kernel).
  • Outbound HTTPS to Ruust. No inbound ports, no port forwarding, no public IP required.

Deploy it

  1. In the dashboard, open Hosts and choose Enrol a host. The form asks only for a name.
  2. Copy the one-line install command it shows and run it on your box (it fetches and starts the ruust-agent).
  3. Wait for the host to appear as connected. Ruust auto-detects its capacity (CPU and RAM).
  4. Create a New Egg, connect your repo, and pick the byo region and your host.
  5. Pick a size within the detected capacity and lay the Egg. It builds, then hatches on your metal.
bash
curl -fsSL https://ruust.run/install/agent.sh | sh -s -- --enrol <token>
The one-line install the enrol form gives you. It installs and starts the ruust-agent.

The port

The port contract is the same on your metal as it is on managed regions. Ruust sets a PORT env var on the Egg and your app must listen on it and bind to 0.0.0.0, not localhost. Binding to the wrong address is the top reason an Egg builds but never hatches.

javascript
const port = process.env.PORT || 3000;
app.listen(port, '0.0.0.0');
Read PORT and bind to 0.0.0.0, wherever the Egg runs.

Environment variables

Pin the start command

On the default Nixpacks build, a Procfile at the repo root with a web: line is honoured by Nixpacks and baked into the image as the start command. If your repo has a Dockerfile, Ruust builds that instead and the Procfile is ignored: the image CMD/ENTRYPOINT is authoritative. Either way, Ruust runs the resulting image on your host.

text
web: node server.js
A Procfile web: line pins the start command.

Where to next

  • See the /byoh marketing page for the pricing and the case for running on your own metal.
  • Read the private networking guide to peer Eggs within a Coop by a private hostname, deny-by-default.