Easiest installation script for setting up Valheim on a dedicated Linux server with steamcmd running Ubuntu.
My Twitch Channel: https://www.twitch.tv/zerobandwidth
Patreon: https://www.patreon.com/zerobandwidth (for tips if you wish)
My Discord for Tech Support https://discord.gg/ejgQUfc
Credit and modivation from YT GeekHead, nicolas-martin for variable assignment, madmozg typo fixes and bherbruck profile creation corrections and beko for KillSignal=SIGINT corrections
Game is in Early Access meaning tons of updates and broken servers. Please post issues so we can make our edits and keep you up and running!
Visit the WIKI for common questions and answers https://github.com/Nimdy/Dedicated_Valheim_Server_Script/wiki
*DISCLAIMER: Use this at your own risk. There is nothing malicious within the script and its all 100% open source readable This game is in early access, plan on losing your worlds, issues happening a lot and random bugs with the Official Game *
*This script is to just get your started. I will try my best to keep everything updated as I learn issues. Check back often Check back often for updated vers of the script and server configuration files *
Come back and check for updates
How to set up a Linux Valheim dedicated server:
Start your own dedicated Valheim server built on Ubuntu with DigitalOcean services: * https://m.do.co/c/9d2217a2725c *
If you use my referral link, you will get 100USD credit for 60 days. (good way to test your dedicated server)
I pay 40 bucks a month for my server.
Never run any script on a production server, unless you know what you are doing.
Create VM with minimum 2 CPUs and 4GB of ram. Otherwise server won't start.
*DigitalOcean private IP and routing fix for Valheim: *
edit 50-cloud-init.yaml
vi /etc/netplan/50-cloud-init.yaml
remove private IP address on eth0 (might be 10.10.something - do not remove your public IP the same one you use to SSH into the server or access it)
netplan apply
reboot
Please do not use the Hosting Company Command Line Interface if you can help it. Download putty and connect to your server via SSH. Download Putty here:https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html If you can connect to your Server's Ubuntu install via SSH through PUTTY, your networking/security groups are most likely setup correctly (for port 22). Thanks mscard02
---Start TUT---
Run as root(if brave enough) or sudo current user
sudo apt-get install -y git net-tools
cd /opt
sudo git clone https://github.com/Nimdy/Dedicated_Valheim_Server_Script.git
cd Dedicated_Valheim_Server_Script/
sudo chmod +x build_dedicated_valheim_server.sh
(I live in vi... use whatever you wish)
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.
# NOTE: NO $ ' " in the passwords - you will break the script
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
(press ESC and save/exit by entering)
:wq!
sudo ./build_dedicated_valheim_server.sh
Select keep the local version currently installed or No (default)
Select Ok
Select I Agree
Press Enter
sudo ufw allow 2456:2458/tcp
sudo ufw allow 2456:2458/udp
sudo systemctl stop valheimserver.service
sudo reboot
sudo systemctl status valheimserver.service
###Congratz! You did it, now get out there and start exploring with your friends!!!