How to Set Up a Valheim Server
Valheim is a game that transports players to a vast fantasy world inspired by Norse mythology and Viking culture. Valheim combines elements of survival, exploration, and building. Its multiplayer mode has made it especially popular.
Pros:
- Atmosphere and immersion
- Interesting co-op gameplay
- Dynamically generated map
Cons:
- There is no real plot — the goal is to survive, explore the world, and defeat bosses.
- The graphics, although cozy, noticeably lag behind modern projects and can still heavily load the graphics card.
- The building system is inferior, for example, to that implemented in Enshrouded.
- The combat system quickly becomes repetitive due to its monotony.
Hosting a Valheim dedicated server is an excellent way to create a persistent world where you and your friends can play anytime. Setting up a dedicated server requires some basic knowledge of networking, Linux, and Docker.
Preparing the VM Copy link
Recommended requirements for a Valheim server:
- CPU: 4
- RAM: 8 GB
- Disk: 20 GB
- Network: from 50 Mbit/s (the main factor is the server response latency (ping), ideally up to 50)
Valheim server ports:
- 2456 — Game traffic
- 2457 — Steam Matchmaking
The focus is on single-core performance, so even 4 cores are more than enough. Minimum requirements for CPU and RAM: 2 cores and 4 GB of RAM.
We will create a cloud server in Hostman with the following parameters:
- OS: Ubuntu 24.04
- CPU: 4 × 3.3 GHz
- RAM: 8 GB
- NVMe: 80 GB
Connect to the server via SSH. You can get the login and password in the cloud server control panel under the Access tab.
Next, update the packages and install Docker:
apt update && apt upgrade -y
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.shCreate a directory to store the server files and navigate into it:
mkdir /opt/valheim && cd /opt/valheimLaunching the Valheim Server Copy link
As a ready-made Docker image, we will use the project lloesche/valheim-server-docker.
Create a compose.yaml file with the following content:
services:
valheim:
image: ghcr.io/lloesche/valheim-server
restart: always
stop_grace_period: 2m
cap_add:
- sys_nice
volumes:
- ./server/config:/config
- ./server/data:/opt/valheim
ports:
- 2456:2456/udp
- 2457:2457/udp
environment:
- SERVER_NAME=HostmanServer
- WORLD_NAME=skyrim
- SERVER_PASS=secrett
-
SERVER_PASSmust be at least 6 characters long. -
SERVER_NAMEmust be at least 5 characters long (no special characters).
To start the server:
docker compose up -dCheck status:
docker compose psCheck logs:
docker compose logs -fThe first startup will take approximately 5–15 minutes, because the Valheim server needs to download the files and latest updates from Steam (about 3.2 GB).
Make sure ports 2456 and 2457 are not blocked by a firewall and are accessible from the internet.
You can check using the nmap utility or online port checking services like check-host.net (UDP port).
After the server has started, in the logs you will see an entry like:
valheim-1 | valheim-server 04/01/2025 20:39:33: Server is already the latest versionTo start playing on your server, launch Valheim from your Steam library. Choose Start Game → Join Game → Add Server. Enter IP:PORT.
Each time you connect, the system will request the password that we set in the compose.yaml file.
Additional Valheim Server Settings Copy link
For more advanced server configuration, there are predefined variables that you can add to the compose.yaml file in the environment section:
SERVER_NAME: My Server— server name as it appears in the server browserSERVER_PORT: 2456— UDP port the server listens onWORLD_NAME: dedicated— world name (server directory will use this name, helpful for migrations)SERVER_PASS: secret— password for accessing the server, at least 6 charactersSERVER_PUBLIC: true— whether the server should appear in the public server list (true) or not (false)SERVER_ARGS: ""— additional Valheim server command-line argumentsADMINLIST_IDS: Space separated list of admin SteamIDs— list of SteamID64 admins separated by spaces, you can view the ID in server logs or in-game by pressing F2BANNEDLIST_IDS: Space separated list of banned SteamIDs— list of blocked SteamID64s separated by spacesPERMITTEDLIST_IDS: Space separated list of whitelisted SteamIDs— list of allowed SteamID64s separated by spacesCROSSPLAY: false— whether the server allows non-Steam clients to connect (true) or not (false)UPDATE_CRON: "*/15 * * * *"— update check schedule in cron formatUPDATE_IF_IDLE: true— check updates only if no players are on the serverRESTART_CRON: "10 5 * * *"— server restart schedule in cron formatRESTART_IF_IDLE: true— only perform daily restart if no players are on the serverTZ: Europe/Nicosia— timezone
Other variables can be found on the project page on GitHub.
To adjust the gameplay itself, you can use additional arguments in the variable:
SERVER_ARGS: "-preset casual"Allowed values: Normal, Casual, Easy, Hard, Hardcore, Immersive, Hammer.
For even more fine-tuned settings, you can use modifiers. For example, to disable raids:
SERVER_ARGS: "-modifier raids none"Modifiers and their values:
-
Combat: veryeasy, easy, hard, veryhard
-
DeathPenalty: casual, veryeasy, easy, hard, hardcore
-
Resources: muchless, less, more, muchmore, most
-
Raids: none, muchless, less, more, muchmore
-
Portals: casual, hard, veryhard
Detailed description of modifiers
Combat
veryeasy: Player damage ×1.25, enemy damage ÷2, enemy speed and size ÷0.9easy: Player damage ×1.1, enemy damage ÷1.33, enemy speed and size ÷0.9normal: Base parameters 1:1hard: Player damage ÷1.18, enemy damage ×1.5, enemy speed and size ×1.1veryhard: Player damage ÷1.43, enemy damage ×2, enemy speed and size ×1.2
DeathPenalty
casual: No equipment loss, minimal skill lossveryeasy: All items stay, smaller skill losseasy: All items lost, smaller skill lossnormal: Standard death penaltyhard: Equipment loss, faster skill losshardcore: Full loss of items and skills on death
Resources
muchless: ×0.5less: ×0.75normal: ×1.0more: ×1.5muchmore: ×2.0most: ×3.0
Raids
none: Raids completely disabledmuchless: Significantly reduced raid frequencyless: Reduced raid frequencynormal: Standard raid frequencymore: Increased raid frequencymuchmore: Significantly increased raid frequency
Portals
casual: Metals can be carried through portalsnormal: Standard item transfer ruleshard: Cannot use portals during active boss fightsveryhard: Portals completely disabled
Features of the Game World and Interesting Facts Copy link
There is no place for tenderness in Valheim. This world, woven from Norse myths and pixelated beauty, does not just challenge you — it tests your limits. Here, even the simplest actions can turn into a catastrophe, and victories come through blood, sweat, and countless funny stories.
When a tree is your main enemy
You swing your axe at a big tree in the meadows, confident in your strength. The final blow — and the trunk starts to fall with a crash, its branches catching on neighboring trees, the trunk bounces, flying straight towards your teammates… And suddenly the entire team is wiped out, surrounded by a fallen forest, smashed buildings, and the bitter realization that nature in Valheim is more dangerous than any monster.
The sea calls
You decided to go on a scouting trip: built your first raft, pushed off from the shore, drifting lazily on the waves. And then the current suddenly grabs you and pulls you far out to sea. Around you — endless water, and from the depths comes an ominous bubbling. You helplessly try to row back to shore. Painfully struggle your way home: minutes of cheerful sailing turn into hours of suffering.
Trolls are the best architects
Three hours of painstaking work. You built a fortress with high walls, carefully planned the defenses, placed torches — pride swells. But as soon as the sun sets behind the horizon, the earth trembles with heavy footsteps. Two blue trolls, swinging clubs, approach your gates. Within minutes, your buildings are reduced to a pile of splinters. You fought desperately, but your creation is now just a memory.
Valheim does not forgive mistakes, but that is precisely its charm. Each failure is a story you will tell around the campfire. Each victory is a reason for pride. Here your ambitions will be broken, your hopes trampled, and your buildings destroyed.
Conclusion Copy link
What attracts players to Valheim most is its atmosphere and cooperative mode, where teamwork unlocks new opportunities and makes the game more engaging and varied. Even a seemingly simple game like this can draw you in for many hours in good company.
For a comfortable experience, it is recommended to set up the server according to the preferences and wishes of the main players who want to take part in the adventures.