Skip to Main Content

Wednesday, February 17, 2021

How to Setup a Valheim Game Server for Free using Oracle Cloud

Oracle Cloud



A more enhanced how-to guide coming soon after I do some testing of different compute configurations.

Step 1: Sign up for Oracle Cloud Free Tier



  • Its a free trial and a free account too.
  • You won’t be charged and can still use everal free services after the trail.
  • Plus they nicely label all the free stuff.
  • In this we will use 1 of the 2 free virtual machines.

Step 2: Create The Virtual Machine.

Choose the following and make sure to download the SSH keys to login in the next step.

Step 3: Login to the Virtual Machine

This will be different for every operating system so check out the offical oracle doc:

Step 4: Go ahead and setup the firewall stuff on the server and cloud account.

Valheim uses the following ports, but could be changed if you want during config.

Run the following one at a time

sudo firewall-cmd --permanent --zone=public --add-port=2456/udp
sudo firewall-cmd --permanent --zone=public --add-port=2457/udp
sudo firewall-cmd --reload

You will also need to add the following ports to the ingess rule set


Step 5: Install the linux game server manager

5a: Dependencies install

then type the following to login as root

sudo su 

Then install the dependecies. Run the following one at a time

yum install epel-release
yum install curl wget tar bzip2 gzip unzip python3 binutils bc jq tmux glibc.i686 libstdc++ libstdc++.i686

###5b. Install GameDig since
Its a recommended additional module that allows LinuxGSM to gather more info from the game
curl -sL | bash -

yum install nodejs
npm install gamedig -g
npm update -g

###5c.Run this since it seems to be left out when installing linux game server manager

sudo yum install nmap-ncat

Step 6: Use LGSM to install Valheim

The next few steps are pretty easy.
Create the user

adduser vhserver

login as that user

su - vhserver
  1. Download linuxgsm
wget -O && chmod +x && bash vhserver
  1. Run the installer following the on-screen instructions.
./vhserver install

And done. Now for config and daily use cases.

When logged into server as vhserver. See all commands:


Valheim Basic Server Command stuff

./vhserver start
./vhserver stop
./vhserver restart
./vhserver update
./vhserver details
./vhserver backup
./vhserver monitor

Once you start the server it will populate with a default config.

Step 7: Setup your config file

to be added

Step 8: Optional - Migrate your world

to be added

sudo chmod -R ugo+rw /home/vhserver/



No comments yet on this post