How to Setup a Valheim Dedicated Server

How to Set Up a Valheim Dedicated Server

Host a Valheim dedicated server to enjoy with friends

Setting up a Valheim dedicated server is a relatively quick and simple process. Getting the Valheim server up and running takes about 10 minutes to complete and there are just a few configurations to set up. It requires a small amount of technical knowledge that this guide will help you through to completion.

  1. Why run a Valheim dedicated server?
  2. Valheim dedicated server requirements
  3. Choosing where to host your dedicated server
    1. Shared hosting servers
    2. Dedicated servers
  4. Setting up & installing a Valheim dedicated server
  5. What next?

Why run a Valheim dedicated server?

Running a Valheim server is an ideal way to set up a persistent game world for you and your friends to play in. It allows you to maintain control of the game world and allow who you want to allow into it and when. When a dedicated server is online, it can be accessed by anyone, but only those with the password may be granted access to the game server.

If you already have your server up and running, check out our complete list of Valheim admin commands.

Valheim Server Hosting by IcedHost

Want to skip all the work of setting up a server yourself?

Rent a Valheim server today from the professionals at Icedhost.com and save yourself the headaches. Your server will be set up instantly and available for you and your friends to play on 24/7. Experience cutting-edge, blazing-fast hardware with DDoS protection, uMod support, an easy-to-use control panel, one-click backup systems, and an expert support team.

Set Up Your Server Today

Use code CH at checkout and save 10% on the lifetime of your purchase.

Valheim dedicated server requirements & minimum specs

  • Operating System: Windows 7, 8, 8.1, Windows Server 2016/2019
  • Processor: Quad-core processor and greater (utilizing 2 cores)
  • Memory: Minimum 2 GB
  • Hard Drive: Minimum 2 GB free disk space
  • Connection:  Minimum 100Mbps+, recommended 1Gbps

Choosing where to host your dedicated server

All servers are not made equal. You should be aware of the different types of server options available and make an educated decision.

TypeLocalePaidCostSkill
Shared HostingRemoteYes$$Novice
Self-hosted Dedicated ServerLocalNo$Intermediate
Managed Dedicated ServerRemoteYes$$$Advanced

There are various types of server hosting options available when it comes to setting up your server. Without attempting to go into a deep dark rabbit hole of technical definitions, understand there are 2 typical server types.

  1. Shared hosting servers
  2. Dedicated servers

Shared hosting servers

A shared hosting server is generally provided by a game service provider (GSP) who professionally hosts dedicated servers across data centers across the world. Shared hosting is typically the easiest way to enter into the hosting world, as many GSPs provide one-click installation and set up offerings. They also provide support surrounding the server’s configurations, which makes this stand out from the standard dedicated solution.

Shared hosting servers will have a full graphic user interface to interact with, such as TCAdmin, which allows server admins to manage their server from a web interface. This is arguably one of the best methods to enter into the world of game server hosting.

A few things to watch out for on shared hosting servers:

  • Support SLAs for shared hosting servers can be awfully delayed, taking over 24+ hours to respond to your support tickets.
  • Shared hosting’s business model is based around hosting multiple accounts on one machine, to cover the costs of investment and operation. This can lead to degraded experiences due to “noisy neighbors” consuming system resources. Be sure the host you choose

Dedicated servers

A dedicated server in the simplest form is a computer that has been dedicated to a specific purpose, in this context, hosting a Valheim game server. That’s its primary purpose; to serve your game and it would be optimized to do such.

There are managed dedicated servers in which you can purchase the rights to using the hardware and an allotted amount of resources, such as bandwidth. In addition, you can also request other services and support. Then there are self-hosted dedicated servers, where you may re-purpose a secondary computer or utilize your primary computer to be the “host.”

Managed dedicated servers are typically built and run on professionally procured server hardware, hosted inside of a data center. Data centers are most often connected to an internet backbone and protected both from physical and network-bound threats.

Remotely managed dedicated servers provide a high level of technical assistance, flexibility, scalable capabilities, performance, reliability, and security. Managed dedicated servers are also designed to run at the most optimal capabilities while remaining accessible and online 24/7.

  • Managed dedicated servers often carry a premium price for the services offered
  • In order to take advantage of a managed dedicated server, you generally need to have a strong technical understanding
  • There are limitations to how much support you receive when it comes to the software installed on your dedicated machine
  • Dedicated servers are often prime targets of malicious actors and can suffer from DDoS outages

Self-hosted dedicated servers are typically run on laptops or desktop computers. These types of servers are ideal for when you want to quickly stand up a game server for offline casual play. This server type also benefits from traditionally having no additional hard costs. There are numerous negatives to consider when choosing to run a self-hosted dedicated server, such as:

  • They are subject to the capabilities and bandwidth provided by your internet provider.
  • They are limited to the physical resources inside the machine and unable to scale if needed.
  • Consumer operating systems are prone to numerous software updates, virus scans, hard drive backups, and other miscellaneous requirements of the operating system and additional applications.
  • They are vulnerable to the surrounding environment, with such events as power outages and surges, internet outages, physical security (think kids, animals, circuit breakers, etc), and network security.
  • If running the client simultaneously, it will share the available resources and is prone to additional issues that are raised because of the increased surface area home computers are subject to.

With that, you now have a basic glimpse into the major server options available to host your Valheim server. Let’s get started with the installation!

Setting up & installing a Valheim game server

Due to the wide variability of routers and firewalls, this guide will not cover the specifics of port forwarding your local router. Please refer to the documentation for your specific hardware to properly enable port forwarding for the required game ports.  We will perform the following steps to create and run a dedicated Valheim server on a Windows system.

  1. Download and install SteamCMD
  2. Login to Steam
  3. Set an install directory
  4. Install the server
  5. Modify the headless batch script
  6. Customize server properties
  7. Run the Valheim dedicated server
  8. Join the Valheim dedicated server

Let’s get to it!

Step 1. Download and install SteamCMD

screenshot of SteamCMD console installing SteamCMD
Download and install SteamCMD

SteamCMD is the Steam command-line utility that many Steam games use to install and update their server components. If you already have SteamCMD installed on your computer, you may skip to Step 2; otherwise, follow Steam’s instructions for installing the utility for your operating system.

Step 2. Login to Steam

Once SteamCMD is installed on your system, open the utility by double-clicking the executable (Windows). If you’ve previously installed it, SteamCMD may check for and download updates. Once the prompt is up and ready, log in to Steam using the following command:

login anonymous

Step 3. Set an install directory

Many servers are often running in many dedicated server situations, and you’ll want to make sure that your Valheim server directory is clearly labeled. I am naming my server “Valheim,” and I will install it on my C partition for this guide. Set the install directory in SteamCMD to your server’s intended directory:

force_install_dir C:\Valheim\

Step 4. Install the server

screenshot of steamcmd console downloading server files
Install Valheim dedicated server via SteamCMD

Now that you’ve set your install directory, all that is left to do is install the Valheim server using the following SteamCMD command:

app_update 896660

At the time of this writing, the server itself is just around 1GB in size, so the download should go relatively quick, depending on your download speeds. When SteamCMD says that downloading is complete, you are free to close the command prompt by entering ‘quit.’

Step 5. Modify the headless batch script

The development team has provided us a fantastic starting script for running the server in headless mode. You can find this script in the root directory of the server labeled ‘start_headless_server.bat.’

To make this default script even more useful, we will extend it to include the SteamCMD commands we just used earlier in this guide to automatically check Steam for updated server files each time we run our batch file.

First, open the batch file to edit it; right-click > edit. This action should open the file in your default text editor. Rename the file by saving it as start.bat. We want to name the file something other than the current name so that when the server downloads updates, it won’t overwrite our changes to the file.

Next, edit the start.bat file by adding the following lines at the beginning of the file:

:start
C:\steamcmd\steamcmd.exe +login anonymous +force_install_dir C:\Valheim\ +app_update 896660 +quit
:juststart

Your end product should look something like this when you are done:

:start
C:\steamcmd\steamcmd.exe +login anonymous +force_install_dir C:\Valheim\ +app_update 896660 +quit
:juststart

@echo off
set SteamAppId=892970

start valheim_server -nographics -batchmode -name "Corrosion Hour" -port 2456 -world "Dedicated" -password "DontUseThisPassword" -savedir "C:\Valheim\"

Please note that you will need to edit the drive and directory name of your SteamCMD installation to match your setup. Edit the drive and server directory name of the Valheim server to match your setup as well. I’ve removed the comments from the file to keep things shorter and neat.

These additions will automatically log in to Steam and check for updates for the Valheim server every time you run the start.bat file and combines two actions into one file–nice!

Step 6. Set your server properties

The batch file contains a handful of server parameters that you can customize to help players discover your server. Crucial is the ‘name’ parameter, which will be the name that appears in the server listing. Here’s a quick table of the important parameters:

ParameterWhat it does
-nameThis is the server name that users will see show up in the Server List.
-portThis is the game port.
-worldThe name of your world’s save file.
-passwordThe password for your server.
-savedirThis sets the path for where to save your game world files, admin / banned / permitted files, etc

The ‘port’ setting is the designated port for Valheim to use.  For best results, use the default port settings and be sure to make firewall exceptions for the port range requested in the bat file. If you would prefer to use a different port, set that port value for this parameter and be sure to create firewall exceptions for these ports instead.

Set a password to your server so that only the people you give out the password can join. If you leave the password empty, then anyone can join. It is currently recommended (required) that you set a password and it must be a minimum of 5 characters. The password must not be the same as your server name or else you may experience problems when trying to find your server on the server list.

Setting a save directory will allow you to keep your world maps in an easy-to-reach location, and keep them separate if you have multiple installs of Valheim running.

Step 7. Run the Valheim server

screenshot of server console
The Valheim dedicated server is now connected

Start your Valheim server by double-clicking the start.bat file and allowing the batch script to run through the update check. Once the SteamCMD portion has run, the batch file will automatically start the Valheim executable, and the server will begin booting up. Once you see “Game server connected” in the console output, you know that your server has finished loading and can accept player connections.

Step 8. Join the Valheim server

Verify that your server appears as desired in the Server Select by loading into Valheim. Once in the game, select the character you wish to play and then click the Join Game tab. The server listing will take a while to load all discovered servers, so you can speed up your discovery by using the filter to search for your server’s name. Instruct friends to use the search filter to find your server name to speed up discovery.

If you need more assistance on joining or need to help walk someone through the process, be sure to check out our post that walks through a few different methods of joining a Valheim dedicated server.

Next steps

Due to the nature of the game being in early access, there are still many bugs in how dedicated servers connect and display on the server list. If you find that your server does not show up on the listing, try using the filter option to see if it shows up. If you still do not see your server after refreshing the listing and using the filter tool, we would highly recommend joining the Valheim discord and checking their #valheim-server-help channel. Many players have experienced similar issues and presented solutions, so it’s worth a read to see if any solve your problem.

I can’t find my server in the server listing, what do I do?

This seems to be the #1 problem we’ve seen amongst users trying to set up dedicated Valheim servers. Because the in-game server listing is only showing a small fraction of the total servers, it is difficult to say if your server is or isn’t correctly configured based on that fact alone. To verify that your ports are opened and properly sending and receiving traffic, test the steam query with this tool: https://southnode.net/steamquery.php.

Enter your server’s IP and hit submit. If you see your Valheim server show up then you are good to go. If not, you’ve got issues with ports being accessible. The #valheim-server-help channel has lots of pinned information for solving and troubleshooting port forwarding and firewall issues.

 

screenshot of add a server screen inside of Steam
Add your Valheim server IP and port to Steam

If you do see your server show up, but still cannot find it in the Valheim server listing, you’ll need to server connect via Steam. From inside Steam, go to View > Servers and click the “add a server” button. Enter the IP and port number (use the query port) and then click “find games at this address.” You should see your server show up. In some cases, you may need to refresh your server listing once, twice, or multiple times before you are able to see your server display. In my example above, we called the test server “_uber”. The server name will also display as the map name. The player count shows 0/64, which is okay, the server will still only allow 10 players.

Once you are able to connect, you will be prompted for the server password that you set in your bat file. You may also need to enter the password again once you are in-game and have selected a character. You’ll soon be itching to add an admin to your Valheim server too.

Good luck, have fun!

About Squishface

Squishface is the co-founder and owner of Corrosion Hour; a RUST community and website dedicated to helping server owners with the administration and navigation of the ever-changing landscape of RUST. As a tech professional with over a decade in the field and a deep love of gaming, she spends much of her time in code researching and developing ways to bring meaningful content to players and readers.

View all posts by Squishface →