Tin Hat / Run a server / Friends anywhere

Friends anywhere

Your server gets a name like crew.tinhat.me, a real certificate, and three ports opened on your router. Here's how each part works, and what to do when a router or an internet provider is in the way.

Server codeTCP 443 · TCP 7881 · UDP 7882UPnP · NAT-PMP

How it works

  1. A name. The Tin Hat names service gives your server yourname.tinhat.me and points it at your home's public address. Your server keeps it current: if your internet provider changes your address, the name follows within ten minutes.
  2. A certificate. Let's Encrypt issues a real HTTPS certificate for that name, checked through the names service. Every device already trusts it, so nobody installs anything.
  3. Three ports. Your server asks your router to let friends' connections in on three ports. Most home routers do this automatically (UPnP or NAT-PMP).
  4. A check from outside. The names service connects back to your home on each port, the way a friend's phone would, and the setup and dashboard tell you the result in plain words.

Own a domain, or already run a reverse proxy? Setup's third choice, My own domain, puts your server at an address like chat.example.com instead, with its certificate through your DNS provider or your own proxy, and nothing depending on tinhat.me. Your own domain.

Server codes

While names are new, each server that takes a tinhat.me name needs a server code from the Tin Hat team. It looks like TN-ABCD-EFGH, works once, and expires after 30 days. Ask whoever gave you Tin Hat. A server for your home only needs no code.

Your name

  • 4–32 characters: lowercase letters, numbers and single dashes, starting and ending with a letter or number. crew, the-boys and valheim-vikings all work.
  • It can't change later. It's part of every account on the server. (The server can still move to a domain of your own; everyone then signs in again.)
  • Refused: names that read like a brand or a login page (paypal, steam-login, discord-gifts …), Tin Hat's own names, and slurs. This keeps tinhat.me names from being used for scams.
  • Never reused: once a name is taken, it's never handed to anyone else, even after its server is gone. So a name nobody uses any more can't be picked up by someone else.

The three ports

PortForWithout it
TCP 443The app, chat, the dashboard and joining callsFriends outside can't reach the server at all
UDP 7882Call sound and videoCalls from outside fall back to TCP 7881, or fail
TCP 7881Calls, when a friend's network blocks UDP (hotel and office Wi-Fi)Those friends can't join calls

Optional: TCP 80. Someone who types just yourname.tinhat.me into a browser that tries plain http:// first gets sent on to the secure address. The server asks your router for it along with the three; if it can't have it, everything still works.

The server asks your router for all three during setup and keeps asking every half hour (every two minutes while one is missing). If the router doesn't answer, set them by hand (below), each pointing to your server's address on your home network. The dashboard's Network tab shows that address.

A port another device already has (an old Tin Hat Server after a reinstall, or a game server): the dashboard says which device has it. An earlier Tin Hat Server's ports pass to the new one by themselves once the old one is off: right away on routers that allow it, otherwise within about ten minutes (the dashboard counts down). Anything else, remove that forward in the router; the server picks the port up within a couple of minutes.

Give the server a fixed address first. In your router's settings, find DHCP reservation (also called address reservation or static lease) and reserve the server's current address. Otherwise the router may give it a new address one day, and the forwarded ports would point to the wrong device.

Router how-tos

Menus vary between models and firmware versions; these are the usual places. For each of the three ports, make a rule: external port = the port, internal port = the same port, protocol = TCP or UDP as listed, device / internal IP = your server.

Xfinity (xFi gateway)

  1. Xfinity app → WiFi → View WiFi equipment → Advanced settings → Port forwarding → Add port forward.
  2. Pick your server from the device list, then add the three ports.

UPnP is usually on, so the server opens the ports itself. If Advanced Security is on, it can block forwarded ports; turn it off for the server's device if the check still fails.

AT&T (BGW320, BGW210 and other gateways)

  1. Open http://192.168.1.254 → Firewall → NAT/Gaming (it asks for the Device Access Code printed on the gateway).
  2. Custom Services: add one service per port (TCP 443, TCP 7881, UDP 7882).
  3. Back on NAT/Gaming, pick each service and your server under Needed by Device, then Add.

AT&T gateways don't support UPnP, so this is always by hand. With your own router behind the gateway, also see two routers (AT&T calls the fix IP Passthrough).

Spectrum

  1. My Spectrum app → Services → Internet → your router → Advanced Settings → Port Forwarding.
  2. Add a rule per port for your server.

The same screen has the UPnP switch; turning it on lets the server open the ports itself.

Verizon Fios (CR1000A / CR1000B and G3100)

  1. Open http://192.168.1.1 (the admin password is on the router's sticker).
  2. Advanced → Security & Firewall → Port Forwarding: add a rule per port for your server.

eero

  1. eero app → Settings → Network settings → Reservations & port forwarding → Add a reservation → pick the server (this also gives it a fixed address).
  2. On the reservation, Open a port for each of the three.

UPnP is on by default on eero, so usually nothing is needed. If an ISP gateway sits in front of the eero, see two routers.

Google / Nest Wifi

  1. Google Home app → Wi-Fi → Settings → Advanced networking → DHCP IP reservations: reserve the server.
  2. Port management → + → pick the server → add the three ports.

UPnP is on by default. The main Nest Wifi point can't be put in bridge mode, so behind an ISP gateway see two routers.

Netgear (Nighthawk, Orbi)

  1. Open http://routerlogin.net (or http://orbilogin.com).
  2. Advanced → Advanced Setup → Port Forwarding / Port Triggering → Add Custom Service: protocol TCP, external port 443, tick Use the same port range for Internal port, your server's address. Add TCP 80 the same way if friends should be able to type just the name. With UPnP off, also add TCP 7881 and UDP 7882.

With UPnP on (the default, Advanced → Advanced Setup → UPnP) the server can open the two call ports itself, but Netgear routers we've seen don't let UPnP take TCP 443 or 80: add those two by hand. The Nighthawk and Orbi apps have the same settings under Settings.

TP-Link

Archer routers: http://tplinkwifi.net → Advanced → NAT Forwarding → Virtual Servers → Add, once per port. UPnP is under NAT Forwarding → UPnP; some models ship with it off.

Deco mesh: Deco app → More → Advanced → NAT Forwarding → Port Forwarding → +, once per port.

ASUS

  1. Open http://router.asus.com (or the ASUS Router app).
  2. WAN → Virtual Server / Port Forwarding → switch it on → Add profile, once per port.

ASUS routers also answer NAT-PMP, so the server usually opens the ports itself.

Any other router

  1. Find the router's address: it's the "default gateway" on any device (on Windows, ipconfig; on a Mac, System Settings → Network → Details → TCP/IP). Open it in a browser; the login is often on a sticker.
  2. Look for Port Forwarding, Virtual Servers, NAT or Applications & Gaming.
  3. Add the three rules for your server, and a DHCP reservation for it.

Guides for most routers: portforward.com.

Two routers in a row

Common setup: your internet provider's box is a router, and your own Wi-Fi router or mesh is plugged into it. Ports opened on your router stop at the provider's box. The dashboard spots this ("two routers in a row"). Two fixes:

  • Best: put the provider's box in bridge mode (Xfinity: Bridge Mode; AT&T: IP Passthrough; Spectrum and Verizon: ask support or see the box's settings), so only your own router does the routing.
  • Or: forward the three ports on the provider's box to your own router's address, and on your own router to the server.

When your internet can't take incoming connections

Some internet providers share one public address between many homes ("carrier NAT"). Then no setting at home can let friends in. This is usual for T-Mobile Home Internet, Verizon 5G Home, AT&T Internet Air and Starlink (residential plans), and happens with some other providers. The setup detects it and says so.

  • A server for your home still works on these connections.
  • Run the server on a rented computer instead. A small rented server (a "VPS" with 2 GB of memory, about $5–12 a month) has an address of its own, so friends anywhere can reach it: the Linux script installs Tin Hat Server there. Calls, direct messages and private rooms stay end-to-end encrypted. The company renting it out runs the machine, so like anyone who runs a server it could get at what isn't (public channels, #general, the guest room) and see who talks to whom.
  • Ask your provider for a public IPv4 address. Some sell one (Starlink includes it on Priority plans; business plans usually have one).
  • Or let a friend host it whose internet takes incoming connections (most cable and fiber does).

Sorry: there's no Tin Hat relay for now. A relay would carry friends' connections into homes like these, but it carries every call and every photo of every server that uses it, and that costs more than we can pay for everyone. It's built and tested in our lab, so it can start if that changes. Until then setup says plainly when your internet can't take incoming connections, and never offers a relay that isn't there.

Upload speed and calls

In a video call, your server sends every camera to every other person, so call size depends on your upload. Voice is light, about 1/30 of video, and fine on any connection. See the table: about 3 people on camera at 20 Mbit/s, 7 at 100 Mbit/s, 15 at 500 Mbit/s. Fiber helps most.

From inside your home

At home, your devices open the same yourname.tinhat.me. That travels out to your router and straight back in ("NAT loopback"), which most routers do automatically. If the last setup page says this device can't open it yet while friends outside can, turn on NAT loopback (also hairpin NAT or NAT reflection) in the router, or use your phone on mobile data. Calls inside your home connect directly either way.

What the Tin Hat names service knows

  • Your server's name, its public address and its Tin Hat Server version.
  • When it last checked in, and a short log of name changes and checks, kept 90 days to handle abuse reports.

It never sees your messages, calls, accounts or files: those stay on your server. The certificate's private key never leaves your server either.