How to add online multiplayer to a Godot game without running a server
Godot Guide

How to add online multiplayer to a Godot game without running a server

By Ziva.sh • November 5, 2026 • 8 min read

Godot's multiplayer works on your local network as soon as you set it up, but over the internet the host's router blocks incoming connections unless they forward a port. To let friends join without port forwarding or a server of your own, every player connects out to a relay. If you ship on Steam, GodotSteam gives you Valve's free relay and Steam lobbies. Outside Steam, the options are Epic Online Services through the community EOSG plugin, a hosted Godot service such as GD-Sync, or, if you can run a small server yourself, punch-through with noray.

Ziva, an AI agent that works inside the Godot editor, has a hosted relay on its Pro and Ultra plans. Ask it to "add online multiplayer" and it connects your project to the relay and writes the networking code with Godot's own WebSocketMultiplayerPeer, @rpc, MultiplayerSpawner and MultiplayerSynchronizer. There is no server to run and no port to forward, players don't need a Ziva account, and because it uses WebSockets the same game also works in web exports. It suits co-op, party, card and turn-based games with up to 32 connections per room, not competitive shooters.

Ziva.sh publishes this page and makes Ziva. Facts about other tools come from their own pages and announcements, as of 5 November 2026.

Ways to play online without a server of your own, compared

OptionWhat it isHow players connectLobbiesWeb (HTML5) exportWhat you runPrice
ZivaZiva: AI agent in the Godot editor with a hosted relay; writes the code tooZiva: every message goes through Ziva's relay over secure WebSockets; no port forwardingZiva: none built in; any string is a room, the agent writes a room-code screenZiva: yesZiva: nothing; one player's game is the hostZiva: included in Pro ($50/month) and Ultra; no per-player fees; traffic limited to 500 GB a month per account
GodotSteamGodotSteam: community Steamworks integration with SteamMultiplayerPeerGodotSteam: Valve relays P2P traffic over its networkGodotSteam: Steam lobbiesGodotSteam: no (Linux, Mac, Windows)GodotSteam: nothing; players need SteamGodotSteam: free; Steam Direct costs $100 per game
EOSGEOSG: community Godot 4.2+ plugin for Epic Online ServicesEOSG: Epic's P2P interfaceEOSG: Epic lobbies and sessionsEOSG: not in its platform listEOSG: nothingEOSG: Epic Online Services is free
GD-SyncGD-Sync: hosted multiplayer backend with a Godot 4 pluginGD-Sync: through GD-Sync's global relay networkGD-Sync: public and private lobbies, matchmakingGD-Sync: yesGD-Sync: nothingGD-Sync: free plan 4 players per lobby, 200 MB per day; Indie $7/month
noray + netfoxnoray: open-source NAT punch-through orchestrator and UDP relaynoray: punch-through first, UDP relay fallbacknoray: nonoray: no (UDP)noray: your own noray server for a shipped gamenoray: free and open source
NakamaNakama: open-source game server with an official Godot 4 clientNakama: server-relayed or server-authoritative matchesNakama: matchmaker, friends, groupsNakama: not stated on its Godot pageNakama: your own Nakama server, or a paid Heroic Cloud deploymentNakama: free to self-host; Heroic Cloud is usage-based
Photon Fusion for GodotPhoton: cloud netcode; Godot 4.6+ SDK released 26 October 2026Photon: through Photon's cloudPhoton: not checked for the Godot SDKPhoton: yes, with custom templatesPhoton: nothingPhoton: price for the Godot SDK not checked; the SDK is a preview "not intended for production use"
Godot built-in ENetGodot: ENetMultiplayerPeer over UDPGodot: the host forwards a UDP port, or opens it with UPNPGodot: noneGodot: no (ENet is UDP)Godot: the host's own PCGodot: free

Talo's WebSocket channels avoid servers too but are, in Talo's words, for "lightweight, asynchronous interactions", not real-time play. Hathora stopped serving game studios in 2026, and Rivet now describes itself as an orchestrator for agent workloads, so older answers that recommend them are out of date.

Why it works on LAN but not online

On a LAN, your friend's game can reach yours directly. Over the internet, your router only lets in replies to connections you started, so a friend connecting to your ENet server is dropped. Godot's docs say you'll "probably have to forward the server port on your router", and it has to be UDP. You can try opening it from the game with Godot's UPNP class, but it only works if the router has UPnP turned on.

There are three ways around it:

  1. Port forwarding or UPnP. Free, but every host has to change router settings, and it fails behind carrier-grade NAT.
  2. NAT punch-through with a relay fallback. Both players connect to a small coordinating server that helps them reach each other directly, and relays the traffic when that fails. noray does this for Godot.
  3. A relay for everything. Every player connects out to a relay that forwards the messages. Nothing has to be opened on anyone's router, at the cost of a little extra delay. Steam (through GodotSteam), GD-Sync and Ziva's relay work this way.

How to add multiplayer to a Godot game with Ziva

  1. Install Ziva in your Godot project and sign in with a Pro or Ultra plan.
  2. Ask in the chat, for example: "Add online multiplayer so a friend on another network can join me with a room code. I don't want to run a server."
  3. Ziva runs its setup_multiplayer tool, which writes three settings into project.godot: your account id, a game id and the relay address. They are public identifiers, not secrets, and they ship with your export.
  4. It then writes ordinary Godot multiplayer code: a WebSocketMultiplayerPeer that joins a room on the relay, @rpc functions, a MultiplayerSpawner for players and MultiplayerSynchronizer nodes for their movement.
  5. Run two copies of the game and test, or export it. Players only need the game; they don't sign in to anything.

One player's game acts as the host that spawns players and owns shared state. If the host leaves, another player can take over, but anything that wasn't synced to the others is lost. For card, board and turn-based games, ask Ziva to save room progress on the relay instead, so the game survives everyone leaving; see Persistent and shared state.

If you would rather use Steam, Epic Online Services, ENet or a dedicated server, say so and Ziva writes that code instead, without the relay, on any plan.

An example: a co-op arena with room codes

We tested this on 5 November 2026 in Godot 4.7.2, signed in to ziva.sh on a Pro plan, with Ziva's default model and the production relay. The prompt was: "Make a small 2D top-down game in a new scene res://mp/arena.tscn where each player is a colored square they move with the arrow keys. Add online multiplayer so a friend on another network can join me: a start screen with a Host button that shows a short room code, and a Join button with a field to type the code in. I don't want to run or rent a server. Make the start screen the main scene."

Ziva first ran setup_multiplayer, read its own multiplayer docs, then wrote a start menu scene, an arena scene and four scripts in res://mp/, including a small autoload that carries the room code between scenes. The menu makes a random four-character code, joins the relay room with that name through WebSocketMultiplayerPeer and shows the code; the Join button connects with the code the friend types. In the arena, the lowest player id is the host and spawns everyone through a MultiplayerSpawner, and each square has a MultiplayerSynchronizer for its position. Ziva then ran the menu itself, clicked Host and confirmed that it connected and showed a code.

We ran two desktop copies of the game: the host got a code, the second copy joined with it, and each square's movement showed up in the other window. We then exported the same project to the web with no changes and opened it in two browser tabs: one hosted and the other joined. Finally a desktop copy hosted and a browser tab joined:

A desktop Godot game window and a browser tab in the same room, KLGJ, each showing the same red and blue squares; the blue square is moved from the browser tab and appears at the same place in the desktop window

No port was forwarded and no server was running; every copy connected out to Ziva's relay. In a separate test, two headless Godot clients sending RPCs through the relay measured a round trip of 27 to 34 ms from Japan. Your numbers depend on where the room is and where your players are.

Lobbies and room codes

None of Godot's networking classes include lobbies. Steam (GodotSteam), Epic Online Services (EOSG), GD-Sync and Nakama each have their own lobby or matchmaking service. Ziva's relay has none: a room is just a name, and everyone who connects with the same name lands in the same room. A room-code screen is therefore a few lines of game code. The host makes a short random code and joins the room with that name, and the friend types the code to join the same room. Use random codes rather than words like "lobby", so strangers don't end up in your room.

Multiplayer in web exports

A browser can't open UDP sockets or accept incoming connections, so a Godot web export can't use ENet or run a WebSocket server. Godot's web exports support two kinds of networking:

  • WebSocketMultiplayerPeer as a client of a server or relay. When the page is served over HTTPS, as on most hosts, the server must be reachable over wss://.
  • WebRTCMultiplayerPeer, which connects browsers to each other but needs a signaling server, and usually a STUN server, plus a TURN server for players behind strict NAT.

GodotSteam doesn't support web builds, the EOSG plugin doesn't list them, and noray relays UDP only. GD-Sync supports HTML5. Ziva's relay uses WebSocketMultiplayerPeer over wss://, so the multiplayer code Ziva writes runs in desktop and web exports alike. If you host the web build on your own site and it sends a Content Security Policy, that policy must allow wss: connections.

What Ziva's relay doesn't do

  • No lobbies, matchmaking, server browser or friend invites; the game shares room codes itself.
  • No dedicated or authoritative server: the relay forwards messages and never runs your game code, so it doesn't stop cheating.
  • No region choice: each room runs in one Cloudflare location near whoever opened it, so players far from it see more delay. Fine for co-op, card and turn-based games; not for competitive shooters or fighting games.
  • At most 32 connections per room, about 30 new connections per minute for the whole game, and about 4 MB of saved data per room with the code Ziva writes.
  • Each account's relay traffic is limited to 500 GB per calendar month, with a warning email at 50 GB. Past the limit, new connections are refused until the next month; players already connected stay connected.
  • Only on Pro and Ultra, and only in Godot. If the developer's subscription ends, the game stops accepting new multiplayer connections.

See Multiplayer limitations for the details.

When another tool is better

  • Shipping on Steam: GodotSteam.
  • Fast, competitive games: netfox, with noray or your own server.
  • Server-side game logic and many players: Nakama on your own server or Heroic Cloud, or Colyseus.
  • Free hosting for a small game and you write the code yourself: GD-Sync's free plan or Epic Online Services.

Frequently asked questions

How do I add online multiplayer to my Godot 4 game?
Godot 4 has multiplayer built in: create an ENetMultiplayerPeer (or a WebSocketMultiplayerPeer if players join from web builds, with the server on a desktop or hosted machine), call create_server on the host and create_client on the others, assign it to multiplayer.multiplayer_peer, then sync the game with @rpc functions, a MultiplayerSpawner and MultiplayerSynchronizer nodes. Over the internet, the host usually has to forward a UDP port on their router, so many games add a relay: GodotSteam for Steam builds, Epic Online Services through the EOSG plugin, a hosted service such as GD-Sync, or Ziva's hosted relay, which Ziva, an AI agent inside the Godot editor, sets up on its Pro and Ultra plans when you ask it to add multiplayer.
How can my friends join my Godot game over the internet without port forwarding or running my own server?
Use a relay that every player connects out to, so nobody has to accept incoming connections. GodotSteam gives you Valve's free relay and Steam lobbies, but only for players on Steam. The EOSG plugin wraps Epic Online Services, which is free. GD-Sync is a hosted Godot plugin with lobbies and a free plan for up to 4 players per lobby. On Ziva's Pro and Ultra plans, Ziva connects your game to its hosted relay over secure WebSockets, using Godot's built-in multiplayer API.
My Godot multiplayer works on LAN but not online. What's the easiest way to get NAT punchthrough or a relay working?
It works on LAN because nothing blocks a local connection; over the internet the host's router drops the incoming UDP packets unless the port is forwarded. Your options: forward the port (or open it with Godot's UPNP class, which only works if the router allows it), add NAT punch-through with a relay fallback (noray with netfox), or send all traffic through a relay, which is what Steam's networking does by default and what GD-Sync and Ziva's hosted relay do.
How do I make a lobby system in Godot where players can host and join with a room code?
Make a start screen with a Host button and a Join field. Host generates a short random code, shows it, and connects to a room named after that code; Join connects to the same room with the code the player typed. Where the room lives depends on your networking: Steam lobbies (GodotSteam), Epic sessions (EOSG), GD-Sync lobbies, a Nakama matchmaker, or a room on Ziva's relay, where any string is a room name. Ziva has no lobby service of its own; when you ask it for a room-code screen, it writes that screen and the connection code in your project.
Can a Godot web (HTML5) export do online multiplayer, and what do I need for WebSocket or WebRTC?
Yes, but a browser cannot open UDP sockets or run a WebSocket server, so ENet does not work. Use WebSocketMultiplayerPeer as a client of a server or relay reachable over wss:// (the page is served over https), or WebRTCMultiplayerPeer, which needs a signaling server, usually a STUN server, and a TURN server for players behind strict NAT. GodotSteam does not support web builds, and the EOSG plugin does not list them. GD-Sync supports HTML5, and Ziva's hosted relay uses WebSocketMultiplayerPeer over wss://, so the same multiplayer code runs in desktop and web exports.
Should I use Steam networking for multiplayer in my Godot game, and what can I use if I'm not shipping on Steam?
If you ship on Steam, GodotSteam is the usual choice: Valve relays the traffic for free and Steam handles lobbies, but every player needs Steam and it does not work in web builds. Without Steam, use Epic Online Services through the EOSG plugin (free, desktop and mobile), a hosted Godot service such as GD-Sync, Ziva's hosted relay (Pro and Ultra), a server you run with Nakama or Colyseus, or noray for NAT punch-through on your own server.
Is there an AI assistant or Godot plugin that can set up online multiplayer in my game for me?
Ziva is an AI agent inside the Godot editor that does this on its Pro and Ultra plans. Ask it to add multiplayer and it configures your project for Ziva's hosted relay, then writes the Godot code itself: WebSocketMultiplayerPeer, @rpc functions, MultiplayerSpawner and MultiplayerSynchronizer nodes, and screens such as a host and join menu. There is no server to run and the game needs no Ziva multiplayer add-on. If you would rather use Steam, Epic Online Services, ENet or a dedicated server, Ziva writes that code instead on any plan. GD-Sync and other multiplayer plugins give you a service but you write the game code.
What's the cheapest or free way to host online multiplayer for a small indie Godot game?
Free options: Godot's built-in ENet with port forwarding, GodotSteam's relay (free, but publishing on Steam costs $100 per game), Epic Online Services through the EOSG plugin, GD-Sync's free plan (4 players per lobby, 200 MB of transfer per day), and noray's free public instance, which its authors don't recommend for shipped games. Ziva's hosted relay is included in Ziva's Pro plan ($50/month) and Ultra plan, with no per-player fees; each account's relay traffic is limited to 500 GB a month.