Self Hostd pairing codes and tokens explained
The 6-digit code links a launcher to your server once; the token it leaves behind keeps them linked. Where each lives, how long they last, and how to re-pair.
The short version
The 6-digit pairing code links a launcher to your server once and then expires. The token it leaves behind is what keeps them linked afterwards, stored in selfhostd.properties on the machine running the launcher. To move machines, pair again with a fresh code from the panel.
Two credentials are involved in Self Hostd, and they do different jobs.
#The pairing code
The 6-digit code shown in your panel proves, once, that a launcher belongs to your server. It is valid for 15 minutes and works once; after a successful pairing it is dead. If a code lapses before you use it, generate a new one from the server's page in your panel; that invalidates the previous one.
Because codes are single-use, re-running your original start command does not re-pair; the launcher notices it already has a token and carries on. That is by design, and it means pairing again is always a deliberate act with a fresh code.
#The token
Pairing leaves behind a token: the long-lived credential the launcher presents on every connection. It is stored in selfhostd.properties next to the launcher (both the window and the command line use the same file), or supplied via SELFHOSTD_TOKEN or --token-file in scripted setups.
Treat it like a password for this one server: anyone holding it can attach their machine to your address. It never needs to be typed on a command line, and the launcher stores the file readable only by your user where the platform supports that.
Tokens last about six months, and the panel hands the launcher a fresh one automatically whenever it connects with a token in its final two months, so a machine that comes online at least once every few months never needs re-pairing. If a token does lapse (a machine left off for over six months, or a token from before this server was last re-paired), the launcher tells you, clears the stored token and asks for a fresh pairing code.
#Moving to another machine
Either copy the whole server folder (the token in selfhostd.properties moves with it), or generate a new pairing code and pair the new machine directly. Only one launcher can hold the tunnel at a time; the most recent connection wins.
#Deleting the server in your panel
The launcher is told at its next check-in, disconnects the address, clears the stored token and explains what happened. Your local server files and world are untouched; only the link to Hostd is gone.
#Frequently asked questions
How long does a Self Hostd pairing code last?
It is short-lived and single-use by design: it exists only long enough to establish trust once. After pairing, the stored token takes over and the code is no longer relevant.
How do I move Self Hostd to another machine?
Generate a fresh pairing code in the panel and pair the launcher on the new machine. Do not copy the token file across, because the point of re-pairing is that the old machine stops being trusted.
What happens if I delete the server in my panel?
The token stops being accepted and the launcher can no longer connect. The panel side is the source of truth, so deleting there revokes the pairing.
Written and maintained by the Hostd engineering team. Last updated 2026-08-02. Notice a mistake? Tell us.