A MagicMirror² module to display the live status of your Valheim dedicated server — including online/offline state, player count, and world name.
Built to match the style of MMM-MinecraftServer so both modules sit side by side cleanly on your mirror.
- 🪓 Live online/offline status via A2S query protocol
- 👥 Current and max player count
- 🌍 World name display
- 🎨 Styled to match MMM-MinecraftServer for a unified game server panel
- 🔄 Configurable update interval
- ⚡ No external API dependencies — queries your server directly over UDP
- 📦 No npm install required — uses Node.js built-in modules only
- Navigate to your MagicMirror
modulesdirectory:
cd ~/MagicMirror/modules- Clone this repository:
git clone https://github.com/Gregoid88/MMM-ValheimServer.git- That's it — no npm install needed!
Add this to the modules array in your config/config.js:
{
module: "MMM-ValheimServer",
position: "bottom_left",
config: {
ip: "your.server.ip",
port: 2457,
title: "Valheim Server",
hideInfo: false,
updateInterval: 1,
}
},| Option | Default | Description |
|---|---|---|
ip |
required | IP address of your Valheim server |
port |
2457 |
A2S query port — always game port + 1, so if your game port is 2456 this is 2457 |
title |
"Valheim Server" |
Display title shown on the card |
hideInfo |
false |
Hide the IP and world name info row at the bottom |
updateInterval |
1 |
How often to poll the server in minutes |
Your Valheim server must be launched with the -public 1 flag or the module will always show Server Offline even if your server is running and joinable.
Make sure your server launch command or systemd ExecStart includes it:
./valheim_server.x86_64 -name "YourServer" -port 2456 -world "YourWorld" -password "yourpassword" -public 1 -nographics -batchmodeThis is the most common reason the module shows offline — the -public 1 flag is what enables A2S query responses.
The module is styled to match MMM-MinecraftServer and will use the MinecraftFont from that module if you have it installed — giving both cards a unified look side by side on your mirror.
The Valheim card uses a teal border to differentiate it from the Minecraft grey border so you can tell them apart at a glance.
If you don't have MMM-MinecraftServer installed the module will fall back to your mirror's default font gracefully — it will still work fine.
Valheim does not expose individual player names via the A2S protocol. This is a Steam limitation and not something the module can work around. The current player count is displayed instead.
Module shows Server Offline:
- Make sure your server is launched with
-public 1 - Confirm your server's A2S query port is open — it is always your game port + 1 (default
2457) - Test connectivity from your MagicMirror VM:
node -e "require('dgram').createSocket('udp4').send(Buffer.from([0xff,0xff,0xff,0xff,0x54,0x53,0x6f,0x75,0x72,0x63,0x65,0x20,0x45,0x6e,0x67,0x69,0x6e,0x65,0x20,0x51,0x75,0x65,0x72,0x79,0x00]), 2457, 'YOUR_SERVER_IP', console.log)"
Mirror crashes on startup:
- Check your
node_helper.jsfor syntax errors:node ~/MagicMirror/modules/MMM-ValheimServer/node_helper.js - A
Cannot find module 'node_helper'error is normal when run outside of MagicMirror — it means the file is fine
- A2S query protocol implementation built with Node.js built-in
dgrammodule - Inspired by and styled to match MMM-MinecraftServer by ItsMeBrille
If this module saved you some time and you want to buy me a coffee, it's always appreciated!
MIT License — see LICENSE for details.
