Learning Center
Gaming

How to Set Up a Valheim Server

9 Jul 2025
Hostman Team
Hostman Team

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.sh

Create a directory to store the server files and navigate into it:

mkdir /opt/valheim && cd /opt/valheim

Launching 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_PASS must be at least 6 characters long.

  • SERVER_NAME must be at least 5 characters long (no special characters).

To start the server:

docker compose up -d

Check status:

docker compose ps

Check logs:

docker compose logs -f

The 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 version

To start playing on your server, launch Valheim from your Steam library. Choose Start GameJoin GameAdd 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 browser
  • SERVER_PORT: 2456 — UDP port the server listens on
  • WORLD_NAME: dedicated — world name (server directory will use this name, helpful for migrations)
  • SERVER_PASS: secret — password for accessing the server, at least 6 characters
  • SERVER_PUBLIC: true — whether the server should appear in the public server list (true) or not (false)
  • SERVER_ARGS: "" — additional Valheim server command-line arguments
  • ADMINLIST_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 F2
  • BANNEDLIST_IDS: Space separated list of banned SteamIDs — list of blocked SteamID64s separated by spaces
  • PERMITTEDLIST_IDS: Space separated list of whitelisted SteamIDs — list of allowed SteamID64s separated by spaces
  • CROSSPLAY: false — whether the server allows non-Steam clients to connect (true) or not (false)
  • UPDATE_CRON: "*/15 * * * *" — update check schedule in cron format
  • UPDATE_IF_IDLE: true — check updates only if no players are on the server
  • RESTART_CRON: "10 5 * * *" — server restart schedule in cron format
  • RESTART_IF_IDLE: true — only perform daily restart if no players are on the server
  • TZ: 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.9
  • easy: Player damage ×1.1, enemy damage ÷1.33, enemy speed and size ÷0.9
  • normal: Base parameters 1:1
  • hard: Player damage ÷1.18, enemy damage ×1.5, enemy speed and size ×1.1
  • veryhard: Player damage ÷1.43, enemy damage ×2, enemy speed and size ×1.2

DeathPenalty

  • casual: No equipment loss, minimal skill loss
  • veryeasy: All items stay, smaller skill loss
  • easy: All items lost, smaller skill loss
  • normal: Standard death penalty
  • hard: Equipment loss, faster skill loss
  • hardcore: Full loss of items and skills on death

Resources

  • muchless: ×0.5
  • less: ×0.75
  • normal: ×1.0
  • more: ×1.5
  • muchmore: ×2.0
  • most: ×3.0

Raids

  • none: Raids completely disabled
  • muchless: Significantly reduced raid frequency
  • less: Reduced raid frequency
  • normal: Standard raid frequency
  • more: Increased raid frequency
  • muchmore: Significantly increased raid frequency

Portals

  • casual: Metals can be carried through portals
  • normal: Standard item transfer rules
  • hard: Cannot use portals during active boss fights
  • veryhard: 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.