phvalheim-server
An over-engineered approach to Valheim server+client world+mods management
10K+
The Valheim world and mod manager that keeps everyone in sync.
Modding Valheim is easy. Keeping mods perfectly in sync across your server and every player? Nearly impossible. Mod managers like Thunderstore work great individually, but they don't coordinate across a group — eventually someone's client drifts out of sync and the session breaks.
PhValheim is a two-part system (server + client) that locks server and client mod configurations together. Deploy worlds with any combination of Thunderstore mods, and every player automatically gets the exact same files when they connect. No more "which version do you have?" conversations.
| One-Click Worlds | Deploy unique Valheim worlds with any combination of Thunderstore mods at the click of a button. |
| Automatic Mod Sync | Server and client mods stay in lock-step. Players always have the right files. |
| Setup Wizard | Guided first-run configuration — just start the container and follow the steps. No environment variables required. |
| Steam Authentication | Players log in with their Steam account. Per-world access control lists manage who can see and join each world. |
| Thunderstore Integration | Full Thunderstore mod catalog synced every 12 hours. Search, select, and deploy mods with dependency resolution built in. |
| Automatic Backups | All worlds backed up every 30 minutes. Configurable retention. Supports separate backup volumes for disaster recovery. |
| Live Monitoring | Real-time CPU, memory, and load metrics for every running world, visible in both the admin and public UIs. |
| AI Helper | Built-in AI-powered log analysis (OpenAI, Gemini, Claude, or self-hosted Ollama). Identifies mod errors, missing dependencies, and server health issues. |
| Custom Configs | Push custom configuration files to clients, or keep server-only configs that persist across updates. |
| Single Container | Everything runs in one Docker container — NGINX, PHP, MariaDB, Supervisor, and the PhValheim engine. |
services:
phvalheim:
image: theoriginalbrian/phvalheim-server:latest
container_name: phvalheim
ports:
- "8080:8080/tcp" # Public UI
- "8081:8081/tcp" # Admin UI (do NOT expose publicly)
- "25000-26000:25000-26000/udp" # Game ports
volumes:
- /path/to/data:/opt/stateful:Z
- /path/to/backups:/opt/stateful/backups:Z # ideally a separate disk
restart: unless-stopped
That's it. Start the container and open http://your-host:8081 — the Setup Wizard will walk you through configuration.
docker create \
--name phvalheim \
-p 8080:8080/tcp \
-p 8081:8081/tcp \
-p 25000-26000:25000-26000/udp \
-v /path/to/data:/opt/stateful:Z \
-v /path/to/backups:/opt/stateful/backups:Z \
theoriginalbrian/phvalheim-server:latest
docker start phvalheim
Search for PhValheim in the Community Apps store.
All settings are configured through the Admin UI after first launch. No environment variables are needed for new installations.
Upgrading from an older version? Your existing environment variables will be automatically migrated to the database on first boot. A one-time migration notice will confirm the imported values.
| Setting | Description |
|---|---|
| Steam API Key | Required. Used for player authentication. Get one here. |
| PhValheim Host | Public FQDN for the web UI. |
| Game DNS | DNS name players use to connect to game servers. Can be the same as PhValheim Host. |
| Base Port | First UDP port for worlds (must match the container's port range). |
| Backups to Keep | Number of backup snapshots to retain per world. |
| Client Download URL | URL for the PhValheim Client installer. |
Configure one or more AI providers in Server Settings to enable the built-in log analysis assistant.
| Provider | What you need |
|---|---|
| OpenAI | API key — enables GPT-4o models |
| Google Gemini | API key — enables Gemini 2.0 Flash and Gemini 1.5 Pro |
| Anthropic Claude | API key — enables Claude Haiku 4.5 and Claude Sonnet 4.5 |
| Ollama | URL of your self-hosted instance — models detected automatically |
| Container Path | Purpose |
|---|---|
/opt/stateful | All persistent data — worlds, mods, database, configuration. |
/opt/stateful/backups | World backups. Point this to a separate disk for safety. |
| Port | Purpose |
|---|---|
8080/tcp | Public web UI — expose this to your players. |
8081/tcp | Admin web UI — keep this private. |
25000-26000/udp | Game server port range for Valheim worlds. |
The server is only half the equation. PhValheim Client is a companion Windows app that registers a custom phvalheim:// URL protocol. When a player clicks a launch link:
Client files install to %appdata%/PhValheim and add the BepInEx bootstrap to your Valheim Steam directory.
Client repo: brianmiller/phvalheim-client


Access to each world is controlled by the PhValheim database. Steam IDs are associated with each world, gating both the web UI (world visibility) and the game server allow-list.
Example NGINX config for TLS termination:
server {
listen 80;
server_name phvalheim.example.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name phvalheim.example.com;
ssl_certificate /path/to/fullchain.pem;
ssl_certificate_key /path/to/privkey.pem;
location / {
proxy_pass http://localhost:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 1200s;
client_max_body_size 0;
}
}
| Folder | Behavior |
|---|---|
custom_configs/ | Pushed to clients on world update. Use for shared game configs. |
custom_configs_secure/ | Server-only. Persists across updates but never sent to clients. |
PhValheim makes mod management effortless, but not all mods play well together. If you're experiencing crashes or unexpected behavior, deploy a vanilla world (no mods) first to rule out mod conflicts. Most mod issues occur after major Valheim updates.
Content type
Image
Digest
sha256:258186d4f…
Size
327.3 MB
Last updated
3 months ago
docker pull theoriginalbrian/phvalheim-server:rc