Installing Dedicated VALHEIM Server on Ubuntu



In this video I’ll show you how to install a dedicated Valheim server on Ubuntu 18.04 Server. This is the configuration I use on my own dedicated Valheim server that I use for friends and family. It works very well!

I have it running in a VM on ESXi. The VM has 2 vCPU, 8GB RAM, and a 50GB harddisk backed by SSD.

Below are the commands I used during this video in case you don’t want to manually type them!

PLEASE update the customizable pieces, such as server name and passwords.

http://www.stopitsomemore.com/tutorials/valheim.txt

Disclaimer: This guide is for educational purposes only; you are responsible for the outcome of anything you performed because of this video.

Source

Categories N4G

26 thoughts on “Installing Dedicated VALHEIM Server on Ubuntu”

  1. I did all the commands but still i encountered issue Set current directory to /home/steam/valheimserver

    Found path: /home/steam/valheimserver/valheim_server.x86_64

    Mono path[0] = '/home/steam/valheimserver/valheim_server_Data/Managed'

    Mono config path = '/home/steam/valheimserver/valheim_server_Data/MonoBleedingEdge/etc'

    Preloaded 'libsteam_api.so'

    Initialize engine version: 2019.4.16f1 (e05b6e02d63e)

    [Subsystems] Discovering subsystems at path /home/steam/valheimserver/valheim_server_Data/UnitySubsystems

    Forcing GfxDevice: Null

    GfxDevice: creating device client; threaded=0

    NullGfxDevice:

    Version: NULL 1.0 [1.0]

    Renderer: Null Device

    Vendor: Unity Technologies

    Begin MonoManager ReloadAssembly

    – Completed reload, in 0.082 seconds

    UnloadTime: 0.654278 ms

    02/13/2021 02:24:26: Starting to load scene:start

    (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

    Couldn't create a Convex Mesh from source mesh "RearBig" within the maximum polygons limit (256). The partial hull will be used. Consider simplifying your mesh.

    (Filename: Line: 91)

    this is when i Ran the script start_valheim.sh manually,

    If i run the services it's running status and the top is running the valheim_server maybe it's working? but i cannot find the server in game,.

    Reply
  2. root@vmd41039:/# systemctl start valheimserver.service

    root@vmd41039:/# systemctl status valheimserver.service

    ● valheimserver.service – Valheim Server

    Loaded: loaded (/etc/systemd/system/valheimserver.service; disabled; vendor preset: enabled)

    Active: failed (Result: exit-code) since Sat 2021-02-13 12:08:05 CET; 2s ago

    Process: 10227 ExecStart=/home/steam/valheimserver/start_valheim.sh (code=exited, status=203/EXEC)

    Process: 10202 ExecStartPre=/home/steam/steamcmd +login anonymous +force_install_dir /home/steam/valheimserver +app_update 896660 validate +exit (

    Main PID: 10227 (code=exited, status=203/EXEC)

    Feb 13 12:08:05 vmd41039.contaboserver.net systemd[1]: valheimserver.service: Service hold-off time over, scheduling restart.

    Feb 13 12:08:05 vmd41039.contaboserver.net systemd[1]: valheimserver.service: Scheduled restart job, restart counter is at 3.

    Feb 13 12:08:05 vmd41039.contaboserver.net systemd[1]: Stopped Valheim Server.

    Feb 13 12:08:05 vmd41039.contaboserver.net systemd[1]: valheimserver.service: Start request repeated too quickly.

    Feb 13 12:08:05 vmd41039.contaboserver.net systemd[1]: valheimserver.service: Failed with result 'exit-code'.

    Feb 13 12:08:05 vmd41039.contaboserver.net systemd[1]: Failed to start Valheim Server.

    What i doing wrong?

    Reply
  3. what could be a reason for the server to not show up in the server list even tho it says active/running in terminal? could tcp/udp in port forwarding be the issue? or have i done something wrong in the shell scripts?

    Reply
  4. Guide is good, but after one of these steps i catch the miner named "kdevtmpfsi" on my server. I don't want to blame author, because guide is very intelligible, but one of downloads may be cause of infection. I found 100% cpu utilization exactly during installation. Obligatorily use "top" after installation. It's a pity, the author did not remember what can we use Docker-image with VALHEIM Server.

    Reply
  5. Thank you so much for this guide, at first I couldn't see my server, but its cause i had to open the ports on my vbox which then fixed everything. its working great for me. Running 2cpu with about 7gb ram mem and had a total of 7 people on at one time at one point and everything was fine and not laggy at all. with that said, is it possible if you could make a guide on how to manage the server, like how to restart, update, login as admin and issue commands, how to back up the world files every now and then, etc.. (for us plebs who havent run a dedicated server before). thanks again! subscribed and liked!

    Reply
  6. Hello, I've tried to mount this on ubuntu in google cloud but it's not showing when I open the game. The whole process was identical with no troubles. Can you point me in the right direction on how to solve this? Thanks

    Reply
  7. First of all, thank you for posting this. I got the server to work and we are able to play on it which is great.

    The only issue we have is that no one besides me and my wife can see the server in the server list. They get "server not responding" on the steam server favorites. Once we join it then our friends can join us and play with no issues.

    It is weird, I opened the ports on the router and through ufw on ubuntu 20.04. I tried putting the server in the routers DMZ to see if maybe it wasn't actually opening the ports. no joy.

    Any suggestions?

    Reply
  8. One thing I've noticed that people might run into, though I'm not sure why it's happening, is that the port count is always +1 of the one being set in the run file. Eg. If you set -port 2546, it will use port 2457, etc. (Maybe due to spawning multiple processes on the same port?) Not sure. Folks might be able to confirm this if you run "netstat -ul" in your terminal. I know it's not a big deal, but for some reason I can't see the server listed on anything but port 2456 despite ports 2456-2458 UDP being forwarded from my router, though my router is from my ISP and notorious for having a bad web UI. Just a tip in case people run into it! 🙂

    Reply
  9. Hey geekhead amazing job: where is the file that tracks steamID/Sessions ID for unique IPs so far tailing connection_log_XXX shows me something close to what i want but not exactly, do you know the location of the user connection log.

    Reply
  10. I see they released a patch last night (0.145.6). Any guide to update the server? Thanks!
    *EDIT*
    I re-read the guide and saw you included an auto-update service… I ran:
    # systemctl stop valheimserver
    # systemctl start valheimserver

    # systemctl status valheimserver

    # systemctl enable valheimserver

    Is this the correct procedure? Or is there a better way?

    Reply
  11. Fresh subscriber here. Geekhead, I recently created my own dedicated server on my Linux Mint box. I was part of the unlucky souls that had their power out due to the recent Winter storm. Because of the power outage, my world lost all the buildings my friends and I have built. What method do you use to backup your Valheim world? Maybe a future video? LOL!

    Reply
  12. I have rented a rootserver. Is it somehow possible to run two Valheim servers on it? Got one already running. I wonder what happens to the ports and so on? Would appreciate your help!
    Edit: Got it running by creating another user and changing the port to 2459. Now my question is if there is a possibility to restrict RAM and CPU usage so both server have the same amount of available resources.

    Reply

Leave a Comment