Skip to content

Add your first host

Prepare a machine, run the install command, pass review and list your GPUs in the market.

On this page

In this guide you add a Linux machine with NVIDIA GPUs to Legion and list it in the market. You need to be an owner of your organization.

Step 1: Prepare the machine

Check the machine against Host requirements. In short: Ubuntu with systemd, the NVIDIA driver, Docker Engine, the NVIDIA Container Toolkit, one GPU model, Docker user-namespace isolation (the installer and the agent turn it on for you), and a disk Legion can set up. You run the install command with sudo.

Step 2: Create an install command

In the app, open Provide, then Hosts, then Add a host, then press Create install command. Then press Copy command, and Show token to see the join token.

The command is shown once. The token works for one machine, once, for 24 hours. If you lose either, create a new command.

Step 3: Run it on the machine

Paste the command into a terminal on the machine. It looks like this:

Shell
curl -fsSLo install.sh https://get.legion.ambient.xyz/legion-agent/v0.14.1/install.sh && echo "1f601d9d60646908fa2f0285ea2bdd956ce99daeef73ec7bbde012968e56623e  install.sh" | sha256sum -c - && sudo bash install.sh

It downloads the install script, checks its SHA-256, and runs it as root. When it asks for the token, paste it. The prompt doesn't show what you type.

The installer sets up the disk rentals use on its own. If the machine has exactly one disk it isn't already using, and that disk is at least 100 GiB, it asks whether to format it for rentals (press Enter, or wait 60 seconds, for yes). Say no, or let it time out, and it makes an image file in /var/lib instead; a disk under 100 GiB is never offered, and without a terminal — running under --token-stdin in a script, for example — it skips the question and always makes an image file.

To choose instead, add one of these flags to the end of the command:

Step 3: Run it on the machine
FlagWhat it does
--disk-device /dev/…Formats this empty disk with XFS for rentals.
--disk-image-size <GiB>Makes an image file of this size for rentals.
--no-disk-setupSkips disk setup. The host keeps a disk hold until it's set up some other way.

Step 4: Follow the checklist

Back in the app, the checklist updates on its own:

  1. Command created.

  2. Machine connected: usually within a minute of running the command.

  3. Review: a person at Ambient reviews every new host, then approves it or quarantines it with a reason. You get an email either way.

  4. Online: the agent has reported in within the last 90 seconds.

  5. Listed: you've set a price and turned on Show in the market.

Step 5: Set a price

You can do this during review. Enter a Price per GPU-hour, check the country, turn on Show in the market, and press Save. The form shows what renters pay and your share of it. An interruptible price, if you set one, is the floor of your host's spot auction: see How the floor works.

Step 6: Finish disk setup

If the installer set up a disk, run this on the machine once the host shows Online:

Shell
sudo legion-agent setup-disk --finish

Skip this if you passed --no-disk-setup, or if the installer warned that it couldn't set up a disk and continued without one.

Step 7: Set up payouts

Open Earnings, then Payouts. Choose the country of your bank account and complete Stripe's verification. Stripe keeps your bank details.

Next steps