Self-Hosted · Open-Source · Discord-Native

CraftDaemon is a self-hosted Discord bot for controlling Minecraft servers remotely, built for friend groups, homelabs, and lightweight setups without bloated control panels or complicated infrastructure.

Node.js 18+ Discord.js v14 systemd + RCON Lightweight MIT License
Documentation → View GitHub

Overview

How it works

architecture.txt
Discord User
    │
    │  slash command  (/start, /stop, /status, /exec, /logs…)
    ▼
CraftDaemon Bot ──── systemctl start/stop/restart ────▶  Minecraft (systemd)
   (systemd)    ◀─── RCON 127.0.0.1:25575 ──────────    (Minecraft Server)

# Two systemd services on your Linux host
craftdaemon.service    → The Discord bot
minecraft.service        → Your Minecraft server

All the essentials.
No bloat.

CraftDaemon is small, readable, and ready to do whatever on. It’s just code you can grok.

See it for yourself.

A look at CraftDaemon's Discord embeds and bot presence in a real server.

/status embed
⚡ /status

Full Status Embed

Shows systemd state, uptime, live TPS, current player count and names, and RCON round-trip latency, all in one embed.

/address embed
🌐 /address

Server Address Info

Displays your public tunnel address, LAN address, and Java Edition version, all configured via your .env.

Auto-shutdown warning
💤 Auto-Shutdown

Inactivity Warning

Posted to your status channel when the server has been empty past the warning threshold, giving players a heads-up before the automatic stop.

Bot presence
🤖 Presence

Live Bot Status

The bot's Discord status and activity reflect the server state in real time, visible from the member list or bot profile without running any command.

/exec command
🎮 /exec

Remote Command Execution

Execute any server command directly from Discord. The response embed shows the executor, the command ran, the result, and a timestamp. Every execution is logged to exec.jsonl for a full audit trail.

/logs command
📜 /logs

Live Log Streaming

Stream Minecraft server logs in real-time with live mode, grab a static snapshot with tail mode, or stop an active session with stop. One session per channel, sourced from journalctl by default. (Image got cut off of course)

Your Discord Control Panel

Every interaction with the server happens through clean slash commands, no need to SSH.

CommandDescription
/startStarts the Minecraft server via systemctl start
/stopGracefully stops the server, running save-all first
/restartSaves world data then restarts via systemctl restart
/logsStreams live server logs in real-time (live), fetches recent lines (tail), or stops an active session (stop) via journalctl
/execExecutes Minecraft server commands via RCON with safety checks, confirmation prompts, and in-game announcements
/statusFull status embed: systemd state, uptime, live TPS, player list, RCON ping
/addressShows server connection addresses, public, LAN, and Java edition version
/pingChecks the bot's Discord API latency
/helpInteractive command reference with category grouping, quick-start guide, and per-command detail pages with autocomplete
/checkupdateCompares current version against latest GitHub release and posts an embed if newer

Because hosting a server for friends,
shouldn't feel like managing infrastructure.

CraftDaemon started from a simple problem:

I wanted a self-hosted Minecraft server that friends could control remotely without dealing with panels, tunnels, complicated deployments, or full hosting stacks.

So instead of building another massive control panel, CraftDaemon focuses on lightweight Discord-native management that works alongside the server you already run.

🪶Lightweight by design
💜Discord-native controls
🚀Minimal setup friction
🏡Self-host friendly
📦Works alongside your server
Optional complexity

What's new

Pulled live from GitHub Releases.

Fetching changelog…
Loading previous releases…

Requirements

You’ll need to be comfy with Linux basics. If you know your way around systemd and Discord bots, you’re good.

🐧

Linux + systemd

Ubuntu, Debian, Arch, or any distro with systemd. The bot runs as its own service.

Node.js 18+

v22 recommended; used for development and testing and future migration plan to TypeScript.

⛏️

Any Minecraft Server

Your actual Minecraft server, Duh.. (Paper is recommended, Required for TPS data.)

🤖

Discord Bot Token

Create an application in the Discord Developer Portal and enable Guild Members Intent.

🔑

sudo Access

A passwordless sudoers rule for the bot's user to run specific systemctl commands.

🌐

RCON Enabled

Enable RCON in your server.properties. Used for live stats and graceful save-before-stop.

Setup in 9 Steps

Follow along below, or hit the Docs for all the nitty-gritty details.

01

Clone the repo

Grab the code on your Linux box.

git clone https://github.com/d1vid3d/CraftDaemon
cd CraftDaemon
02

Install dependencies

Let npm do its thing.

npm install
03

Create a Discord bot application

Head to the Discord Developer Portal, make a new app, grab your bot token, and enable the Server Members Intent and Message Content Intent. Invite it with bot + applications.commands scopes.

04

Configure your environment

Copy the example env, fill in your bot token, IDs, RCON info, and whatever auto-shutdown settings you want.

cp config/.env.example config/.env
nano config/.env
05

Set up Minecraft as a systemd service

Write a .service unit for your Paper server. Make sure the service name matches MC_SERVICE in your .env.

06

Enable RCON on the Minecraft server

In server.properties, set enable-rcon=true, rcon.port=25575, and an rcon.password that matches your .env.

07

Grant sudoers permissions

Add a passwordless sudoers rule so the bot user can run systemctl start/stop/restart for your Minecraft service. (Don’t give it more than it needs!)

08

Configure RBAC

Edit config/permission-config.js to map your Discord role IDs and user IDs to command permissions like server.start and server.restart.

09

Register commands & start the bot

Register the slash commands, then install and enable the bot as a systemd service.

node src/register-commands.js
sudo systemctl enable --now craftdaemon
View GitHub Docs ↗ Full Docs →
🛠️

Early Project - Just One Dev

Heads up: CraftDaemon is still pretty new and changes fast. Stuff might break or change between releases, so always check the release notes before you upgrade.

This is a solo side project, so things might move slow and I might miss issues or PRs for a bit. Found a bug or want to pitch in? Open an issue on GitHub, contributions are very much welcome!

🎯

What's Next?

CraftDaemon v1.3.0 brought major administration features - live log streaming /logs and remote command execution /exec with safety checks, tellraw announcements, and a full audit trail. But there's always more to build.

Future updates will expand the admin toolkit further: server monitoring support, moderation commands, automation, observability, autocomplete, and more. Your feedback and contributions on GitHub help shape what comes next!