Valheim Linux Server

1. Server Requirements:

  • Operating System: Ubuntu 20.04 or later
  • Hardware:
    • CPU: 2-4 cores (minimum)
    • RAM: 4GB (minimum), 8GB+ recommended
    • SSD storage: 1GB+ for Valheim files
    • Network bandwidth: sufficient for expected player count

2. Server Setup:

  • Install Ubuntu Server:
  • Update Packages:
    sudo apt update
    sudo apt upgrade
    
  • Install SteamCMD:
    sudo apt install steamcmd
    

3. Create Valheim User:

sudo adduser valheim

4. Download Valheim Server Files:

su valheim
steamcmd +login anonymous +force_install_dir /home/valheim/valheimserver +app_update 896660 validate +quit

5. Configure Server:

  • Navigate to the server directory:
    cd /home/valheim/valheimserver
    
  • Create a configuration file (start_server.sh):
    nano start_server.sh
    
  • Paste the following content, adjusting values as needed:
    #!/bin/sh
    
    ./valheim_server.x86_64 -name "My Valheim Server" -port 2456 -password "secret" -world "Dedicated"
  • Make the script executable:
    chmod +x start_server.sh
    

6. Open Firewall Ports:

  • Allow ports 2456-2458 for Valheim:
    sudo ufw allow 2456/udp
    sudo ufw allow 2457/udp
    sudo ufw allow 2458/udp
    

7. Start the Server:

./start_server.sh

8. Connect to the Server:

  • Run Valheim on your client machine.
  • Click “Join Game” and enter the server’s IP address or hostname.
  • Provide the server password if set.

9. Additional Tips:

  • Consider using a tool like LinuxGSM for easier management: https://linuxgsm.com/
  • Configure a systemd service for automatic startup and management.
  • Regularly update the server files and plugins.
  • Backup server data regularly.
  • Monitor server resources and adjust settings as needed.

Description

Craft your own Valheim adventure with this beginner-friendly guide to setting up a dedicated server on Ubuntu. We'll navigate the high seas of installation, configuration, and server launch, leaving you ready to conquer the world (or build a cozy mead hall) with your friends. So raise your horns and prepare to embark on a journey of viking glory (and maybe a few server tweaks)!

Technology