Skip to content

    Search all 99 extensions, themes and egg repositories by title, author, tag or egg name.

    Alway-MOTD

    by amrixfr Updated Sep 28, 2026
    Get it · Free

    Description

    🟥 Offline MOTD

    Show a custom Minecraft server-list MOTD while a server is stopped — for the Calagopus panel.

    image1 image12

    Made by nino


    Normally, when a Minecraft server is stopped, players see “Can't connect to server” in their server list. With Offline MOTD they see your message instead — your branding, a red Offline label, a server icon, and a friendly message if they try to join.

    ┌──────────────────────────────────────────────────────────────────┐
    │ [icon]  Lobby                                       ● OFFLINE     │
    │         ▶ DRAVEX HOSTING ◀ | Lobby                                │
    │         This server is offline • Start it from the panel          │
    └──────────────────────────────────────────────────────────────────┘
    

    ✨ Features

    • Custom offline MOTD — two lines, full & colour codes, {server} and {owner} placeholders
    • Version label — replaces the ping bars (e.g. &c● OFFLINE)
    • Server icon — upload any 64×64 PNG
    • Join message — shown when a player tries to connect to an offline server
    • Egg selection — only applies to the Minecraft eggs you pick
    • Live preview — the admin page shows exactly what players will see
    • Automatic — the real server answers as soon as it starts; no restarts, no manual switching
    • Safe by design — if the panel can't be reached, the agent removes all its rules (fail-open), so it can never block a running server
    • Old and new clients — modern ping (1.7+) and legacy ping (1.4–1.6)
    • No dependencies on the node — the agent is a single Python file (standard library only)

    ⚙️ How it works

    A stopped server has nothing listening on its port, so the panel alone can't answer. Offline MOTD has two parts:

    Part Runs on Job
    Extension Calagopus panel Admin page; stores the eggs, MOTD and icon; asks Wings which servers are running
    Agent Each node (systemd service) Answers Minecraft pings for stopped servers only
    Admin page ─ save ─▶ Panel (Offline MOTD extension)
                             ▲
                             │ every 5 s: which servers on this node are offline?
                             │ (Bearer token; panel checks Wings)
    Node agent ──────────────┘
      • server stopped   → iptables REDIRECT its port → agent answers with your MOTD
      • server started   → redirect removed          → the real server answers
      • panel unreachable → all redirects removed    → nothing is intercepted
    

    Only traffic addressed to the node itself is redirected (--dst-type LOCAL), and the agent's chain sits first in PREROUTING, so it works alongside Docker without taking a port away from a running server.

    📦 Requirements

    • Calagopus panel 1.2.2 or newer, heavy image (required for extensions)
    • On every node: python3 (3.8+), iptables, systemd, curl, root access
    • Minecraft Java Edition servers with IPv4 allocations

    🚀 Installation

    1. Install the extension

    Download xyz_dravex_motd.c7s.zip from the latest release, then either:

    • upload it in Admin → Extensions, or
    • copy it into your heavy image's build/extensions/ directory and run docker compose restart web.

    2. Configure it

    Go to Admin → Extensions → Offline MOTD → Configure:

    1. Select your Minecraft eggs (Paper, Purpur, Fabric, Forge, …). Nothing is shown until at least one egg is selected.
    2. Write the two MOTD lines, the version label and the join message.
    3. Optionally upload a 64×64 PNG server icon.
    4. Click Save.

    3. Install the agent on each node

    On the same page, click Generate agent token, choose a node, and copy the command it shows. Run it as root on that node's machine:

    curl -fsSL https://panel.example.com/api/extensions/xyz.dravex.motd/install.sh \
      | sudo bash -s -- --panel https://panel.example.com --node <NODE_UUID> --token <TOKEN>

    The installer downloads the agent from your panel, checks that the panel accepts the token, and starts the offline-motd systemd service. Repeat for every node.

    Test it: stop a Minecraft server, refresh your multiplayer list, and your offline MOTD should appear within a few seconds.

    🎨 Formatting

    Code Result Code Result
    &0–&9, &a–&f Colours &l Bold
    &o Italic &n Underline
    &m Strikethrough &r Reset
    && A literal &
    Placeholder Replaced with
    {server} The server's name
    {owner} The owner's username

    Keep each MOTD line under about 45 visible characters, or Minecraft cuts it off.

    Example (Dravex Hosting)

    Field Value
    MOTD line 1 &4&l▶ &c&lDRAVEX HOSTING &4&l◀ &8| &7{server}
    MOTD line 2 &cThis server is offline &8• &7Start it from the panel
    Version label &c&l● OFFLINE
    Join message &4&lDRAVEX HOSTING
    &c{server} &7is currently &coffline&7.
    &7Ask &f{owner} &7to start it from the panel.

    🛠️ Settings reference

    Setting Default Description
    Eggs (none) Servers on these eggs get the offline MOTD
    MOTD line 1 / 2 &c&l{server} &7is currently &coffline / &7Start it from the panel to play! The two lines in the server list
    Version label &cOffline Shown instead of the ping bars
    Max players shown 0 “0/N” in the list (online is always 0)
    Server icon (none) 64×64 PNG
    Join message &c{server} is offline. … Shown when someone tries to join
    Also show for suspended servers on Suspended servers show the offline MOTD too
    Agent refresh interval 5 s How quickly nodes notice a server started or stopped (2–120 s)

    🖥️ Managing the agent

    journalctl -u offline-motd -f          # live logs
    systemctl status offline-motd          # status
    systemctl restart offline-motd         # restart
    
    # uninstall (removes the service, config and all iptables rules)
    curl -fsSL https://panel.example.com/api/extensions/xyz.dravex.motd/install.sh | sudo bash -s -- --uninstall

    Agent config lives in /etc/offline-motd/agent.json:

    {
      "panel_url": "https://panel.example.com",
      "node": "<NODE_UUID>",
      "token": "<TOKEN>",
      "listen_port": 25599
    }

    The agent listens on port 25599 (change with --port during install). Players never connect to it directly; their traffic is redirected to it only for stopped servers.

    🔌 API

    Method Path Auth Purpose
    GET /api/admin/extensions/xyz.dravex.motd/settings Admin Read settings
    PUT /api/admin/extensions/xyz.dravex.motd/settings Admin Save settings
    POST /api/admin/extensions/xyz.dravex.motd/token Admin Generate a new agent token
    GET /api/admin/extensions/xyz.dravex.motd/eggs Admin List eggs
    GET /api/admin/extensions/xyz.dravex.motd/nodes Admin List nodes
    GET /api/extensions/xyz.dravex.motd/agent/config?node=<uuid> Agent token Offline servers + MOTD for one node
    GET /api/extensions/xyz.dravex.motd/agent.py — Agent script
    GET /api/extensions/xyz.dravex.motd/install.sh — Installer

    Admin permission: offline-motd.manage.

    ❓ Troubleshooting

    Problem Fix
    Still “Can't connect” Is the server's egg selected? Is the agent running (systemctl status offline-motd)?
    Agent log shows HTTP 401 Token changed — copy the new install command from the admin page and run it again
    Agent log shows HTTP 502 The panel couldn't reach Wings on that node; check the node is online in the panel
    Real MOTD takes a few seconds to appear after start Expected — up to one refresh interval (default 5 s)
    Players can't see the MOTD but you can on the node Test from another machine; connections from the node to itself aren't redirected

    ⚠️ Limitations

    • Minecraft Java Edition only; Bedrock (UDP) isn't supported
    • IPv4 allocations only
    • Only the server's primary allocation is covered

    🧩 Project structure

    Metadata.toml                  extension manifest
    backend/
      Cargo.toml
      src/lib.rs                   routes, permissions, settings registration
      src/settings.rs              stored settings (MOTD, eggs, encrypted agent token)
      src/render.rs                & → § colour codes, placeholders
      src/routes/admin.rs          admin API
      src/routes/agent.rs          agent API (token-protected) + script downloads
      agent/offline_motd_agent.py  node agent (Minecraft ping responder + iptables)
      agent/install.sh             agent installer (systemd)
    frontend/
      src/index.tsx                extension entrypoint
      src/pages/AdminMotdPage.tsx  configuration page with live preview
    

    🤝 Contributing

    Issues and pull requests are welcome. For bigger changes, please open an issue first to discuss what you'd like to change.

    📄 License

    MIT © Dravex Hosting

    All extensions