Starting a Valheim World on the Intel NUC Gaming Server
#===================================================================================================================================#
Valheim is one of those games that becomes dramatically better when you’re playing on a persistent world with friends. Instead of relying on a player-hosted game that disappears when someone logs off, I wanted to run a dedicated server inside my homelab.
This project was part of my broader experiment building out Docker services behind Traefik on my Ubuntu server.
Why run your own Valheim server?
Running a dedicated Valheim server gives you several advantages:
• The world stays online even when players disconnect
• You control backups and server performance
• You can run it alongside other homelab services
• It’s a great lightweight containerized game server
#===================================================================================================================================#
Make a File Structure like the One Below if you want to have multiple Valheim Worlds under your Docker Folder
In your docker-compose.yml, here is a very basic configuration that will get your world up and running - you can customize as you wish:
services:
valheim:
image: lloesche/valheim-server
container_name: valheim
restart: unless-stopped
ports:
- "${VALHEIM_PORT}"
environment:
- SERVER_NAME=${VALHEIM_SERVER_NAME}
- WORLD_NAME=${VALHEIM_WORLD_NAME}
- SERVER_PASS=${VALHEIM_SERVER_PASS}
volumes:
- valheim_data:/config
volumes:
valheim_data:
I prefer keeping environment variables in a .env file rather than hardcoding them inside the compose file. This keeps credentials and world configuration easier to manage.
Bring your Valheim World up with:
sudo docker compose up -d && sudo docker ps
Check Logs with:
sudo docker logs valheim
If you see this with no errors, try connecting to the server with your <ip>:<port>!