Valheim – Setting up the Local Dedicated Server

alheim – Setting up the Local Dedicated Serve 1 - steamlists.com
alheim – Setting up the Local Dedicated Serve 1 - steamlists.com
Setting up a computer as a dedicated server for remote players (that live elsewhere) to connect and play in the same World.

 
 

Set Static IP Address on Win10 PC

Private IP addresses assigned to your computer are dynamic and so to keep the address of the dedicated server static, you will need make the IP address of the computer hosting the server static. 
 
Get IP Details of the computer that will be hosting the server: 

  1. On the computer that will be hosting the server, type cmd in the Search field on the Task Bar
  2. Right-click on the Command Prompt app and select Run as administrator
  3. Type ipconfig and press keyboard ENTER
  4. The following values will be displayed: 
    • IPv4 Address 
    • Subnet Mask 
    • Default Gateway
  5. On the right-hand side of the Task Bar, right-click on the Network icon and select Open Network & Internet settings
  6. Under Advanced network settings select Change adapter options
  7. Right-click on Ethernet Connection or Wi-fi (whichever is your primary connection method to play the game – no names are given as these connections may have been renamed and are no longer the Windows default). 
  8. Select Properties > Internet Protocol Version 4 (TCP/IPv4) > Properties button > Use the following IP address radio button. 
  9. Enter the following details from the Command Prompt window: 
    • IP address = IPv4 Address 
    • Subnet mask = Subnet Mask 
    • Default gateway = Default Gateway 
    • Preferred DNS server = Default Gateway
  10. Select OK > Close and close the Network Connections window and Status window. 
  11. In the Command Prompt window type exit and press keyboard ENTER.

 
 
 
 

Port Forwarding

Firstly, obtain the manual for the router’s make and model as each one can be different. 
This section is based on the Sagemcom FAST 5364 but the details in the rules that need to be created will be common to all routers. 
 
Please note, the Valheim Dedicated Server instructions refer to ports 2456 and 2457 only; that may be all that is necessary but I entered all ports relating to the Valheim game and it worked for me. 

  1. In a browser window, log on to the Router (probably 192.168.1.1) and navigate to Port Forwarding. On my router this is See internet settings > Manage advanced settings > Access control
  2. Add an entry for the following port numbers and port ranges: 
     

    Protocol Port(s)
    TCP – UDP 2456-2457
    TCP 27015-27030
    TCP 27036-27037
    UDP 4380
    UDP 27000-27031
    UDP 27036

     

    • Custom Service Name: anything meaningful to you; has no effect on the port forward 
    • Service: Other 
    • Protocol: TCP or UDP or both 
    • External Host: leave blank or use * to denote Any 
    • External Port and Internal Port: enter the same port number/range in both 
    • Internal Host: static IP address of the computer hosting the server

     

  3. When all ports have been entered, select Apply
  4. There are many tools to check whether the ports have been successfully ‘opened’ but rather than download anything, I recommend you follow www.wikihow.com – https://www.wikihow.com/Check-if-a-Port-Is-Opened.

You may need to Add a rule to the Firewall to allow someone who is not on your network to be routed through to the computer that is hosting the server. 

  1. Navigate to Firewall settings and select the Custom tab. 
  2. Add an entry for each player outside of your network (remote computer) and for each port number or port range: 
    • Custom Name: the remote player’s name is helpful 
    • Service Name: Other 
    • Protocol: TCP OR UDP or Both 
    • Local IP: the static IP address of the computer hosting the server 
    • Local Port: port number/range 
    • Remote IP: the Public IP address of the player’s computer that needs access. Note that the Public IP address is different to a Private IP address. Ask the player to browse ip4.me – http://ip4.me/ to view it. 
    • Remote Port: leave blank 
    • Action: Accept Both Way communication

On the Sagemcom router I also activated DMZ (demilitarized zone) for the computer hosting the server. See en.wikipedia.org – https://en.wikipedia.org/wiki/DMZ_(computing) explanation of what it is. 
 
 
 

Configuring Local Valheim Server File

  1. Launch Steam on the computer that is hosting the Valheim Dedicated Server. 
  2. Ensure the server is not running. 
  3. Right-click on the Valheim Dedicated Server title in the Steam Library list. 
  4. Select Manage > Browse local files and File Explorer will display the location of the files. 
  5. Right-click the start_headless_server file and select Edit
  6. The very last line in the file lists the parameters for the local dedicated server, enter text values between the double quotes ” “; numerical values do not need the quotes: 
    • -name “A custom name for your local dedicated server 
    • -port 2456 
    • -world “The name that will appear in Steam’s server list and cannot be the same as -name given for the dedicated server 
    • -password “A complex password that allows access to the local dedicated server
  7. By default, the following parameter was not present in my file so I added it to the end of the parameter line. 
    • -public 1

    1 means the -world will be publicly displayed in the Valheim server list and 0 means it is hidden. 

  8. Save and close the file. 
  9. Copy the file and save it in another folder (e.g. Program Files (x86)\Steam\Backups) so that if the start_headless_server file is overwritten with a Valheim Dedicated Server software update, you can overwrite the default with the backed-up customised settings.

 
 

Written by Matriarch

I hope you enjoy the Guide we share about Valheim – Setting up the Local Dedicated Server; if you think we forget to add or we should add more information, please let us know via commenting below! See you soon!
 
 
 
 


1 Comment

  1. Why all the ports? Also, where did you get all the port numbers? The only ones that I have seen are 2456 and 2457 UDP/TCP

Leave a Reply

Your email address will not be published.


*