How to Set up Valheim Dedicated Server using DigitalOcean or Vultr

Written by

Ever wonder how to setup a Valheim dedicated server using cloud VPS? like the popular cloud hosting DigitalOcean and Vultr? Creating your own Valheim dedicated server allows you to take control of your world and players.

As of May 23, 2023, we have updated this article to ensure it is working on the latest version of Valheim and the latest version of Ubuntu OS 22.10 x64.

Table of Contents

  1. Sign-up for a Cloud Server
    1. How to Create Digital Ocean Droplet
    2. How to Create Vultr Server
  2. Setting up Valheim Server
  3. How to connect to your Valheim Dedicated Server
  4. Assign Admin access to your Character
  5. How to Backup and Restore Server World Data
  6. How to update your Valheim Dedicated Server
  7. Firewall for Security
    1. DigitalOcean Firewall
    2. Vultr Firewall

In this guide, we will teach you how to setup your own dedicated server for Valheim – from scratch to complete and without using any third party scripts. Good for newbies who has literally no idea about servers and wanted to learn this stuff. This is a step-by-step guide so you can follow each step.

Sign-up for a Cloud Server

First you need a hosting cloud server, you can use either DigitalOcean or Vultr. If you don’t have one, you can sign up below to get free $100 credits.

The Valheim server will require atleast 2GB of RAM and 10% of CPU usage. With this, you need to pick a droplet (Digital Ocean) or a product (Vultr) that meet the minimum specs.

There are two type of cloud servers. First, shared server which means the CPU and Memory resources that you’re not currently using are shared with other users in that particular server. Dedicated server on the other hand means you solely use all of the CPU and Memory resources, getting rid of noisy neighbor, good for server who constantly uses 50 to 100% CPU loads.

How to Create Digital Ocean Droplet

To create a droplet, click the Create > Droplets at the top corner of the page. For the Region, you need to select the nearest region you want your player to play. The closest gives you faster ping – means better gameplay. For example, we are in the Philippines, the closest server is Singapore.

For Choose an image, select the latest Ubuntu version, the 22.10 x64.

For the Size, the cheaper plan is the Shared CPU and lowest plan that has 2GB memory are the following: You may also pick higher specs to accommodate more players depending on your budget. The Bandwidth is the download/upload

ServerSpecs
Shared Regular
$12 per month
1 CPU
2GB Memory
50GB SSD Disk
2TB Bandwidth
Shared Premium Intel
$14 per month
1 Intel CPU
2GB Memory
50GB NVMe SSD Disk
2TB Bandwidth
Shared Premium AMD
$14 per month
1 AMD CPU
2GB Memory
50GB NVMe SSD Disk
2TB Bandwidth
General Purpose
$63 per month
2 CPU
8GB Memory
25GB SSD Disk
4TB Bandwidth
CPU-Optimized Regular
$42 per month
2 CPU
4GB Memory
25GB SSD Disk
4TB Bandwidth
CPU-Optimized Premium Intel
$109 per month
4 CPU
8GB Memory
50GB SSD Disk
5TB Bandwidth
Memory-Optimized
$84 per month
2 CPU
16GB Memory
50GB SSD Disk
4TB Bandwidth
Storage-Optimized Regular
$131 per month
2 CPU
16GB Memory
300GB NVMe SSD Disk
4TB Bandwidth

For the authentication, to make it straight-forward, select Password. From here, you need to enter the root password.

You may also customize the hostname of your droplet or leave it as is. Once, done you can now click Create Droplet.

It will take time to create the droplet, once completed you will be able to get its IP Address. You will need this to access your server through a command prompt.

How to Create Vultr Server

For Vultr, to deploy a server go to the Products page then click the blue + button at the right corner of the page, click Deploy New Server.

From here, pick the type of server you want, below are the list of minimum specs that you can choose, you may also pick higher specs. You must also pick a server location that are nearest to you for lower ping.

ServerTypeSpecs
Cloud Compute
$10 per month
Shared1 CPU
2GB Memory
2TB Bandwidth
55GB SSD Storage
High Frequency
$12 per month
Shared1 CPU
2GB Memory
2TB Bandwidth
64GB NVMe SSD Storage
Dedicated Cloud
$60 per month
Dedicated2 CPUs
8GB Memory
10TB Bandwidth
120GB SSD Storage

For Server Type, make sure to pick Ubuntu 22.10 x64. Then enter your root Password, your Server Hostname and Label. Once done, click Deploy Now.

Setting up Valheim Server

To open up your server, we need to use the Command Prompt (CMD) which has a built-in SSH command for Windows 11. Make sure you already have the public IP Address of the server you have created from Digital Ocean or Vultr server. Then run this command, make sure to enter the correct server password you have choose while creating the server:

ssh root@YOUR_SERVER_IPADDRESS

You will then be able to enter your server. Now, we have to install some important library into our server that will allows us to install the Steam SDK.

sudo dpkg --add-architecture i386

After that, we can now update and upgrade our server to the latest packages. If it asked for a confirmation, just type -y then press Enter in your keyboard.

sudo apt update && sudo apt upgrade -y

While updating, there might some files that requires for an update. For this case, just select the default values. Like for Configuring openssh-server, just select the default value “Keep the local version currently installed” and for Pending Kernel upgrade, just select OK, “cron.service”, etc..

(Optional) For those who wants to enable cross play, allowing console players to join in the server. You need to install additional libraries (Thanks to Gregory for this guide)

sudo apt-get install libpulse0 libpulse-dev libatomic1 libc6 -y

Once our server is fully updated, we can then install the Steam SDK:

sudo apt-get install steamcmd -y

To accept the terms and condition, press the right arrow keys to select <OK>, then press Enter.

Then select, I AGREE and press Enter. If it asked for package update, just select the default values.

To safeguard our server, we need to create a new user called “steam” that will run exclusively our Valheim server without using the root access (sudo). To create a user, just run this command and enter a password. When asked for Full name, just input Steam and leave other details blank.

sudo adduser steam

Now that we have created the steam user in our server, we can now logout our root access.

exit

Installing Valheim Server

We have now setup our server and created a steam user. We can now install the Valheim in our server. Login back to the server again, but this time using the steam user.

ssh steam@YOUR_SERVER_IPADDRESS

We then need to create a symbolic link for our SteamCMD command.

ln -s /usr/games/steamcmd steamcmd

and create a folder for our Valheim server files inside the steam directory.

mkdir /home/steam/valheim

We will now the download and install the Valheim server, this will take time some minutes to complete (3 to 10 minutes). If you received an error ILocalized::Addfile() failed to load file “public/steambootstrapper_english.txt”, just ignore it.

/home/steam/steamcmd +login anonymous +force_install_dir /home/steam/valheim +app_update 896660 validate +exit

After that, we need to set up a separate configuration file because the default default configuration start_server.sh are being replaced with default file by Steam every time our server is loaded erasing our own configuration. To avoid this from happening, we will be using start_valheim.sh instead.

cp /home/steam/valheim/start_server.sh /home/steam/valheim/start_valheim.sh

Let’s edit the file start_valheim.sh with VIM. For those who are new to VIM, it is a text editor for command prompt.

vim /home/steam/valheim/start_valheim.sh

To use VIM, press I to enter the insert mode which allows you to edit the file just like a notepad. In case you accidentally enter other mode, just press ESC.

Then change the file with this configuration. Don’t forget to change the place holders:

  • YOUR_VALHEIM_SERVER_NAME – This will be the name that will appear on the Community Server list in Valheim.
  • YOUR_WORLD_NAME – Generated maps will depends on this name.
  • YOUR_PASSWORD – Password to your Valheim server, this is the password that you’ll give to other players in order for them to join.

(If you want to copy and paste the text above, to paste on VIM, make sure you’re in INSERT mode – press right click on your mouse).

#!/bin/bash
export templdpath=$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=./linux64:$LD_LIBRARY_PATH
export SteamAppId=892970

echo "Starting server PRESS CTRL-C to exit"

# Tip: Make a local copy of this script to avoid it being overwritten by steam.
# NOTE: Minimum password length is 5 characters & Password cant be in the server name.
# NOTE: You need to make sure the ports 2456-2458 is being forwarded to your server through your local router & firewall.
./valheim_server.x86_64 -name "YOUR_VALHEIM_SERVERNAME" -port 2456 -nographics -batchmode -world "YOUR_WORLD_NAME" -password "YOUR_PASSWORD" -public 1

export LD_LIBRARY_PATH=$templdpath

(Optional) If you want to enable crossplay, just add -crossplay in the line ./valheim_server.x86_64. It should look like:

./valheim_server.x86_64 -name "YOUR_VALHEIM_SERVERNAME" -port 2456 -nographics -batchmode -world "YOUR_WORLD_NAME" -password "YOUR_PASSWORD" -public 1 -crossplay

Here are some explaination on server configuration:

  • nographics – The server will not render the game visually, making it more CPU and memory efficient.
  • batchmode – The server will run in the background.
  • public – Values either 1 or 0, if you want to display your server in-game publicly.
  • crossplay – Enable crossplay between PC and Consoles (Optional)

After that, press ESC from your keyboard then type !wq to exit and save the text editor.

Run the Valheim Server

Since we already installed the steam files, we can now go back to our root user and apply important file permission. To gain root access, just type the commands below. You then need to enter your server’s password.

su -

In order for start_valheim.sh to be executable, we need to add permission on it.

chmod +x /home/steam/valheim/start_valheim.sh

From here, you can already start running the server – if you wish to test it (This is optional, we recommend completing the other step before running to save time – to close the running program, just press CTRL + C):

cd /home/steam/valheim
./start_valheim.sh

To run our Valheim server on startup, we have to add it to the service, create a file called valheim.service inside the system directory.

vim /lib/systemd/system/valheim.service

Now, add these codes. Press I from your keyboard to enter Insert mode and paste the following text (To paste in vim, right-click on mouse). To save and exit, press ESC then type wq! to exit the text editor.

[Unit]
Description=Valheim Server

[Service]
User=steam
WorkingDirectory=/home/steam/valheim
Type=simple
Restart=on-failure
RestartSec=5
StartLimitInterval=60s
StartLimitBurst=3
User=steam
Group=steam
ExecStartPre=/home/steam/steamcmd +login anonymous +force_install_dir /home/steam/valheim +app_update 896660 validate +exit
ExecStart=/home/steam/valheim/start_valheim.sh
ExecStop=/bin/killall -TERM valheim_server
LimitNOFILE=100000

[Install]
WantedBy=multi-user.target

After that we have to reload our daemon to reflect the changes. Then enable valheim at startup. Lastly, run our server for the first time.

systemctl daemon-reload
systemctl enable valheim.service
systemctl start valheim

To check if its running, use this command to check it’s status. It will take time to initialize the server about (1 to 2 minutes). When you see the message “Game server connected”, this means it is completed and your player can connect now to the server.

watch systemctl status valheim

Here are the important commands that you can use in case you encounter some problem halfway.

  • systemctl start valheim – Start the Valheim Server.
  • systemctl stop valheim – Stop the Valheim Server from running.
  • systemctl restart valheim – Restart the Valheim Server, useful when you do changes on the settings.

If you got an error, you can enter journalctl -e then paste the log on the comment section below so we can help you troubleshoot for any problem.

You can also check our separate guide on setting up Domain Name for Valheim Dedicated Server, which allows you to join the server with memorable words instead of IP addresses.

How to connect to our Valheim Dedicated Server

We have now a working server, what else we need to do is on how to connect into our server. For us to invite our friends to join and play together. Open up Valheim, then click the Start button.

Click the Join Game tab, then at the bottom select the option Community, then press Join IP.

Enter your server’s ip address with these format:

YOUR_IPADDRESS:2456

Wait until it is connected and enter the server password to connect to the game.

If your server is not listed on the Community tab, there are some reason why it is not listed. First, the server is not near your region. For example, if you’re in the Philippines and your server is in United States, players in SouthEast Asia region will not able to see your server at the Community tab. But if your server is located in SEA region like Singapore, Japan, Hong-Kong or Philippines, you server will be listed for players in that region.

Assign Admin access to your Character

To give you complete control not just on your server but as well as in the game, you can assign your Valheim account character as an admin on it. You simply need to the Steam ID in the file adminlist.txt.

You can find your SteamID in-game, as well as for other player by pressing F2. The UID on the players list is the Steam ID of that player.

Since you already have the SteamID you can then add it on the adminlist text.

vim ~/.config/unity3d/IronGate/Valheim/adminlist.txt

In the vim text editor, just add the Steam ID at the bottom. Save the file !wq. Don’t forget to restart your server.

systemctl restart valheim

To use your admin control, in-game just press F5 and you can execute the following command as admin.

  • kick [name/ip/userID] – ban player
  • ban [name/ip/userID] – ban player
  • unban [ip/userID] – unban player
  • banned – List of all banned players

Update: The admin access is not yet available on the game. To banned users, you need to manually add it on bannedlist.txt and adminlist.txt.

How to back up and restore World Server Data

Just like the client side where your map data is located on users directory. For server side, it keeps on the default directory ~/.config/unity3d/IronGate/Valheim.

If you want to back up these file into your computer or transfer it to other server. You can use scp command to copy it. (Note: the CMD must not be connected from your server. To make sure you’re not connected, open up a new Command Prompt)

First, we need to create a folder into your computer. Or you can skip this and use your existing folder.

mkdir C:\YOUR_FOLDER_BACKUP

We can then download the file and transfer it directly into your computer.

scp -r root@YOUR_SERVER_IPADDRESS:/home/steam/.config/unity3d/IronGate C:\YOUR_FOLDER_BACKUP

To restore the data, first we need to stop our server first. You need to login into your server.

ssh root@YOUR_SERVER_IPADDRESS

Then run the stop server command. Then exit from your server.

systemctl stop valheim
exit

Then just interchange the path on our backup command. This will automatically transfer all files from your backup folder directly to your server’s world data.

scp -r C:\YOUR_FOLDER_BACKUP root@YOUR_SERVER_IPADDRESS:/home/steam/.config/unity3d/IronGate

Don’t forget to start your valheim to see the restored world data.

ssh root@YOUR_SERVER_IPADDRESS
systemctl start valheim

How to Update Valheim Dedicated Server

For maintenance and updates, it is also important to make your server up to date incase Valheim will drop a huge update into the game. To update to the latest version, simply run the following commands.

/home/steam/steamcmd +login anonymous +force_install_dir /home/steam/valheim +app_update 896660 validate +exit

Do not forget to restart your server after the update installation is completed.

systemctl restart valheim

Firewall for Security

To protect your server from unwanted attempted login or brute force. You can enable a firewall into your server.

DigitalOcean and Vultr has a firewall web interface directly from their dashboard. You can then attached this firewall into your server. If you’re using your Valheim server as a game server only, we just need to enable access to the UDP port 2456-2458 for our server to work. Other port is not needed except for port 22 for SSH.

DigitalOcean Firewall

For DigitalOcean, go to Manage > Networking > Firewalls. Then press the Create Firewall button.

At Inbound Rules, click the new rule dropdown menu and select Custom. It will then populate the other settings, select UDP as Protocol, then at the Port Range enter 2456-2458. (Optional) You may also restrict other IP addresses to access your SSH server. This is by removing All IPv4 and All IPv6 at the SSH Sources. Then enter your public IP address on it.

At the Apply to Droplets, search and select your Droplet Server. Then click the Create Firewall to apply the firewall.

Vultr Firewall

For Vultr, go to Products > Firewall. Then hover the + and click Add Firewall Group. Name your firewall and click the Add Firewall Group button.

At the IPv4 Rules, we have to give access first to our SSH server, the default value is for SSH, just press + to add it. (Optional) You can also restrict access to your SSH server exclusively to your IP address only. To do that, at Sources, just click My IP then press + to apply.

At the IPv4 Rules, there should be a dropdown from the list where you can add a new rule. Click the dropdown for Protocol and select UDP, at Port (or range) enter 2456-2458 then click the + button.

To apply it into your server, go to the Products > Instances then click your Server. Then at Settings > Firewall. From the dropdown menu select the Firewall that you just created. Then click Update Firewall Group to complete.

The changes will take effect within 120 seconds.

Troubleshooting

If you received an error saying Failed to start Valheim just like below, you need to make sure that the path names and spelling are correct in both start_valheim.sh and /lib/systemd/system/valheim.service.

× valheim.service - Valheim Server
     Loaded: loaded (/lib/systemd/system/valheim.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Tue 2023-05-23 02:35:18 UTC; 1min 27s ago
   Duration: 9ms
    Process: 22726 ExecStartPre=/home/steam/steamcmd +login anonymous +force_install_dir /home/steam/valheim +app_update 896660 validate +ex>
    Process: 22747 ExecStart=/home/steam/valheim/start_valheim.sh (code=exited, status=2)
   Main PID: 22747 (code=exited, status=2)
        CPU: 5.892s

May 23 02:35:13 ubuntu-valheim systemd[1]: valheim.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
May 23 02:35:13 ubuntu-valheim systemd[1]: valheim.service: Failed with result 'exit-code'.
May 23 02:35:13 ubuntu-valheim systemd[1]: valheim.service: Consumed 5.892s CPU time.
May 23 02:35:18 ubuntu-valheim systemd[1]: valheim.service: Scheduled restart job, restart counter is at 1.
May 23 02:35:18 ubuntu-valheim systemd[1]: Stopped Valheim Server.
May 23 02:35:18 ubuntu-valheim systemd[1]: valheim.service: Consumed 5.892s CPU time.
May 23 02:35:18 ubuntu-valheim systemd[1]: valheim.service: Start request repeated too quickly.
May 23 02:35:18 ubuntu-valheim systemd[1]: valheim.service: Failed with result 'exit-code'.
May 23 02:35:18 ubuntu-valheim systemd[1]: Failed to start Valheim Server.
Article Tags:
Article Categories:
Guide · How To

Comments

  • David FAIVRE-MAÇON March 27, 2021 1:09 pm

    thanks, great article, but my server often restarts, any idea? it’s a digitalOcean droplet 1cpu, 2go, even when I play alone it retarts

    Reply
    • Erwin Bantilan March 27, 2021 11:43 pm

      Hi David,

      can you send us the information when you enter this command: journalctl -e

      Reply
  • David FAIVRE-MAÇON March 28, 2021 10:31 pm

    sorry, i’m upgrade my server to 2cpu and 4go, it works now…

    Reply
  • SplunkyGamer April 29, 2021 3:25 pm

    root@ValheimDroplet:~# systemctl stop valheim
    root@ValheimDroplet:~# systemctl start valheim
    root@ValheimDroplet:~# systemctl status valheim
    ● valheim.service – Valheim Server
    Loaded: loaded (/lib/systemd/system/valheim.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Thu 2021-04-29 15:23:27 UTC; 1min 10s ago
    Process: 37017 ExecStartPre=/home/steam/steamcmd +login anonymous +force_install_dir /home/steam/valheim +app_updat>
    Process: 37050 ExecStart=/home/steam/valheim/start_valheim.sh (code=exited, status=203/EXEC)
    Main PID: 37050 (code=exited, status=203/EXEC)

    Apr 29 15:23:27 ValheimDroplet systemd[1]: valheim.service: Scheduled restart job, restart counter is at 3.
    Apr 29 15:23:27 ValheimDroplet systemd[1]: Stopped Valheim Server.
    Apr 29 15:23:27 ValheimDroplet systemd[1]: valheim.service: Start request repeated too quickly.
    Apr 29 15:23:27 ValheimDroplet systemd[1]: valheim.service: Failed with result ‘exit-code’.
    Apr 29 15:23:27 ValheimDroplet systemd[1]: Failed to start Valheim Server.

    not sure why its failing

    Reply
  • SplunkyGamer April 29, 2021 6:10 pm

    ● valheim.service – Valheim Server
    Loaded: loaded (/lib/systemd/system/valheim.service; enabled; vendor preset: enabled)
    Active: active (running) since Thu 2021-04-29 18:00:12 UTC; 7min ago
    Process: 38630 ExecStartPre=/home/steam/steamcmd +login anonymous +force_install_dir /home/steam/ValheimDedicatedSe>
    Main PID: 38668 (start_valheim.s)
    Tasks: 24 (limit: 1137)
    Memory: 606.1M
    CGroup: /system.slice/valheim.service
    ├─38668 /bin/sh /home/steam/ValheimDedicatedServer/start_valheim.sh
    └─38669 /home/steam/ValheimDedicatedServer/valheim_server.x86_64 -name SplunkyGod -port 2456 -world Algaro>

    Apr 29 18:00:12 ValheimDroplet start_valheim.sh[38669]: NullGfxDevice:
    Apr 29 18:00:12 ValheimDroplet start_valheim.sh[38669]: Version: NULL 1.0 [1.0]
    Apr 29 18:00:12 ValheimDroplet start_valheim.sh[38669]: Renderer: Null Device
    Apr 29 18:00:12 ValheimDroplet start_valheim.sh[38669]: Vendor: Unity Technologies
    Apr 29 18:00:12 ValheimDroplet start_valheim.sh[38669]: Begin MonoManager ReloadAssembly
    Apr 29 18:00:12 ValheimDroplet start_valheim.sh[38669]: – Completed reload, in 0.139 seconds
    Apr 29 18:00:12 ValheimDroplet start_valheim.sh[38669]: UnloadTime: 2.749268 ms
    Apr 29 18:00:12 ValheimDroplet start_valheim.sh[38669]: 04/29/2021 18:00:12: Starting to load scene:start
    Apr 29 18:00:12 ValheimDroplet start_valheim.sh[38669]:
    Apr 29 18:00:12 ValheimDroplet start_valheim.sh[38669]: (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

    Its seems like I got the status fail issue sorted, I had just copy pasted what was given in this article I had to jsut change my actual path which was ValheimDedicatedServer.

    My problem now is it doesnt connect to the server, it shows fail to connect popup and when I check the player logs it shows

    Got problem 5003:Timed out attempting to connect

    got it from player.log

    Reply
  • SplunkyGamer April 30, 2021 6:33 am

    I just checked its getting restarted, 1cpu and 1gb wont work on this. hmmm, 2 cpu and 4gb seems expensive to me. I would rather setup a raspberry pi 4 and do port forwarding to it to get it working I guess. This article really was helpful. Thanks Guys.
    Anybody setting it up u will need to config mentioned by David FAIVRE-MAÇON. It should work flawlessly with that.

    Reply
  • Harry November 23, 2021 10:25 am

    Thanks for the clear tutorial. I am getting this error in my journalctl -e:

    Nov 23 10:13:22 ubuntu-s-1vcpu-2gb-lon1-01 systemd[1]: Stopped Valheim Server.
    Nov 23 10:13:22 ubuntu-s-1vcpu-2gb-lon1-01 systemd[1]: Starting Valheim Server…
    Nov 23 10:13:23 ubuntu-s-1vcpu-2gb-lon1-01 steamcmd[2747]: Redirecting stderr to ‘/home/steam/.steam/logs/stderr.txt’
    Nov 23 10:13:23 ubuntu-s-1vcpu-2gb-lon1-01 steamcmd[2747]: [ 0%] Checking for available updates…
    Nov 23 10:13:23 ubuntu-s-1vcpu-2gb-lon1-01 steamcmd[2747]: [—-] Verifying installation…
    Nov 23 10:13:23 ubuntu-s-1vcpu-2gb-lon1-01 steamcmd[2747]: Steam Console Client (c) Valve Corporation – version 1637358658
    Nov 23 10:13:23 ubuntu-s-1vcpu-2gb-lon1-01 steamcmd[2747]: — type ‘quit’ to exit —
    Nov 23 10:13:23 ubuntu-s-1vcpu-2gb-lon1-01 steamcmd[2747]: Loading Steam API…OK
    Nov 23 10:13:24 ubuntu-s-1vcpu-2gb-lon1-01 steamcmd[2747]: Connecting anonymously to Steam Public…OK
    Nov 23 10:13:24 ubuntu-s-1vcpu-2gb-lon1-01 steamcmd[2747]: Waiting for client config…OK
    Nov 23 10:13:25 ubuntu-s-1vcpu-2gb-lon1-01 steamcmd[2747]: Waiting for user info…OK
    Nov 23 10:13:25 ubuntu-s-1vcpu-2gb-lon1-01 steamcmd[2747]: Please use force_install_dir before logon!
    Nov 23 10:13:29 ubuntu-s-1vcpu-2gb-lon1-01 steamcmd[2747]: Update state (0x5) verifying install, progress: 0.40 (4194304 / 1058918819)
    Nov 23 10:13:29 ubuntu-s-1vcpu-2gb-lon1-01 steamcmd[2747]: Update state (0x5) verifying install, progress: 41.76 (442188419 / 1058918819)
    Nov 23 10:13:29 ubuntu-s-1vcpu-2gb-lon1-01 steamcmd[2747]: Update state (0x5) verifying install, progress: 98.23 (1040193654 / 1058918819)
    Nov 23 10:13:29 ubuntu-s-1vcpu-2gb-lon1-01 steamcmd[2747]: Success! App ‘896660’ fully installed.
    Nov 23 10:13:29 ubuntu-s-1vcpu-2gb-lon1-01 systemd[1]: Started Valheim Server.
    Nov 23 10:13:29 ubuntu-s-1vcpu-2gb-lon1-01 start_valheim.sh[2766]: Starting server PRESS CTRL-C to exit
    Nov 23 10:13:29 ubuntu-s-1vcpu-2gb-lon1-01 start_valheim.sh[2767]: /home/steam/valheim/start_valheim.sh: 12: ./valheim_server.x86_64: not found
    Nov 23 10:13:29 ubuntu-s-1vcpu-2gb-lon1-01 killall[2768]: valheim_server: no process found
    Nov 23 10:13:29 ubuntu-s-1vcpu-2gb-lon1-01 systemd[1]: valheim.service: Control process exited, code=exited, status=1/FAILURE
    Nov 23 10:13:29 ubuntu-s-1vcpu-2gb-lon1-01 systemd[1]: valheim.service: Failed with result ‘exit-code’.
    Nov 23 10:13:34 ubuntu-s-1vcpu-2gb-lon1-01 systemd[1]: valheim.service: Scheduled restart job, restart counter is at 3.
    Nov 23 10:13:34 ubuntu-s-1vcpu-2gb-lon1-01 systemd[1]: Stopped Valheim Server.
    Nov 23 10:13:34 ubuntu-s-1vcpu-2gb-lon1-01 systemd[1]: valheim.service: Start request repeated too quickly.
    Nov 23 10:13:34 ubuntu-s-1vcpu-2gb-lon1-01 systemd[1]: valheim.service: Failed with result ‘exit-code’.
    Nov 23 10:13:34 ubuntu-s-1vcpu-2gb-lon1-01 systemd[1]: Failed to start Valheim Server.

    Any suggestions?

    Reply
    • Brian C Birdsong January 28, 2022 5:39 pm

      Did you happen to resolve your status=1 failure?

      Reply
  • M.M December 27, 2021 9:52 pm

    Hi,
    I just setup my valheim server, it is active but when I want to join it ingame it’s loading for a second, afterwards I’ll get back to main screen without a password confirmation and the Error “Failed to connect”

    Here is my journal, hope you can help me 🙂

    Thanks in advance!

    root@vultr:~# journalctl -e
    Dec 27 21:44:05 vultr start_valheim.sh[15999]: (Filename: Line: 91)
    Dec 27 21:44:06 vultr kernel: [UFW BLOCK] IN=enp1s0 OUT= MAC=56:00:03:c2:cb:a0:fe:00:03:c2:cb:a0:08:00 SRC=45.134.26.237 DST=108.61.179.187 LEN=40 TOS=0x00 PREC=0x00 TTL=246 ID=24068 PROTO=TCP SPT=40485 DPT=56027 WINDOW=1024 RE>Dec 27 21:44:22 vultr sshd[16023]: Unable to negotiate with 165.232.94.240 port 53336: no matching key exchange method found. Their offer: diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha>Dec 27 21:44:32 vultr kernel: [UFW BLOCK] IN=enp1s0 OUT= MAC=56:00:03:c2:cb:a0:fe:00:03:c2:cb:a0:08:00 SRC=45.143.200.34 DST=108.61.179.187 LEN=40 TOS=0x00 PREC=0x00 TTL=247 ID=65464 PROTO=TCP SPT=54763 DPT=22400 WINDOW=1024 RE>Dec 27 21:44:44 vultr kernel: [UFW BLOCK] IN=enp1s0 OUT= MAC=56:00:03:c2:cb:a0:fe:00:03:c2:cb:a0:08:00 SRC=45.143.200.34 DST=108.61.179.187 LEN=40 TOS=0x00 PREC=0x00 TTL=247 ID=44073 PROTO=TCP SPT=54763 DPT=24193 WINDOW=1024 RE>Dec 27 21:44:47 vultr kernel: [UFW BLOCK] IN=enp1s0 OUT= MAC=56:00:03:c2:cb:a0:fe:00:03:c2:cb:a0:08:00 SRC=159.223.91.89 DST=108.61.179.187 LEN=96 TOS=0x00 PREC=0x00 TTL=51 ID=31037 DF PROTO=UDP SPT=19248 DPT=8080 LEN=76
    Dec 27 21:45:04 vultr kernel: [UFW BLOCK] IN=enp1s0 OUT= MAC=56:00:03:c2:cb:a0:fe:00:03:c2:cb:a0:08:00 SRC=45.143.200.34 DST=108.61.179.187 LEN=40 TOS=0x00 PREC=0x00 TTL=247 ID=6182 PROTO=TCP SPT=54763 DPT=22615 WINDOW=1024 RES>Dec 27 21:45:26 vultr kernel: [UFW BLOCK] IN=enp1s0 OUT= MAC=56:00:03:c2:cb:a0:fe:00:03:c2:cb:a0:08:00 SRC=45.143.200.34 DST=108.61.179.187 LEN=40 TOS=0x00 PREC=0x00 TTL=247 ID=56740 PROTO=TCP SPT=54763 DPT=23014 WINDOW=1024 RE>Dec 27 21:45:46 vultr kernel: [UFW BLOCK] IN=enp1s0 OUT= MAC=56:00:03:c2:cb:a0:fe:00:03:c2:cb:a0:08:00 SRC=2.57.122.74 DST=108.61.179.187 LEN=40 TOS=0x00 PREC=0x00 TTL=244 ID=54321 PROTO=TCP SPT=60510 DPT=81 WINDOW=65535 RES=0x>Dec 27 21:45:50 vultr sshd[16026]: Unable to negotiate with 165.232.94.240 port 54548: no matching key exchange method found. Their offer: diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha>Dec 27 21:46:11 vultr kernel: [UFW BLOCK] IN=enp1s0 OUT= MAC=56:00:03:c2:cb:a0:fe:00:03:c2:cb:a0:08:00 SRC=89.248.168.41 DST=108.61.179.187 LEN=40 TOS=0x00 PREC=0x00 TTL=246 ID=54321 PROTO=TCP SPT=54976 DPT=8880 WINDOW=65535 RE>Dec 27 21:46:17 vultr su[16029]: (to root) steam on pts/0
    Dec 27 21:46:17 vultr su[16029]: pam_unix(su-l:session): session opened for user root by steam(uid=0)
    Dec 27 21:46:19 vultr su[16039]: (to root) steam on pts/0
    Dec 27 21:46:19 vultr su[16039]: pam_unix(su-l:session): session opened for user root by steam(uid=0)
    Dec 27 21:46:23 vultr kernel: [UFW BLOCK] IN=enp1s0 OUT= MAC=56:00:03:c2:cb:a0:fe:00:03:c2:cb:a0:08:00 SRC=78.128.113.218 DST=108.61.179.187 LEN=40 TOS=0x00 PREC=0x00 TTL=247 ID=23472 PROTO=TCP SPT=50446 DPT=38386 WINDOW=1024 R>Dec 27 21:46:41 vultr sshd[16050]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=206.189.145.18 user=root
    Dec 27 21:46:43 vultr sshd[16050]: Failed password for root from 206.189.145.18 port 38784 ssh2
    Dec 27 21:46:46 vultr sshd[16050]: Received disconnect from 206.189.145.18 port 38784:11: Bye Bye [preauth]
    Dec 27 21:46:46 vultr sshd[16050]: Disconnected from authenticating user root 206.189.145.18 port 38784 [preauth]
    Dec 27 21:46:47 vultr kernel: [UFW BLOCK] IN=enp1s0 OUT= MAC=56:00:03:c2:cb:a0:fe:00:03:c2:cb:a0:08:00 SRC=193.3.19.32 DST=108.61.179.187 LEN=40 TOS=0x00 PREC=0x00 TTL=247 ID=48071 PROTO=TCP SPT=51560 DPT=2530 WINDOW=1024 RES=0>Dec 27 21:47:11 vultr systemd[1]: Reloading.
    Dec 27 21:47:13 vultr sshd[16082]: Unable to negotiate with 165.232.94.240 port 55660: no matching key exchange method found. Their offer: diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha>Dec 27 21:47:21 vultr systemd[1]: Reloading.
    Dec 27 21:47:27 vultr kernel: [UFW BLOCK] IN=enp1s0 OUT= MAC=56:00:03:c2:cb:a0:fe:00:03:c2:cb:a0:08:00 SRC=185.112.83.47 DST=108.61.179.187 LEN=40 TOS=0x00 PREC=0x00 TTL=246 ID=54321 PROTO=TCP SPT=52495 DPT=8332 WINDOW=65535 RE>Dec 27 21:47:35 vultr kernel: [UFW BLOCK] IN=enp1s0 OUT= MAC=56:00:03:c2:cb:a0:fe:00:03:c2:cb:a0:08:00 SRC=159.89.152.226 DST=108.61.179.187 LEN=40 TOS=0x00 PREC=0x00 TTL=244 ID=30993 PROTO=TCP SPT=50413 DPT=1443 WINDOW=1024 RE>Dec 27 21:47:43 vultr kernel: [UFW BLOCK] IN=enp1s0 OUT= MAC=56:00:03:c2:cb:a0:fe:00:03:c2:cb:a0:08:00 SRC=193.3.19.32 DST=108.61.179.187 LEN=40 TOS=0x00 PREC=0x00 TTL=246 ID=3665 PROTO=TCP SPT=51560 DPT=2544 WINDOW=1024 RES=0x>lines 975-1001/1001 (END)
    Dec 27 21:44:05 vultr start_valheim.sh[15999]: (Filename: Line: 91)
    Dec 27 21:44:06 vultr kernel: [UFW BLOCK] IN=enp1s0 OUT= MAC=56:00:03:c2:cb:a0:fe:00:03:c2:cb:a0:08:00 SRC=45.134.26.237 DST=108.61.179.187 LEN=40 TOS=0x00 PREC=0x00 TTL=246 ID=24068 PROTO=TCP SPT=40485 DPT=56027 WINDOW=1024 RES=0x00 SYN URGP=0
    Dec 27 21:44:22 vultr sshd[16023]: Unable to negotiate with 165.232.94.240 port 53336: no matching key exchange method found. Their offer: diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1 [preauth]
    Dec 27 21:44:32 vultr kernel: [UFW BLOCK] IN=enp1s0 OUT= MAC=56:00:03:c2:cb:a0:fe:00:03:c2:cb:a0:08:00 SRC=45.143.200.34 DST=108.61.179.187 LEN=40 TOS=0x00 PREC=0x00 TTL=247 ID=65464 PROTO=TCP SPT=54763 DPT=22400 WINDOW=1024 RES=0x00 SYN URGP=0
    Dec 27 21:44:44 vultr kernel: [UFW BLOCK] IN=enp1s0 OUT= MAC=56:00:03:c2:cb:a0:fe:00:03:c2:cb:a0:08:00 SRC=45.143.200.34 DST=108.61.179.187 LEN=40 TOS=0x00 PREC=0x00 TTL=247 ID=44073 PROTO=TCP SPT=54763 DPT=24193 WINDOW=1024 RES=0x00 SYN URGP=0
    Dec 27 21:44:47 vultr kernel: [UFW BLOCK] IN=enp1s0 OUT= MAC=56:00:03:c2:cb:a0:fe:00:03:c2:cb:a0:08:00 SRC=159.223.91.89 DST=108.61.179.187 LEN=96 TOS=0x00 PREC=0x00 TTL=51 ID=31037 DF PROTO=UDP SPT=19248 DPT=8080 LEN=76
    Dec 27 21:45:04 vultr kernel: [UFW BLOCK] IN=enp1s0 OUT= MAC=56:00:03:c2:cb:a0:fe:00:03:c2:cb:a0:08:00 SRC=45.143.200.34 DST=108.61.179.187 LEN=40 TOS=0x00 PREC=0x00 TTL=247 ID=6182 PROTO=TCP SPT=54763 DPT=22615 WINDOW=1024 RES=0x00 SYN URGP=0
    Dec 27 21:45:26 vultr kernel: [UFW BLOCK] IN=enp1s0 OUT= MAC=56:00:03:c2:cb:a0:fe:00:03:c2:cb:a0:08:00 SRC=45.143.200.34 DST=108.61.179.187 LEN=40 TOS=0x00 PREC=0x00 TTL=247 ID=56740 PROTO=TCP SPT=54763 DPT=23014 WINDOW=1024 RES=0x00 SYN URGP=0
    Dec 27 21:45:46 vultr kernel: [UFW BLOCK] IN=enp1s0 OUT= MAC=56:00:03:c2:cb:a0:fe:00:03:c2:cb:a0:08:00 SRC=2.57.122.74 DST=108.61.179.187 LEN=40 TOS=0x00 PREC=0x00 TTL=244 ID=54321 PROTO=TCP SPT=60510 DPT=81 WINDOW=65535 RES=0x00 SYN URGP=0
    Dec 27 21:45:50 vultr sshd[16026]: Unable to negotiate with 165.232.94.240 port 54548: no matching key exchange method found. Their offer: diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1 [preauth]
    Dec 27 21:46:11 vultr kernel: [UFW BLOCK] IN=enp1s0 OUT= MAC=56:00:03:c2:cb:a0:fe:00:03:c2:cb:a0:08:00 SRC=89.248.168.41 DST=108.61.179.187 LEN=40 TOS=0x00 PREC=0x00 TTL=246 ID=54321 PROTO=TCP SPT=54976 DPT=8880 WINDOW=65535 RES=0x00 SYN URGP=0
    Dec 27 21:46:17 vultr su[16029]: (to root) steam on pts/0
    Dec 27 21:46:17 vultr su[16029]: pam_unix(su-l:session): session opened for user root by steam(uid=0)
    Dec 27 21:46:19 vultr su[16039]: (to root) steam on pts/0
    Dec 27 21:46:19 vultr su[16039]: pam_unix(su-l:session): session opened for user root by steam(uid=0)
    Dec 27 21:46:23 vultr kernel: [UFW BLOCK] IN=enp1s0 OUT= MAC=56:00:03:c2:cb:a0:fe:00:03:c2:cb:a0:08:00 SRC=78.128.113.218 DST=108.61.179.187 LEN=40 TOS=0x00 PREC=0x00 TTL=247 ID=23472 PROTO=TCP SPT=50446 DPT=38386 WINDOW=1024 RES=0x00 SYN URGP=0
    Dec 27 21:46:41 vultr sshd[16050]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=206.189.145.18 user=root
    Dec 27 21:46:43 vultr sshd[16050]: Failed password for root from 206.189.145.18 port 38784 ssh2
    Dec 27 21:46:46 vultr sshd[16050]: Received disconnect from 206.189.145.18 port 38784:11: Bye Bye [preauth]
    Dec 27 21:46:46 vultr sshd[16050]: Disconnected from authenticating user root 206.189.145.18 port 38784 [preauth]
    Dec 27 21:46:47 vultr kernel: [UFW BLOCK] IN=enp1s0 OUT= MAC=56:00:03:c2:cb:a0:fe:00:03:c2:cb:a0:08:00 SRC=193.3.19.32 DST=108.61.179.187 LEN=40 TOS=0x00 PREC=0x00 TTL=247 ID=48071 PROTO=TCP SPT=51560 DPT=2530 WINDOW=1024 RES=0x00 SYN URGP=0
    Dec 27 21:47:11 vultr systemd[1]: Reloading.
    Dec 27 21:47:13 vultr sshd[16082]: Unable to negotiate with 165.232.94.240 port 55660: no matching key exchange method found. Their offer: diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1 [preauth]
    Dec 27 21:47:21 vultr systemd[1]: Reloading.
    Dec 27 21:47:27 vultr kernel: [UFW BLOCK] IN=enp1s0 OUT= MAC=56:00:03:c2:cb:a0:fe:00:03:c2:cb:a0:08:00 SRC=185.112.83.47 DST=108.61.179.187 LEN=40 TOS=0x00 PREC=0x00 TTL=246 ID=54321 PROTO=TCP SPT=52495 DPT=8332 WINDOW=65535 RES=0x00 SYN URGP=0
    Dec 27 21:47:35 vultr kernel: [UFW BLOCK] IN=enp1s0 OUT= MAC=56:00:03:c2:cb:a0:fe:00:03:c2:cb:a0:08:00 SRC=159.89.152.226 DST=108.61.179.187 LEN=40 TOS=0x00 PREC=0x00 TTL=244 ID=30993 PROTO=TCP SPT=50413 DPT=1443 WINDOW=1024 RES=0x00 SYN URGP=0
    Dec 27 21:47:43 vultr kernel: [UFW BLOCK] IN=enp1s0 OUT= MAC=56:00:03:c2:cb:a0:fe:00:03:c2:cb:a0:08:00 SRC=193.3.19.32 DST=108.61.179.187 LEN=40 TOS=0x00 PREC=0x00 TTL=246 ID=3665 PROTO=TCP SPT=51560 DPT=2544 WINDOW=1024 RES=0x00 SYN URGP=0

    Reply
  • Bryan August 20, 2022 6:25 pm

    using Vulr 2Gb Ram Ubuntu 20.04 x64
    Cant get the server running

    root@valhiem:~# journalctl -e
    Aug 20 18:20:37 valhiem steamcmd[1060]: Update state (0x5) verifying install, progress: 97.77 (1194288919 / 1221551585)
    Aug 20 18:20:37 valhiem steamcmd[1060]: Success! App ‘896660’ fully installed.
    Aug 20 18:20:37 valhiem systemd[1]: Started Valheim Server.
    Aug 20 18:20:37 valhiem systemd[1192]: valheim.service: Failed to execute command: Exec format error
    Aug 20 18:20:37 valhiem systemd[1192]: valheim.service: Failed at step EXEC spawning /home/steam/valheim/start_valheim.>
    Aug 20 18:20:37 valhiem systemd[1]: valheim.service: Main process exited, code=exited, status=203/EXEC
    Aug 20 18:20:37 valhiem systemd[1]: valheim.service: Failed with result ‘exit-code’.
    Aug 20 18:20:37 valhiem kernel: [UFW BLOCK] IN=enp1s0 OUT= MAC=56:00:04:1c:87:5f:fe:00:04:1c:87:5f:08:00 SRC=122.96.75.>
    Aug 20 18:20:37 valhiem kernel: [UFW BLOCK] IN=enp1s0 OUT= MAC=56:00:04:1c:87:5f:fe:00:04:1c:87:5f:08:00 SRC=103.146.23>
    Aug 20 18:20:39 valhiem su[1185]: (to root) steam on pts/0
    Aug 20 18:20:39 valhiem su[1185]: pam_unix(su-l:session): session opened for user root by steam(uid=1001)
    Aug 20 18:20:42 valhiem systemd[1]: valheim.service: Scheduled restart job, restart counter is at 3.
    Aug 20 18:20:42 valhiem systemd[1]: Stopped Valheim Server.
    Aug 20 18:20:42 valhiem systemd[1]: valheim.service: Start request repeated too quickly.
    Aug 20 18:20:42 valhiem systemd[1]: valheim.service: Failed with result ‘exit-code’.
    Aug 20 18:20:42 valhiem systemd[1]: Failed to start Valheim Server.
    Aug 20 18:20:45 valhiem kernel: [UFW BLOCK] IN=enp1s0 OUT= MAC=56:00:04:1c:87:5f:fe:00:04:1c:87:5f:08:00 SRC=51.15.34.4>
    Aug 20 18:20:45 valhiem kernel: [UFW BLOCK] IN=enp1s0 OUT= MAC=56:00:04:1c:87:5f:fe:00:04:1c:87:5f:08:00 SRC=103.82.25.>
    Aug 20 18:20:49 valhiem sshd[1202]: Invalid user pc from 64.227.120.10 port 50470
    Aug 20 18:20:49 valhiem sshd[1202]: pam_unix(sshd:auth): check pass; user unknown
    Aug 20 18:20:49 valhiem sshd[1202]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= r>
    Aug 20 18:20:51 valhiem sshd[1202]: Failed password for invalid user pc from 64.227.120.10 port 50470 ssh2
    Aug 20 18:20:53 valhiem sshd[1202]: Received disconnect from 64.227.120.10 port 50470:11: Bye Bye [preauth]
    Aug 20 18:20:53 valhiem sshd[1202]: Disconnected from invalid user pc 64.227.120.10 port 50470 [preauth]
    Aug 20 18:20:59 valhiem kernel: [UFW BLOCK] IN=enp1s0 OUT= MAC=56:00:04:1c:87:5f:fe:00:04:1c:87:5f:08:00 SRC=89.248.165>
    Aug 20 18:21:01 valhiem sshd[1206]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= r>
    Aug 20 18:21:03 valhiem sshd[1206]: Failed password for root from 138.68.128.156 port 43910 ssh2
    Aug 20 18:21:05 valhiem sshd[1206]: Received disconnect from 138.68.128.156 port 43910:11: Bye Bye [preauth]
    Aug 20 18:21:05 valhiem sshd[1206]: Disconnected from authenticating user root 138.68.128.156 port 43910 [preauth]

    Reply
  • Gregory S August 23, 2023 8:11 am

    Thank you for this guide, it helped a lot! Leaving a comment because I faced a problem that is not mentioned here so far.
    I wanted to play my steam Valheim copy on a dedicated DO server with my friends on xbox (console), so I needed the server to be crossplay. To enable crossplay, I had to add -crossplay argument in the start_valheim.sh file (it can be added as the last argument after the -public 1 argument). I restarted the server and realized it doesn’t work anymore, the log was showing an endless cycle of this kind of messages:
    09/28/2022 09:05:51: Server ‘Testing’ begin PlayFab create and join network for server
    09/28/2022 09:06:15: PlayFab disconnect server ‘Testing’ from network
    09/28/2022 09:06:22: PlayFab reconnect server ‘Testing’

    What solved the problem for me:
    1. Stop Valheim
    2. Install these libraries:
    sudo apt install -y libpulse0 libpulse-dev libatomic1 libc6
    3. Start Valheim

    Reply
    • Erwin Bantilan August 23, 2023 11:38 am

      Thank you for this bro, added it on the article.

      Reply

Leave a Reply