Skip to content

A simple wrapper for the valheim_server executable to make controlling the configuration easier

License

Notifications You must be signed in to change notification settings

Halkcyon/valheim-server

Repository files navigation

Valheim Dedicated Server

A simple wrapper for the valheim_server executable to make controlling the configuration easier.

Requirements

Valheim

I hope this is a given, but it seems you can only get access to the server software after you've purchased the game.

PowerShell v5+

If you're on Windows 10, this is already the case.

You can confirm your version by pressing "WinKey+X" and selecting "Windows PowerShell" from the menu:

power-user-menu

Then run:

PS C:\> $PSVersionTable.PSVersion

Setup

Install the Server

  1. Enable the "Tools" filter

steam-tools-enable

  1. Search for the software

steam-tools-search

  1. Install the server

steam-tools-install

  1. Keep a reference to where it's installed for later

steam-tools-find-install

steam-tools-copy-path

Firewall

The server requires TCP/UDP ports 2456-2458 open to accept connections. The UAC prompt should appear when attempting to run the script for the first time and accepting it creates inbound firewall rules named valheim_server. The Program column should contain the full path to valheim_server.exe.

firewall-rules

Port Forwarding

In your router's management webpage, you should set up your PC with a static IP address on your local network, and you should forward the ports 2456-2458 on both TCP and UDP protocols to that static IP.

Domain Name

If you want to host your server privately, off-list and do not want your players to have to remember or update your public IP address constantly, I recommend using NoIP's client to have a free, public domain name. Their startup documentation is good enough, so I recommend reading it if you want to pursue this route, but I won't be covering it in this guide.

Private servers have to be added and connected through the Steam client. You will be prompted twice for the password you pass to the script: once at the Steam UI and once at the game's UI.

steam-servers-view

steam-servers-favorites

The server is connected to in the form of ip-octets:2457 or hostname:2457.

Running the Script

Open up PowerShell and run the following commands, replacing the placeholders according to where you have things downloaded or installed on your local PC:

PS C:\> Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force  # enables running the script
PS C:\> Set-Location -Path "DOWNLOAD_LOCATION"
PS C:\> ./start.ps1 -Path "PATH_FROM_SETUP" -World myworld -Name servername

or launched from cmd:

C:\> powershell -ExecutionPolicy Bypass -File "PATH\TO\start.ps1" -Path "PATH_FROM_SETUP" -World myworld -Name servername

About

A simple wrapper for the valheim_server executable to make controlling the configuration easier

Topics

Resources

License

Stars

Watchers

Forks