Edit: Since writing this, Unraid’s official blog released a similar better post on this same topic

How To Setup Valheim Private Server

We will leverage a popular Docker image [ich777/steamcmd] which allows us to launch the Valheim multiplayer server.

Warning
The first time you launch the container, it can take a while for the game server to be downloaded.

The GAME_ID environment variable we must use to pick Valheim is 896660

Access The Server

At this point you should be able to play Valheim with anyone on your local network. Since most people play games with others online, you can either port forward on your router to expose this server to the rest of the world, or you can setup a virtual private network (VPN) to only allow connections from machines you trust. I prefer to the do latter and explain how to do so in this blog post.

How To Connect To A Running Valheim Private Server

Edit: These steps are no longer needed, as Valheim has updated a way to perform this in the UI

First complete the steps here in this blog post.

At this time, one most modify a launch parameter in Valheim to join a private server. Before attempting this, you should have access to the server by running Zerotier or be connecting to a public server.

  • Launch the game
  • create a character
  • create a world
  • close the game
  • In your Steam Library, right click on the Valheim game and select “Properties”.
  • In the “General” tab, at the bottom will be the “Launch Options” text field.
    • You will enter +connect IP:PORT.
    • It will end up looking like +connect 000.000.000.000:2456.
    • Make sure you replace 000.000.000.000 with the IP address I tell you.
  • Some people have reported to us that having the “Keep games saves in the Steam Cloud for Valheim” option enabled was needed for this method to work for them.