Skip to main content

Step 2: Set up and register the customer-hosted router

In this step, you'll install the router software on your remote VM and register it with the network so it can host traffic on the network's behalf. These instructions assume you've already provisioned a remote host, such as an AWS VM (e.g., a t3.small or similarly sized instance), and will install using Docker.

Install Docker on the VM

  1. Install the appropriate Docker package for your VM's OS. For more info, see the Docker docs.

  2. After installation, start the Docker service and enable it.

Create the router and get the registration key

  1. Create a new customer-hosted router. Name it Get started host and leave everything else as-is.

  2. Click Save.

    After clicking save:

    • The page refreshes and you'll see the Edit router page.
    • The console automatically creates a new router identity.
  3. Click Copy registration key to copy the JSON Web Token (JWT) to your clipboard.

  4. Go to Identities and click the newly created identity. The name will match the name you used when creating the router.

  5. Assign #get-started-host as an attribute to the router identity. You must use this same attribute later for the bind service policy.

    Ensure you add the attribute to the router identity, not the router entity itself. :::

Deploy and register the router

  1. Create a local directory for persistent configuration storage on your VM:

    mkdir ~/nf_router_config
  2. Run the router container. Replace <REG_KEY_FROM_CONSOLE> with the JWT you copied in step 2:

    docker run -d \
    --name netfoundry-er \
    --restart=always \
    -v ~/nf_router_config:/etc/netfoundry \
    -e REG_KEY=<REG_KEY_FROM_CONSOLE> \
    netfoundry/autonomous-router:latest

    This command automatically downloads the router image and starts the enrollment process in the background.

  3. Verify the router is online in the console (green check under the Online column):

    Router online in console