LinuxCommandLibrary

valheim

Launch Valheim game

TLDR

Start the server

$ [path/to/start_server.sh]
copy

Stop the server gracefully
$ <Ctrl c>
copy

Start the server using the provided Docker script
$ [path/to/docker_start_server.sh] [path/to/start_server.sh]
copy

SYNOPSIS

valheim_server.x86_64
-name "Server Name"
-world "WorldName"
-password "MyPassword"
[-port 2456]
[-public 1|0]
[-savedir "/path/to/saves"]
[-Nographics]
[...]

PARAMETERS

-name "Server Name"
    Sets the public name of the Valheim server visible in the game's server browser.

-world "WorldName"
    Specifies the name of the world file to load or create. This determines the save game associated with the server.

-password "MyPassword"
    Sets the password required for players to join the server. It must be at least 5 characters long and cannot contain the server name or world name.

-port PortNumber
    Defines the UDP port the server will listen on. Default is 2456. Other required ports (e.g., 2457, 2458) are automatically derived.

-public 1|0
    Determines if the server is publicly listed (1) or private (0). Private servers are only joinable via direct IP address.

-savedir "/path/to/saves"
    Specifies an alternative directory for world and character save files. Defaults to a location within the server installation or user's home directory.

-Nographics
    Runs the server without a graphical interface, which is standard for dedicated servers to reduce resource usage.

-preset DifficultyPreset
    Sets the initial difficulty preset for the world (e.g., 'casual', 'easy', 'normal', 'hard', 'hardcore', 'veryhard').

-queryport PortNumber
    Sets the server query port, typically used by server browsers and monitoring tools. Defaults to the main port + 1 (e.g., 2457 if main port is 2456).

DESCRIPTION

The term valheim on Linux typically refers to the executable for the Valheim Dedicated Server, a popular open-world survival game. Unlike standard Linux utilities, valheim is not a pre-installed command but an application specific to running a game server instance. This server allows players to host their own persistent worlds for cooperative gameplay. It is usually installed via SteamCMD and launched from its installation directory, often through a shell script (e.g., start_server.sh). The underlying executable, commonly named valheim_server.x86_64, processes various command-line arguments to configure the server's name, world, password, port, and other operational settings. Running a dedicated server provides a stable and consistent environment for players, independent of any single player's game client.

CAVEATS

The 'valheim' command is not a standard Linux utility; it refers to the executable of the Valheim Dedicated Server application. It requires manual installation, typically through SteamCMD. The server executable is often launched via a wrapper shell script (e.g., start_server.sh) which sets up the environment and passes the command-line arguments. Firewall rules must be configured to allow incoming connections on the specified server ports.

INSTALLATION AND EXECUTION

The Valheim Dedicated Server is typically installed using SteamCMD with the command:
steamcmd +login anonymous +app_update 896660 validate +quit.
After installation, the server is usually started using a provided shell script, often modified to include desired command-line parameters. For example:
./valheim_server.x86_64 -name "My Valheim Server" -world "MyWorld" -password "secret"

PORT REQUIREMENTS

The Valheim server requires three consecutive UDP ports to be open on the firewall: the main Game Port (default 2456), the Query Port (default 2457), and the Server List Port (default 2458). If you set -port 1234, then ports 1234, 1235, and 1236 must be open.

HISTORY

Valheim, developed by Iron Gate Studio and published by Coffee Stain Publishing, was released in early access in February 2021. The dedicated server component was made available shortly after, allowing players to host persistent worlds for their communities. Its development has seen continuous updates to both the game and server functionalities, adapting to community feedback and new content releases.

SEE ALSO

steamcmd(1), screen(1), tmux(1)

Copied to clipboard