Valheim

Valheim

34 ratings
Valheim Dedicated Server in Linux for Ubuntu - Easy Installer
By zerobandwidth
Single installation script for setting up Valheim on a dedicated Linux server with steamcmd.
Tested on: AWS, Azure and DigitalOcean
OS - Ubuntu 18.06 LTS 64bit and Ubuntu 20.04 LTS
Recommended server settings: CPU: 4 (2 will work but meh) RAM: 8GB+ Harddrive: 250GB+
4
2
3
2
2
   
Award
Favorite
Favorited
Unfavorite
Install walkthrough
Never run any script on a production server, unless you know what you are doing.

Video:

Run as root(if brave enough) or sudo current user

How to update your Valheim Server

https://github.com/Nimdy/Dedicated_Valheim_Server_Script/issues/22

Added new Menu system for folks if you want to use that and not the script listed below.





1.Install GIT to pull down script
  • sudo apt-get install -y git net-tools

2.Change to OPT Dir
  • cd /opt

3.Clone GIT from Nimdy (Zero Bandwidth)

4.Change dir to Dedicated_Valheim_Server_Script
  • cd Dedicated_Valheim_Server_Script/

5.Allow script to execute
  • sudo chmod +x build_dedicated_valheim_server.sh

6.Change PASSWORDS and CHANGE ME AREAS before launching
  • sudo vi build_dedicated_valheim_server.sh

# There are 4 things you need to change!
# NOTE: Minimum password length is 5 characters & Password cant be in the server name.

  • userpassword="user_password" <---password for the new Linux User it creates
  • password="passw0rd" <---password for the Valheim Server Access
  • displayname="server display name" <---Public display name for server
  • worldname="111111111" <---local inside world name
#Save the file

7.Execute installation file
  • sudo ./build_dedicated_valheim_server.sh

8. A new version of /boot/grub/menu.lst promotx2 or DHCP - Accept Default (No)
  • Select keep the local version currently installed

9.Agree to STEAM LICENSE AGREEMENT
  • Select Ok
  • Select I Agree
  • Press Enter

10.Allow ports 2456,2457,2458 on your server
  • sudo ufw allow 2456:2458/tcp (not required but whatever)
  • sudo ufw allow 2456:2458/udp (REQUIRED)

11.Stop Valheim service
  • sudo systemctl stop valheimserver.service

12.Reboot Server for the lawls!
  • sudo reboot

13.Once your server comes back online wait 2-5 mins and check Valheim service
  • sudo systemctl status valheimserver.service


Congratz! You did it, now get out there and start exploring with your friends!!!

My script is here for you to take and make your own: https://github.com/Nimdy
< >
12 Comments
dgn 23 Feb @ 8:46am 
@zerobandwidth great guide thx to you I'm up 'n running ubuntu VM @ azure
zerobandwidth  [author] 23 Feb @ 8:40am 
@masgioo it could be a bunch of things. Jump into discord. We can help.

Normally, firewalls...proxies... passwords jacked up... very simple fixes...

https://github.com/Nimdy/Dedicated_Valheim_Server_Script/wiki/Top-10-Reason-your-Server-is-not-working-and-how-to-fix
masgioo 22 Feb @ 2:16pm 
hello zerobandwidth,

i have a problems when try to joining my server.. did i miss somthing like port forwarding ?
already doing the valheim launch option but still goes to main menu not go tru the character menu (after launch it)

● valheimserver.service - Valheim Server
Loaded: loaded (/lib/systemd/system/valheimserver.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2021-02-22 21:36:08 UTC; 35min ago

it should be good right ? if its active and running ?

Thanks.
PoorUglyPeasant 17 Feb @ 3:11pm 
Thanks, I will run one in GCP to see how that goes and if it can handle 10 people at the same time
YagoAmani 17 Feb @ 2:33pm 
I find the problem, I'm trying to do it in a raspberry with an arm architecture how is not supported for steamcmd
zerobandwidth  [author] 17 Feb @ 3:36am 
@YagoAmani - You missed a step... or did not sudo or a few other things. Folks in Discord can help you out.
zerobandwidth  [author] 17 Feb @ 3:36am 
@Beidou - Yes only 1 world at a time
zerobandwidth  [author] 17 Feb @ 3:34am 
Beidou 16 Feb @ 7:12pm 
can it only run 1 world?
YagoAmani 16 Feb @ 5:06pm 
Plss could you tell me what do you have in your "/etc/apt/sources.list"