Skip to content
Go back

RetroArch Netplay Over Tailscale

By KingPin 12 min read
RetroArch Netplay Over Tailscale
Contents

Your Friend Is Three Time Zones Away and Your Router Is Lying to You

You want to play two-player Contra with a friend who lives far away. RetroArch can do that. The problem is the plumbing, not the emulator.

The fix is to skip the plumbing. Put both machines on a Tailscale tailnet, host on one, connect to its 100.x address from the other, and RetroArch never learns it is crossing the internet. No port forward, no public relay, no open port on your router. One policy rule keeps your friend on the netplay port and off everything else.

Versions: as of November 2026 the current RetroArch release on GitHub is 1.22.2 (published November 2025), and the Tailscale docs cited below are the current ones.

Why Netplay Is a Pain Without Help

RetroArch netplay listens on port 55435 by default. The CLI help says “Default is 55435”, and the libretro docs say the host’s gateway needs TCP 55435 forwarded. That is the first obstacle, and there are three more.

  1. Port forwarding. The libretro docs say RetroArch asks the router for a UPnP mapping and does not check whether the mapping worked. The NAT Traversal toggle under Netplay, Host defaults to off in the current source, so check it. A failed mapping shows up as “Port Mapping Failed”, or as no message at all and a friend who times out.
  2. CGNAT. If your ISP puts you behind carrier-grade NAT, you have no public IPv4 address to forward to. Forwarding in your router does nothing.
  3. Public relay servers. RetroArch’s fallback is a relay (MITM) server. The docs say it “routes both sides of the connection through one of the public proxy servers”. Your inputs take a detour through a data center, and you pick from a short list of locations (the default is “nyc”).
  4. Discovery. LAN scan relies on broadcast discovery, and a tailnet does not carry broadcasts. You type the host’s address instead.

Port forwarding is like cutting a hole in the wall so the pizza guy can reach the couch. It works, and now your house has a hole.

How Tailscale Fixes It

Both machines join one tailnet. Each gets a stable 100.x.y.z address and a MagicDNS name. RetroArch connects to that address like it is a LAN host. Tailscale does the NAT traversal underneath.

Tailscale connections come in three kinds, per the connection types doc. Direct connections send UDP packets between the devices. DERP relayed connections go through Tailscale’s relay servers. Peer relay connections go through a Tailscale Peer Relay node in your tailnet, if you run one. The docs say direct connections “usually provide the lowest latency and highest throughput”, and relays are the fallback when direct connectivity is impossible. Devices start on DERP, then try NAT traversal to upgrade to a direct path.

For a game, you want direct. Check it:

Terminal window
tailscale status
tailscale ping retro-box

tailscale status lists peers and shows whether each one is direct or relayed. tailscale ping sends pings over the tailnet and reports the path. If the reply says via DERP(...) or via peer-relay(...), you are on a relay and the latency includes a detour. If it says via an IP and port instead, the path is direct. The first replies often show DERP while the direct path is negotiated, so run it a few times before judging.

Run it from the friend’s machine too. A direct path is a per-pair result, and a friend behind a hard NAT can stay on DERP while everyone else is direct.

Getting a Friend Onto Your Network

You have two options.

Invite them to your tailnet. They become a user in your tailnet, count against your user limit, and see whatever your policy lets them see. The free Personal plan lists up to 6 users (pricing page, November 2026). This is fine for family. It is more access than a stranger from a Discord server deserves.

Share one machine. Node sharing lets you share a single device with a user on another tailnet. Per the Tailscale sharing docs, the recipient accepts an invitation, and does not need an account with the same email address as the invite. The shared machine appears in their client “as if it was on their own tailnet”. Shared machines are quarantined by default. They can receive connections from the other tailnet but cannot start them.

Sharing is the better default for this job. Your friend sees retro-box and nothing else. Their own tailnet stays theirs.

One catch: the sharing docs say sharing respects the access policies of both tailnets. Your policy controls what the friend can reach on your machine, so you can lock them down to the netplay port. The friend’s own policy still applies on their side.

Limit Your Friend to One Port

By default, a new tailnet has an allow-everything policy. Tailscale says you can also write rules with autogroup:shared, which “automatically includes all users invited to your tailnet” (it covers users who accepted a share). Tailscale now documents grants as the main syntax, and ACLs still work. Here is a grants policy:

policy.hujson
{
"grants": [
// You can reach everything you own.
{
"src": ["autogroup:member"],
"dst": ["*"],
"ip": ["*"]
},
// Anyone who accepted a share can reach the host on the netplay port, nothing else.
{
"src": ["autogroup:shared"],
"dst": ["100.101.102.103"],
"ip": ["tcp:55435"]
}
]
}

Replace 100.101.102.103 with the Tailscale IP of retro-box. Grant ip entries take the form tcp:443 or udp:53, so the port is explicit.

Two traps. First, if you keep the default allow-all rule next to this one, the narrow rule means nothing. Remove the default. Second, autogroup:shared covers every share you make, so if you share other machines later, check this rule still fits.

If you hate IPs in policy files, the older ACL syntax works too. You would write "acls": [{"action": "accept", "src": ["autogroup:shared"], "proto": "tcp", "dst": ["100.101.102.103:55435"]}]. Without "proto": "tcp", an ACL rule covers both TCP and UDP on that port, so keep it to match the grant.

The RetroArch Side

Both players need RetroArch installed with the same core. Set a nickname first: Settings, User, Username.

Hosting from the menu

Load the core and game, open the Netplay menu, go to Host, and pick Start Netplay Host. The libretro docs describe the same flow: configure your network parameters, “Start Hosting”, then load content and wait for players. If you want a private game, set a Server Password. If you do not want to show up in the public lobby, disable Publicly Announce Netplay. That setting defaults to on in the source (DEFAULT_NETPLAY_PUBLIC_ANNOUNCE true), so check it.

Joining from the menu

On the friend’s machine, load the same core and game, open the Netplay menu, and pick Connect to Netplay Host. It sits at the top level of that menu, not under Host. The menu describes it as “Enter netplay server address and connect in client mode.” Type the host’s 100.x address or MagicDNS name. Port 55435 is the default.

Config keys

These keys are in retroarch.cfg. I checked each one against the RetroArch source (configuration.c and the label table in intl/msg_hash_lbl.h).

retroarch.cfg
netplay_nickname = "player1"
netplay_ip_address = "retro-box"
netplay_ip_port = "55435"
netplay_password = "pick-something"
netplay_input_latency_frames_min = "2"
netplay_input_latency_frames_range = "0"

netplay_ip_address is the host to connect to. Note that the sample retroarch.cfg in the repo also lists netplay_use_mitm_server and netplay_mitm_server. Leave the MITM server off. It exists for the case Tailscale already solved, and its default is off in config.def.h.

From the command line

The help text in the source lists these flags:

Terminal window
# Host
retroarch -L ~/.config/retroarch/cores/snes9x_libretro.so --host game.sfc
# Join (friend's machine)
retroarch -L ~/.config/retroarch/cores/snes9x_libretro.so --connect retro-box game.sfc

-H and --host start hosting as user 1. -C and --connect=HOST join as user 2. --port=PORT overrides the port. --nick=NICK sets a nickname. --check-frames=NUMBER sets how often the host verifies sync. The core path above is a placeholder. Yours depends on how you installed RetroArch.

Test the port before game night

Before anyone loads a game, have the friend check that the grant lets them in. Start hosting on retro-box, then run this from the friend’s machine:

Terminal window
nc -vz 100.101.102.103 55435

A “succeeded” (OpenBSD netcat) or “Connected” (Ncat) line means the tailnet path and the policy both work, and any remaining problem lives inside RetroArch. A timeout means the grant, the host firewall, or the host itself. Fix that first, because RetroArch’s own error message will not tell you which one it is.

What Must Match

The libretro FAQ says it in one line: same RetroArch version, same core version, same exact content. Take it literally.

Not everything works. The FAQ says GB, GBA, and PSP link-cable netplay is not possible, with an exception for same-game GB and GBC play on the TGB-Dual and Sameboy cores. It lists gpSP (GBA wireless adapter) and MelonDS DS as cores with wireless features. For classic 8-bit and 16-bit couch co-op, cores such as Snes9x and Genesis Plus GX are the usual picks. Treat them as starting points, not a ranking.

Latency: What Matters

Netplay is rollback-style syncing, so every millisecond of round trip shows up somewhere: as input delay, as visible corrections, or as both. You cannot configure the speed of light away. You can only choose where the cost lands.

There is no universal “playable under X ms” number, because it depends on the game. A fighting game punishes a few frames of lag, and a turn-based RPG hides it. The mechanism is the useful part.

The source describes Input Latency Frames as “the number of frames of input latency for netplay to use to hide network latency”. It “delays local input, so that the frame being run is closer to the frames being received from the network”. That reduces jitter and CPU use, at the price of input lag. The Range setting lets netplay adjust the delay dynamically within a range, with “unpredictable input lag”.

Do this:

  1. Run tailscale ping retro-box and confirm the path is direct.
  2. Start with netplay_input_latency_frames_min at 0 or 1 and play for a few minutes.
  3. If the game stutters or rewinds visibly, raise the value by 1.
  4. Stop raising it when stutter goes away. More frames than you need is pure lag.

A direct Tailscale path runs over the same ISPs as a plain internet connection, with WireGuard on top. A DERP path adds the relay detour.

The sync check is separate. --check-frames (default 600 in the source) sets how often the host verifies that the peers match. The help text says the value is only used on the host. The RetroArch menu text says that with most cores it has no visible effect, and that it matters for nondeterministic cores.

Tailscale Netplay or the Public Relay?

Use Tailscale when you have one regular friend, a friend on CGNAT, or anyone you do not want to hand a port to. The path is direct when the NATs allow, nothing is open to the internet, and one policy rule controls access.

Use the relay when the friend refuses to install Tailscale. A relay is also fine for a one-off game with a stranger from the lobby. It is slower in principle, but it asks nothing of the other player.

Do not forward the port unless you enjoy debugging your own router. Forwarding is the right call only when you want a public server that anyone can join.

Common Questions

Does RetroArch netplay work over Tailscale on Android?

Yes. Android has both a RetroArch build and a Tailscale app. Join the same tailnet, then connect to the host’s 100.x address from the Netplay menu. Both sides still need the same core version and the same content.

What port does RetroArch netplay use?

RetroArch netplay uses port 55435 by default, and the libretro docs name TCP 55435 for forwarding. With Tailscale you never forward it. You only need to allow it in the tailnet policy, for example with tcp:55435 in a grant.

Is Tailscale free for playing RetroArch with a friend?

Yes. The Personal plan costs $0 and lists up to 6 users with unlimited user devices, as of the pricing page in November 2026. Node sharing lets your friend keep their own tailnet, so they do not need a slot in yours. Check the pricing page again if your use grows.

Why does RetroArch netplay say it cannot connect even though Tailscale works?

The cause is usually one of four things: the host has not started hosting yet, the host firewall blocks RetroArch, your policy does not allow tcp:55435 for the friend, or you typed the wrong address. Test first with tailscale ping retro-box. Then confirm the host menu shows hosting is active and the grant matches the host’s 100.x address. If all of that checks out, compare the RetroArch versions on both machines.

Do both players need the same ROM and core for netplay?

Yes. The libretro FAQ requires the same RetroArch version, same core version, and the same exact content. A different ROM dump, a patched file, or an older core build will fail to connect or desync mid-game. Update both machines before you start.


Wrote about this post on your own site? Send a webmention.

It shows up above once verified.


Next Post
LLDAP: Lightweight LDAP for Your Homelab

Discussion

Powered by Garrul. Sign in with GitHub or Google, or post anonymously.

Related Posts