Article · 2 min read · Getting started

kubespin: Add a server with a code

Works for a cloud server, a VM or a PC at home. The machine connects out to kubespin, so you don’t need port forwarding, dynamic DNS or a VPN, and you never type an SSH password into kubespin.

Works for a cloud server, a VM or a PC at home. The machine connects out to kubespin, so you don’t need port forwarding, dynamic DNS or a VPN, and you never type an SSH password into kubespin.

On the machine

  1. Download the kubespin command:

    bash
    curl -fsSL https://kubespin.io/api/v1/cli/install | sh
    
  2. Register:

    bash
    sudo ./kubespin register
    

    To give the server a name, add it after register, for example sudo ./kubespin register my-debian-pc. Without one, the machine’s hostname is used.

  3. It prints a code like KQ7M-4XPD. The code works once, for 15 minutes.

The command is built for amd64 and arm64.

In kubespin

  1. Go to Servers and choose Add Server.
  2. Choose Enter a code.
  3. Type the code. kubespin shows the machine’s name, system, architecture and address, so you can check it’s the right one before anything happens.
  4. Change Name in kubespin if you like, then choose Add this server.

The machine then sets itself up: Docker and the SSH server if they’re missing (from Debian’s or Ubuntu’s own packages), a kubespin user, and the agent. Onboarding starts as soon as the agent connects, and you can follow it on the server’s page.

If it goes wrong

  • “That code wasn’t found.” The code has expired or was already used. Run sudo ./kubespin register again for a new one.
  • The machine stops answering later: see kubespin: Add a home server for Reconnect this computer.