Self-Hosted · Open Source · systemd + RCON
Heya! CraftDaemon is a Discord bot you run yourself, made for folks who like to get their hands dirty with Linux servers. It hooks into systemd and RCON so you can manage your Minecraft server straight from Discord, no more SSH-ing in just to restart or check status.
How it works
What you get
CraftDaemon is small, readable, and ready to do whatever on. It’s just code you can grok.
Let systemd do what it does best. The bot just tells systemd to start/stop/restart, so you get clean logs, proper restarts, and no weird background scripts.
systemctlOne RCON connection, kept alive and healthy. Handles reconnects and queues commands for you. Live TPS, player count, and latency.
RCONBot status updates in real time, so your Discord always shows if the server is offline, starting, or online (with player count). All event-driven.
DiscordEmpty server? The bot can shut it down after a timeout (with a warning in Discord first). Don’t want it? Flip one env var and it’s off.
configurablePermissions are just code. Map Discord roles or user IDs to commands in permission-config.js. Defaults to strict, but you’re in control.
securityRun /checkupdate to see if there’s a new release. If there is, you’ll get a Discord embed with the changelog.
GitHubIn action
A look at CraftDaemon's Discord embeds and bot presence in a real server.
And more planned to come! 🚀
Shows systemd state, uptime, live TPS, current player count and names, and RCON round-trip latency, all in one embed.
Displays your public tunnel address, LAN address, and Java Edition version, all configured via your .env.
Posted to your status channel when the server has been empty past the warning threshold, giving players a heads-up before the automatic stop.
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.
Latest release
Pulled live from GitHub Releases.
Previous releases
Live state
Event-driven from the RCON manager. Your Discord member list tells the story at a glance.
Slash commands
Every interaction with the server happens through clean slash commands, no need to SSH.
| Command | Description |
|---|---|
| /start | Starts the Minecraft server via systemctl start |
| /stop | Gracefully stops the server, running save-all first |
| /restart | Saves world data then restarts via systemctl restart |
| /status | Full status embed: systemd state, uptime, live TPS, player list, RCON ping |
| /address | Shows server connection addresses, public, LAN, and Java edition version |
| /ping | Checks the bot's Discord API latency |
| /checkupdate | Compares current version against latest GitHub release and posts an embed if newer |
Before you dive in
You’ll need to be comfy with Linux basics. If you know your way around systemd and Discord bots, you’re good.
Ubuntu, Debian, Arch, or any distro with systemd. The bot runs as its own service.
v22 recommended; used for development and testing and future migration plan to Typescript.
Your actual Minecraft server, Duh.. (Paper is recommended, Required for TPS data.)
Create an application in the Discord Developer Portal and enable Guild Members Intent.
A passwordless sudoers rule for the bot's user to run specific systemctl commands.
Enable RCON in your server.properties. Used for live stats and graceful save-before-stop.
Get started
Follow along below, or hit the Docs for all the nitty-gritty details.
Grab the code on your Linux box.
Let npm do its thing.
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.
Copy the example env, fill in your bot token, IDs, RCON info, and whatever auto-shutdown settings you want.
Write a .service unit for your Paper server. Make sure the service name matches MC_SERVICE in your .env.
In server.properties, set enable-rcon=true, rcon.port=25575, and an rcon.password that matches your .env.
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!)
Edit config/permission-config.js to map your Discord role IDs and user IDs to command permissions like server.start and server.restart.
Register the slash commands, then install and enable the bot as a systemd service.