This assumes you will run the Valheim server on a Linux server.
- Git
# If this command prints the version of git, then it's already installed git --version # If git isn't already installed, you can probably install it via your package manager sudo apt install git # For Ubuntu/Debian
Note
For distributions other than Ubuntu/Debian, go to Git's installation page to find out how to install it
-
Docker
# Download install script curl -fsSL https://get.docker.com -o install-docker.sh # Do dry run to verify steps sh install-docker.sh --dry-run # Run as root to install Docker sudo sh install-docker.sh
-
Clone the repo
git clone https://github.com/btc-raspberrypiclub/piclub-valheim-server cd piclub-valheim-server
-
Copy and edit the example environment file
cp example.env .env nano .env
Note
For more configuration options, see the valheim-server-docker repo
-
Create the config and data directories
mkdir config data
The
config
directory will hold server configuration, world files, and backups.The
data
directory is where the Valheim server executable and data will be installed to. -
Start the server
docker compose up
The initial startup will take a while after running this command (the world has to be generated).
To monitor the process, you can look at the logs:
docker compose logs -f
You can safely stop viewing the logs (by pressing Ctrl + C) and the server will keep running.
If you want to stop the server, run:
docker compose down