Sven Co-op

Sven Co-op

688 ratings
Creating a game for your friends without ANY port forwarding or firewall configuration at all
By Adambean and 5 collaborators
Learn more about how to create a private game for your friends quickly and easily. This requires no port forwarding, no special router configuration, no firewall rules, and no other networking tosh you don't care about.

This goes over the new "NAT punch-through" feature release in version 5.19 of Sven Co-op, on 1st April 2019, and answers most frequently asked questions about it.
tl;dr version
  1. One person creates a game as the host via the "Create Game" option in the main menu.
  2. The host takes note of their steam ID (e.g. STEAM_0:1:12345678) then shares it with their friends. -- If that's you use to help you find it if you can't see it printed in your game's console.
  3. Their friends join the host's game by inserting the following into their console:
    connect STEAM_0:1:12345678
    Obviously replace STEAM_0:1:12345678 for the host's real steam ID. No quotes should be typed around it.
  4. Profit.
Hello everyone,

As of version 5.19 released on 1st April 2019 (no this isn't a joke) Sven Co-op can now host games using Steam's NAT punch-through service. (This has also been called "peer-to-peer" or "direct client-to-client".)

What this means is anyone, including you, can quickly create a game from the main menu, and have your friends join it without you having to configure port forwarding on routers, firewall rules, VPN (Hamachi, etc), or any other networking nonsense unfamiliar to the average user.

You can direct your thanks at our engine programmer GeckonCZ for implementing this feature.
How does this work?
When you create a listen server, which is done by starting a game via the "Create Game" option in the main menu, Sven Co-op will utilise Steam's NAT punch-through service to ensure a connection between a listen server and any connecting player can be made even through barriers such as firewalls and NAT configurations. Special network configurations to open inbound routes to people hosting listen servers will no longer be required.

This solves a common problem whereby home users cannot make their game connectable to players across the world, in particular to play with friends.

This should also eliminate the need for anyone to squat on public servers, whereby a (usually small) group of friends take over a public game server by vote-kicking anyone else that happens to join it so the group can continue to play on their own. This has been a big problem lately, and we hope this feature addresses this problem. -- We understand that groups of friends often like to play uninterrupted, so please spread the word about this feature!
Creating a game
This is enabled as standard providing that LAN mode is switched off. Anyone that knows your Steam ID can connect to your game as soon as you start one and are playing in a map. If you don't want this feature you have to explicitly turn it off by launching Sven Co-op with parameter "-nop2p".

Once you start your game it would be useful if you grab a copy of your Steam ID so you can hand it out to your friends. They will need to know this so they can join your game. You can see this using the "status" command in your console, or look for the line saying:

Initializing IP networking Local IP address:, SV port: 27015, CL port: 27005 Initializing Steam P2P networking Local SteamID: STEAM_0:1:12345678

Bare in mind that UDP/IP connectivity is still enabled as before, so if this always worked for you previously anyone can join still your game as it will appear in the server browser. Therefore you must still set a join password to keep your game truly private.

If you're playing over a LAN only you will not need this feature and can switch on LAN mode (CVAR "sv_lan" = 1) via the create game options form prior to starting.
Joining a friend's game
As these games do not appear in the server browser (even in the "Friends" tab) you first must know the Steam ID of the player hosting the game.

To find this out for someone in your Steam friends simply visit and copy in the full URL to their profile, for example "". You can then copy the entry marked "steamID" of which will start with "STEAM_......", for example "STEAM_0:1:12345678".

Once you have found the Steam ID you can join their game using the "connect" command in the Sven Co-op console, for example:

connect STEAM_0:1:12345678

Other format of Steam IDs such as "steamID3" and "steamID64" will not work. Do not put quotes around the Steam ID.
Is this true peer-to-peer?

Yes and no.

The initial connection is formed by using Steam's NAT punch-through service, which works by treating both host and joining players as two equal peers. Steam's service then tries to negotiate a way for these two players to form a direct UDP/IP connection. However if no direct route can be established Steam will use it's own relay servers to bridge the two players together.

However once the initial connection is established there is still a classic client-server relationship between the joined players and host player. Individually connected players will not have any direct communication with anyone apart from the host player, so if the host player closes their game, leaves it, or loses Internet connectivity it will drop for all joined players too. (There is no host swapping/migration.)

You can find more information about the technical workings of this here:

Is this slower / more laggy than a direct connection?

No, mostly.

In principal when Steam's relay servers are used there would almost always would have a slight performance hit because of the additional routing/hops needed to bridge two player connections together. That being said Steam's NAT punch-through service and relay servers are generally accepted to perform very well and reliably, so there should be no appreciable quality loss with player connections. (Particularly as Sven Co-op is not competitive.) More benchmarking would be required to answer this question with certainty when Steam's relay servers are necessary.

This would not apply if the NAT punch-through service was able to form a direct connection between two players. Performance wise this would work just as well as a classic direct UDP/IP connection.

Does this keep my public IP address secret?


If Steam's relay servers are used then your IP address wouldn't be immediately visible once the connection is established, but because NAT punch-through tries to form a direct connection before falling back to use relay servers, this involves exposing what your public IP address is.

There is no option of which can force you to use relay servers only, and attempting to do this yourself by hindering NAT punch-through's direct connectivity won't help.

This applies to both the host player and joining players.

Can I ban players from joining?


Just like before you can use the "banid" command to ban a Steam ID, for example "banid 0 STEAM_0:1:12345678".

Do we still need a VPN solution such as Hamachi?


The point of this is no special case networking by the user is required at all. Using a VPN solution will likely degrade performance vs a direct connection, and in some cases can cripple game connectivity entirely because of the additional overhead required by the VPN solution. (The engine does not handle over-fragmented packets very well.)

Using this connection feature will also be faster than a VPN solution such as Hamachi because the connections are as direct as can be. When falling back to Steam's relay servers is absolutely necessary it should be noted that these are purpose-built for linking up players using a game application rather than general purpose networking.

Does RCON work?


RCON still depends on UDP/IP being directly connectable.

This is less likely to be needed though as a real player will always be running the game, whom can always use their own game console to manage what's going on.

Does this work with dedicated servers?


Dedicated servers do not bind to any Steam account so there would be no way to associate a Steam ID with them. If this were possible it would also require you to have a separate Steam account, as the same Steam account can't be signed in AND actively using a Steam service (playing/hosting a game, using SteamCmd, etc) in two instances at the same time.

Direct UDP/IP is still required for dedicated servers.
< >
Derflerp Dec 2, 2023 @ 10:52pm 
"P2P_Send: SendP2PPacket failed (ID 'STEAM_0:0:0', channel 0, size 23 B)"

No matter what my friend and I do, this is what we deal with. Not finding much information online about it, so if anyone knows what's up, I'd appreciate some advice.
theveryepicdude Nov 21, 2023 @ 5:10am 
now make a tutorial for using sven coop dedicated server
Normal Human Being Oct 26, 2023 @ 5:12pm 
So it does not show me the ip address and it shows it on lan
TheArtemMaps Oct 25, 2023 @ 2:14am 
yeah, and always will be
dev1ce Oct 24, 2023 @ 8:32pm 
@TheArtemMaps Is this still working ?
TheArtemMaps Aug 11, 2023 @ 3:30am 
yep, why is there no invite function
Alexaction Aug 10, 2023 @ 2:16pm 
So instead of just clicking on a friend in your friend's list and clicking join game, you instead just do it through the console? Why?
Adambean  [author] Jul 9, 2023 @ 11:48pm 
> Soapy-chan
> It would've been nice to tell us what key to press to open the console

This is in the game's FAQ:
TheArtemMaps Jul 9, 2023 @ 7:14pm 
also, i see jill valentine on the thumbnail
TheArtemMaps Jul 9, 2023 @ 7:08pm