Skip to content

Gregoid88/MMM-ValheimServer

Repository files navigation

MMM-ValheimServer

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.


Screenshot

IMG_0470(1)

Features

  • 🪓 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

Installation

  1. Navigate to your MagicMirror modules directory:
cd ~/MagicMirror/modules
  1. Clone this repository:
git clone https://github.com/Gregoid88/MMM-ValheimServer.git
  1. That's it — no npm install needed!

Configuration

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,
  }
},

Config Options

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

⚠️ Important — Valheim Server Requirements

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 -batchmode

This is the most common reason the module shows offline — the -public 1 flag is what enables A2S query responses.


Styling

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.


Note on Player Names

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.


Troubleshooting

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.js for 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

Credits


Support

If this module saved you some time and you want to buy me a coffee, it's always appreciated!

Buy Me A Coffee


License

MIT License — see LICENSE for details.

About

A MagicMirror² module to display live Valheim dedicated server status — online/offline, player count, and world name via A2S query protocol.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors