Previous: Install Docker on Ubuntu Server
Changing your Valheim Server Seed
Want to try a new Valheim Seed because yours kinda sucks but you found out that simply bringing the docker-compose down, changing out the seed in your .env file and bringing it back up doesn’t actually change the world?
If so, the reason for this is on initial seed generation, any new seed gets ignored and the save file gets tied twitch the world name, and if you want to swap around worlds but keep the same world name like me, do this:
Navigate to your Valheim Docker-Compose Directory & bring the Docker Container Down with:
sudo docker compose down
Next you need to find the following directory:
/var/lib/docker/volumes/world_1_valheim_data/_data/worlds_local
Burn it all, destroy everything inside of this directory, but spare the directory itself :)
Once the existing world data has been removed, update the .env file used by the Valheim container - the most important variable here is VALHEIM_SEED, which controls the procedural world generation.
.env
# Which port should Valheim listen on? (Playit.gg uses 2456–2458)
VALHEIM_PORT=2456
# Valheim server settings
VALHEIM_SERVER_NAME=
VALHEIM_WORLD_NAME=
VALHEIM_SERVER_PASS=
VALHEIM_SEED=
# Optional: Set your timezone
TZ=America/Los_Angeles
Bring the Valheim Docker Container back up with:
sudo docker compose up -d
Check Docker Logs:
sudo docker logs valheim
Test Login - can you get on? if so you're all set!