Brazil's biggest MU Online portal — since 2003
Tutorial Intermediate Infrastructure

How to build a public status page for your MU Online server

Build a public status page for your MU Online server, showing real-time availability, online players, downtime history, and automatic incident notifications.

RO Rodrigo · Updated on Jul 17, 2013 · ⏱ 13 min read
Quick answer

MU Online servers go down — for maintenance, updates, connection spikes, or simply a bug. What sets a professional server apart from an amateur one isn't never going down, it's how it communicates when it does. A public status page, hosted independently from the main server, shows in real time wheth

MU Online servers go down — for maintenance, updates, connection spikes, or simply a bug. What sets a professional server apart from an amateur one isn't never going down, it's how it communicates when it does. A public status page, hosted independently from the main server, shows in real time whether ConnectServer and GameServer are up, how many players are connected, and keeps a transparent incident history. This drastically reduces support tickets asking "is it down?" and builds trust with the community. This tutorial shows how to build this page, from port monitoring to automatic incident notifications.

Why a status page changes how players perceive your server

When the server goes down without warning, the player doesn't know if it's their own connection, a temporary blip, or the server has "died for good" (a common fear in private MU communities, given the history of abandoned servers). A public status page eliminates that uncertainty: the player checks in seconds, without needing to ask anyone.

What to monitor, at minimum

ComponentWhat to checkWhy
ConnectServerOpen TCP port (usually 44405)It's the client's first point of contact
GameServerOpen TCP port (varies by server, e.g., 55901+)Without it the player can't enter the world
DatabaseSuccessful connection and response timeThe game can "look" online but hang at login
Site/shopHTTP 200 response on the home page and checkoutA down shop directly impacts revenue
LatencyAverage response time of the ports aboveDetects degradation before a full outage

Step 1 — Choose the monitoring architecture

Two complementary approaches:

  • Third-party service (UptimeRobot, Better Uptime, StatusCake): monitors HTTP/port availability from the outside in, with a ready-made status page and native alerts. Quick to set up, independent of your own infrastructure.
  • Custom monitoring: a script running on another server/VPS, checking ports and the database, feeding a custom page with MU-specific data (online players, most populated map).

The practical recommendation is to combine both: a third-party service for the "is it up?" availability layer, and your own page for game-specific data.

Step 2 — Port-check script (ConnectServer/GameServer)

<?php
// monitor/checar_portas.php — runs on a server DIFFERENT from the MuServer
function portaAberta(string $host, int $porta, float $timeout = 3.0): bool {
    $conexao = @fsockopen($host, $porta, $errno, $errstr, $timeout);
    if ($conexao) {
        fclose($conexao);
        return true;
    }
    return false;
}

$status = [
    'connect_server' => portaAberta('seuservidor.com', 44405),
    'game_server' => portaAberta('seuservidor.com', 55901),
    'checado_em' => date('c'),
];

file_put_contents('/var/status/ultimo_status.json', json_encode($status));
# crontab on the monitoring server
* * * * * php /opt/monitor/checar_portas.php

Step 3 — Expose the number of online players

Query the MuServer database (from your own API, with a read-only user) to count active connections:

<?php
// api/jogadores_online.php
$total = consultarQuery("SELECT COUNT(*) as total FROM MEMB_STAT WHERE ConnectStat = 1");
echo json_encode(['jogadores_online' => $total]);

Watch out for the cost of this query on large databases — cache the result for 30-60 seconds instead of querying on every request to the public page.

Step 4 — Build the public page

<div class="status-page">
  <h1>Server Status</h1>
  <div class="status-item">
    <span class="dot" data-status="connect-server"></span> ConnectServer
  </div>
  <div class="status-item">
    <span class="dot" data-status="game-server"></span> GameServer
  </div>
  <p id="jogadores-online">Loading...</p>
  <h2>Incident history</h2>
  <ul id="lista-incidentes"></ul>
</div>
async function atualizarStatus() {
  const status = await fetch('/api/status.json').then(r => r.json());
  document.querySelector('[data-status="connect-server"]').classList.toggle('online', status.connect_server);
  document.querySelector('[data-status="game-server"]').classList.toggle('online', status.game_server);
  const jogadores = await fetch('/api/jogadores_online.php').then(r => r.json());
  document.getElementById('jogadores-online').textContent = `${jogadores.jogadores_online} players online`;
}
setInterval(atualizarStatus, 30000);
atualizarStatus();

Step 5 — Incident history

Log every detected outage (start and end) in its own table, and display the last 30 days on the page — this is what sets a professional status page apart from a simple "green/red dot":

CREATE TABLE incidentes (
    id INT AUTO_INCREMENT PRIMARY KEY,
    componente VARCHAR(50),
    inicio DATETIME,
    fim DATETIME NULL,
    descricao TEXT
);
function registrarQueda(string $componente) {
    if (!existeIncidenteAberto($componente)) {
        inserirIncidente($componente, date('Y-m-d H:i:s'));
    }
}

function registrarRecuperacao(string $componente) {
    fecharIncidenteAberto($componente, date('Y-m-d H:i:s'));
}

Step 6 — Automatic incident notifications

Fire a webhook to Discord as soon as an outage is detected, and another when the service is back to normal:

async function notificarDiscord(mensagem, cor) {
  await fetch(process.env.DISCORD_WEBHOOK_STATUS, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      embeds: [{ title: 'Server Status', description: mensagem, color: cor }],
    }),
  });
}
// usage: notificarDiscord('🔴 GameServer has been down since 9:04pm', 0xff0000);

Step 7 — Host the status page outside the main server

This is the point most often overlooked: if the status page lives on the same VPS as the game, a total VPS outage takes the page down with it, and the player is left with no information at exactly the worst moment. Host the page on another provider (even a free static hosting plan works) or use the uptime monitoring service's own page as the official status page.

Step 8 — SLA and scheduled maintenance

Announce scheduled maintenance in advance directly on the status page, marking the period as "scheduled maintenance" instead of letting it appear as an incident — this avoids unnecessary alarm in the community and demonstrates organization.

Common errors and fixes

SymptomLikely causeFix
Status page also goes down along with the serverHosted on the same monitored VPSHost on a separate provider or use a third-party service
Online player count always shows zeroWrong query or ConnectStat column with an unexpected valueValidate the query directly on the database and adjust the condition
Outage notification arrives lateCheck interval too longReduce the cron/monitoring interval to 1 minute
False positive outage (flapping)Connection timeout too short, normal latency read as a failureIncrease the timeout and require 2-3 consecutive failures before logging an incident
Incident history doesn't close automaticallyNo recovery check after an outageImplement registrarRecuperacao() triggered by the same check routine
Page doesn't update in real timeBrowser cache or polling interval not configuredAdjust the API's cache headers and review the front-end's setInterval

Status page checklist

  • Monitoring of ConnectServer, GameServer, database, and site configured.
  • Status page hosted outside the game's main server/VPS.
  • Online player count exposed with appropriate caching.
  • Incident history being logged automatically (start and end).
  • Automatic notifications configured (Discord/email) for outages and recovery.
  • Scheduled maintenance announced in advance on the page.
  • False positive (flapping) tests performed and tuned.
  • Status page link visible on the main site and Discord.

With availability transparency handled, it's worth reviewing the rest of the server's infrastructure to reduce the actual frequency of outages, not just communicate them better — start with the MU Online server setup guide to review the end-to-end architecture.

Frequently asked questions

Why have a status page if I already announce on Discord when the server goes down?

Because not every player is on Discord at the moment of the outage, and a public page is the single source of truth, accessible without needing to open any app. It also reduces the volume of repetitive 'is the server down?' tickets/questions.

What exactly do I need to monitor besides 'up or down'?

At minimum: the ConnectServer port, the GameServer port, response latency, and site/shop availability. Ideally also the database, since the game can look 'up' but hang at login due to a database failure.

Does a ready-made tool (like UptimeRobot) handle this, or do I need to build something custom?

Ready-made tools handle HTTP/port availability monitoring well and already come with a status page built in. To show MU-specific data (online players, the most populated map) you need to complement it with your own page powered by your own API.

Can the status page live on the same server I'm monitoring?

It's not recommended. If the main VPS goes down entirely, the status page goes down with it and the player gets no information at all. It's best to host the status page on another provider or use a third-party service for the availability layer.

How do I automatically notify people when the server goes down?

Configure monitoring to fire a webhook (Discord, email, SMS) as soon as it detects an outage, and another one when the service comes back. Most uptime monitoring tools already support this natively, without needing to build anything from scratch.

RO
Founder & editor-in-chief

Rodrigo has run ViciadosMU since the portal's early days. A specialist in MU Online server creation and administration, game history and the evolution of the seasons — he wrote much of the archive before 2024.

Keep reading

Related articles