> How to Set Up a Valheim Dedicated Server

Complete guide to setting up a Valheim dedicated server. Learn system requirements, installation, configuration, and hosting alternatives.

Intermediate
45 minutes

How to Set Up a Valheim Dedicated Server

A dedicated Valheim server lets your Viking adventures continue 24/7. This comprehensive guide covers everything from system requirements to hosting alternatives.

Why a Dedicated Server?

Valheim's world is persistent, but hosting on your PC means:

  • >Server goes offline when you quit
  • >Performance issues for the host
  • >Friends can't play when you're away
A dedicated server solves these problems, providing 24/7 access and better performance for all players.

---

System Requirements

Before setting up, ensure your hardware meets these minimum specs:

Minimum Requirements

ComponentSpecification
CPUDual-core 2.4 GHz
RAM4GB
Storage10GB SSD
Network5 Mbps upload
OSWindows 10/11 or Linux
ComponentSpecification
CPUQuad-core 3.0 GHz
RAM8GB
Storage20GB SSD
Network20 Mbps upload
OSWindows 10/11 or Linux

Player Scaling Guide

PlayersCPURAMBandwidth
2-42 cores4GB5 Mbps
5-74 cores8GB10 Mbps
8-104+ cores16GB20 Mbps
---

Installation Methods

Method 1: Steam Tools (Easiest)

The official Valheim dedicated server tool makes setup simple.

#### Windows Installation

  • 1.Install SteamCMD or use Steam
  • Using Steam (recommended):
    • >Open Steam
    • >Go to Library → Tools
    • >Find "Valheim Dedicated Server"
    • >Right-click → Install
  • 2.Locate Server Files
  •    C:\Program Files (x86)\Steam\steamapps\common\Valheim dedicated server
       
  • 3.Configure Server
    • >Open start_headless_server.bat with a text editor
    • >Edit the following line:
    BATCH
       valheim_server -nographics -batchmode -name "Your Server Name" -port 2456 -world "YourWorldName" -password "YourPassword" -public 1
       
    • >Change:
    • >"Your Server Name" - Display name in server list
    • >"YourWorldName" - World save name (no spaces)
    • >"YourPassword" - Required password (min 5 characters)
    • >-public 1 - Set to 0 for private server
  • 4.Start the Server
    • >Run start_headless_server.bat
    • >Wait for "Game server connected" in console
    #### Linux Installation
  • 1.Install SteamCMD
  • Bash
       # Ubuntu/Debian
       sudo apt update
       sudo apt install steamcmd
       
  • 2.Download Server
  • Bash
       steamcmd +login anonymous +app_update 896660 validate +exit
       
  • 3.Create Start Script
  • Bash
       #!/bin/bash
       export SteamAppId=892970
       export LD_LIBRARY_PATH=./linux64:$LD_LIBRARY_PATH
       ./valheim_server.x86_64 -name "Your Server Name" -port 2456 -world "YourWorldName" -password "YourPassword" -public 1
       
  • 4.Make Executable and Run
  • Bash
       chmod +x start_server.sh
       ./start_server.sh
       

    Method 2: Docker (Advanced)

    Docker provides isolated, easy-to-manage server deployment.

    YAML
    # docker-compose.yml
    version: '3.8'
    services:
      valheim:
        image: lloesche/valheim-server
        container_name: valheim
        environment:
          - SERVER_NAME=Your Server Name
          - WORLD_NAME=YourWorldName
          - SERVER_PASS=YourPassword
          - SERVER_PORT=2456
          - PUBLIC=1
        volumes:
          - ./config:/config
          - ./data:/opt/valheim
        ports:
          - "2456-2458:2456-2458/udp"
        restart: unless-stopped
    

    Run with:

    Bash
    docker-compose up -d
    

    ---

    Port Forwarding

    For external players to connect, you must forward ports on your router.

    Ports to Forward

    PortProtocolPurpose
    2456UDPGame traffic
    2457UDPSteam query
    2458UDPSteam master

    Port Forwarding Steps

  • 1.Find Your Local IP
    • >Windows: Open CMD, type ipconfig
    • >Linux: Type ip addr
    • >Note your IPv4 address (usually 192.168.x.x)
  • 2.Access Router Settings
    • >Open browser to router IP (usually 192.168.1.1 or 192.168.0.1)
    • >Login with admin credentials
  • 3.Create Port Forwarding Rules
    • >Find "Port Forwarding" or "NAT" section
    • >Create new rules for ports 2456-2458
    • >Set protocol to UDP
    • >Point to your local IP address
  • 4.Configure Firewall
  • Windows:
    POWERSHELL
       netsh advfirewall firewall add rule name="Valheim Server" dir=in action=allow protocol=UDP localport=2456-2458
       
    Linux (ufw):
    Bash
       sudo ufw allow 2456:2458/udp
       
  • 5.Find Your Public IP
  • Connect to Your Server

    Players can connect using:

    • >In-game: Server list (if public)
    • >Direct connect: your-public-ip:2456
    • >Steam: View → Servers → Add server
    ---

    Configuration

    Server Settings File

    Create or edit adminlist.txt, bannedlist.txt, and permittedlist.txt in the server directory.

    Admin Commands

    Connect to your server and press F5 to open console:

    CommandDescription
    helpShow available commands
    kick [name/ip/userID]Remove player
    ban [name/ip/userID]Ban player
    unban [name/ip/userID]Remove ban
    bannedList banned players
    saveForce world save
    resetmapReset exploration map

    Performance Optimization

    Edit launch parameters for better performance:

    BATCH
    valheim_server -nographics -batchmode -name "Server" -port 2456 -world "World" -password "pass" -public 1 -crossplay
    

    Key flags:

    • >-crossplay - Enable cross-platform play
    • >-preset Hardcore - Set gameplay preset

    World Backup

    Valheim saves are stored in:

    • >Windows: %USERPROFILE%\AppData\LocalLow\IronGate\Valheim\worlds
    • >Linux: ~/.config/unity3d/IronGate/Valheim/worlds
    Regular backups prevent progress loss. Consider automated backup scripts.

    ---

    Hosting Provider Alternatives

    Don't want to host yourself? Consider these providers:

    Top Valheim Hosting Providers

    ProviderStarting PriceFeatures
    GPortal$6.50/moInstant setup, DDoS protection
    HostHavoc$8.00/moMod support, 24/7 support
    Survival Servers$8.50/moFull FTP access, custom mods
    PingPerfect$9.00/moLow latency, control panel
    GTXGaming$6.00/moBudget option, basic features

    Benefits of Paid Hosting

    • >No need to keep your PC running
    • >Professional DDoS protection
    • >Easy control panel
    • >Automatic backups
    • >Technical support
    • >Guaranteed uptime
    ---

    Troubleshooting

    Server Not Appearing in List

  • 1.Check firewall allows ports 2456-2458 UDP
  • 2.Verify port forwarding is correct
  • 3.Ensure -public 1 is set
  • 4.Wait 5-10 minutes for server list update
  • 5.Try direct IP connection instead
  • Players Can't Connect

  • 1.Confirm password is at least 5 characters
  • 2.Verify they're using correct IP and port
  • 3.Check server is running (not crashed)
  • 4.Ensure Valheim versions match
  • 5.Try disabling firewall temporarily to test
  • High Lag/Poor Performance

  • 1.Reduce world complexity (fewer builds)
  • 2.Increase server RAM allocation
  • 3.Ensure SSD storage is used
  • 4.Check network upload speed
  • 5.Limit concurrent players
  • Server Crashes

  • 1.Check server logs for errors
  • 2.Verify world file isn't corrupted
  • 3.Update server to latest version
  • 4.Remove problematic mods
  • 5.Validate game files via Steam
  • ---

    Quick Reference

    Default Ports

    • >Game: 2456 UDP
    • >Query: 2457 UDP
    • >Master: 2458 UDP

    File Locations

    • >Config: [server]/valheim_server_Data/
    • >Worlds: [server]/worlds/ or user AppData
    • >Logs: [server]/output_log.txt
    ---

    Conclusion

    Setting up a Valheim dedicated server requires some technical knowledge, but the benefits of 24/7 uptime and better performance make it worthwhile. Choose self-hosting for control and cost savings, or a hosting provider for convenience and support.

    Your Viking adventures await—good luck building your server!