Valheim Dedicated Server + Status Page
Valheim dedicated server with automatic updates, backups, and status monitoring.
[i]Overview
The Valheim dedicated server (lloesche/valheim-server) is a containerized solution that runs Iron Gate Studio's popular Viking survival game server without requiring the full Steam client or GUI interface. This Docker image handles automatic game updates, world persistence, backup management, and server configuration through environment variables, making it ideal for hosting persistent multiplayer worlds that run independently of player sessions.
This stack combines the Valheim server with aldjinn/valheim-status for real-time server monitoring and NGINX as a reverse proxy to create a complete hosting solution. The status component provides web-based visibility into server health, player counts, and world information, while NGINX handles HTTP traffic routing and can serve as an entry point for additional web services. The lloesche image includes built-in backup functionality with configurable retention policies and automatic Steam workshop mod support.
Gamers running private servers for their communities, homelab enthusiasts hosting game servers, and small gaming clans will find this stack particularly valuable. The combination eliminates the need for manual server management while providing transparency into server status - crucial for coordinating multiplayer sessions and troubleshooting connectivity issues without requiring direct server access.
[*]Key Features
- [+]Automatic Valheim server updates via Steam CMD with configurable cron scheduling (default every 15 minutes)
- [+]Built-in world backup system with customizable retention policies and hourly backup scheduling
- [+]Real-time server status monitoring showing player count, world name, and server health metrics
- [+]Steam workshop mod support with automatic mod downloading and updating
- [+]BepInEx mod framework integration for server-side modifications and plugins
- [+]RCON protocol support for remote server administration and command execution
- [+]World seed and difficulty configuration through environment variables
- [+]NGINX reverse proxy setup for serving multiple web interfaces from a single port
[#]Common Use Cases
- [1]Private gaming communities hosting persistent Valheim worlds for clan members
- [2]Content creators running modded Valheim servers for streaming and video production
- [3]Gaming server providers offering managed Valheim hosting services
- [4]Homelab enthusiasts learning containerized game server deployment and management
- [5]Educational environments teaching server administration through gaming contexts
- [6]Remote friend groups maintaining a shared Viking world across different time zones
- [7]Gaming cafes or local businesses providing hosted multiplayer experiences
[!]Prerequisites
- [!]Minimum 4GB RAM available (Valheim server requires 2-3GB, additional overhead for monitoring)
- [!]UDP ports 2456-2458 forwarded through firewall and router for client connections
- [!]SERVER_PASS environment variable set with minimum 5 characters for server access
- [!]Docker host with at least 8GB disk space for world saves and backup retention
- [!]Basic understanding of Valheim server administration and player management
- [!]Network configuration knowledge for port forwarding and firewall rules
[!]
WARNING: For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
[$]docker-compose.yml
[docker-compose.yml]
1services: 2 valheim: 3 image: lloesche/valheim-server4 environment: 5 - SERVER_NAME=${SERVER_NAME:-My Valheim Server}6 - WORLD_NAME=${WORLD_NAME:-Dedicated}7 - SERVER_PASS=${SERVER_PASS}8 - SERVER_PUBLIC=true9 - UPDATE_CRON=*/15 * * * *10 - BACKUPS=true11 - BACKUPS_CRON=0 * * * *12 - BACKUPS_MAX_AGE=713 - BACKUPS_MAX_COUNT=1014 volumes: 15 - valheim-config:/config16 - valheim-data:/opt/valheim17 ports: 18 - "2456-2458:2456-2458/udp"19 cap_add: 20 - SYS_NICE21 networks: 22 - valheim-network23 restart: unless-stopped2425 status: 26 image: aldjinn/valheim-status:latest27 environment: 28 - SERVER_HOST=valheim29 - SERVER_PORT=245730 ports: 31 - "13080:80"32 depends_on: 33 - valheim34 networks: 35 - valheim-network36 restart: unless-stopped3738 nginx: 39 image: nginx:alpine40 volumes: 41 - ./nginx.conf:/etc/nginx/nginx.conf:ro42 ports: 43 - "80:80"44 depends_on: 45 - status46 networks: 47 - valheim-network48 restart: unless-stopped4950volumes: 51 valheim-config: 52 valheim-data: 5354networks: 55 valheim-network: 56 driver: bridge[$].env Template
[.env]
1# Valheim Server2SERVER_NAME=My Valheim Server3WORLD_NAME=Dedicated4SERVER_PASS=minimum5chars56# Backup settings in compose environment[i]Usage Notes
- [1]Game server on UDP 2456-2458
- [2]Status page at http://localhost:13080
- [3]Automatic updates every 15 minutes
- [4]Hourly backups with 7-day retention
- [5]Server password minimum 5 characters
Individual Services(3 services)
Copy individual services to mix and match with your existing compose files.
valheim
valheim:
image: lloesche/valheim-server
environment:
- SERVER_NAME=${SERVER_NAME:-My Valheim Server}
- WORLD_NAME=${WORLD_NAME:-Dedicated}
- SERVER_PASS=${SERVER_PASS}
- SERVER_PUBLIC=true
- UPDATE_CRON=*/15 * * * *
- BACKUPS=true
- BACKUPS_CRON=0 * * * *
- BACKUPS_MAX_AGE=7
- BACKUPS_MAX_COUNT=10
volumes:
- valheim-config:/config
- valheim-data:/opt/valheim
ports:
- 2456-2458:2456-2458/udp
cap_add:
- SYS_NICE
networks:
- valheim-network
restart: unless-stopped
status
status:
image: aldjinn/valheim-status:latest
environment:
- SERVER_HOST=valheim
- SERVER_PORT=2457
ports:
- "13080:80"
depends_on:
- valheim
networks:
- valheim-network
restart: unless-stopped
nginx
nginx:
image: nginx:alpine
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- "80:80"
depends_on:
- status
networks:
- valheim-network
restart: unless-stopped
[>]Quick Start
[terminal]
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 valheim:5 image: lloesche/valheim-server6 environment:7 - SERVER_NAME=${SERVER_NAME:-My Valheim Server}8 - WORLD_NAME=${WORLD_NAME:-Dedicated}9 - SERVER_PASS=${SERVER_PASS}10 - SERVER_PUBLIC=true11 - UPDATE_CRON=*/15 * * * *12 - BACKUPS=true13 - BACKUPS_CRON=0 * * * *14 - BACKUPS_MAX_AGE=715 - BACKUPS_MAX_COUNT=1016 volumes:17 - valheim-config:/config18 - valheim-data:/opt/valheim19 ports:20 - "2456-2458:2456-2458/udp"21 cap_add:22 - SYS_NICE23 networks:24 - valheim-network25 restart: unless-stopped2627 status:28 image: aldjinn/valheim-status:latest29 environment:30 - SERVER_HOST=valheim31 - SERVER_PORT=245732 ports:33 - "13080:80"34 depends_on:35 - valheim36 networks:37 - valheim-network38 restart: unless-stopped3940 nginx:41 image: nginx:alpine42 volumes:43 - ./nginx.conf:/etc/nginx/nginx.conf:ro44 ports:45 - "80:80"46 depends_on:47 - status48 networks:49 - valheim-network50 restart: unless-stopped5152volumes:53 valheim-config:54 valheim-data:5556networks:57 valheim-network:58 driver: bridge59EOF6061# 2. Create the .env file62cat > .env << 'EOF'63# Valheim Server64SERVER_NAME=My Valheim Server65WORLD_NAME=Dedicated66SERVER_PASS=minimum5chars6768# Backup settings in compose environment69EOF7071# 3. Start the services72docker compose up -d7374# 4. View logs75docker compose logs -f[>]One-Liner
Run this command to download and set up the recipe in one step:
[terminal]
1curl -fsSL https://docker.recipes/api/recipes/valheim-server-complete/run | bash[?]Troubleshooting
- [!]Players cannot connect to server: Verify UDP ports 2456-2458 are forwarded and SERVER_PUBLIC is set to true
- [!]Server fails to start with 'SteamCMD failed': Check internet connectivity and Steam service status, restart container
- [!]World saves corrupted after container restart: Ensure valheim-data volume is properly mounted and not using tmpfs
- [!]Status page shows server offline: Verify valheim container is running and SERVER_HOST points to correct service name
- [!]Backup process failing with permission errors: Add proper user ID mapping or check volume mount permissions
- [!]High memory usage causing container kills: Increase Docker host memory or adjust BACKUPS_MAX_COUNT to reduce retention
Community Notes
Loading...
Loading notes...
## Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
## Components
valheim-servervalheim-statusnginxbackup-service
## Tags
#valheim#gaming#dedicated-server#backup#monitoring
## Category
Home Lab & Self-HostingShortcuts: C CopyF FavoriteD Download