MineStalker is a backend service for tracking players and servers on Minetest public servers.
It provides a REST API for querying player history, server history, and live snapshots of the server list.
Additionally, it integrates with a Discord bot for real-time notifications about player activity and server status.
- Player Tracking: Track which servers players have connected to and when.
- Server Tracking: Monitor online/offline status and connected players for public servers.
- Live Snapshot: Fetch a snapshot of all public servers with their current players.
- Discord Integration: Optional bot for sending join/leave and server status notifications.
- Configurable Scraping: Scheduler scrapes the server list at configurable intervals.
- Go 1.20+
- SQLite3
- Discord bot token (optional, for Discord notifications)
- Clone the repository
git clone https://github.com/TeamAcedia/MineStalker-Backend.git
cd MineStalker-BackendThis creates minestalker.db with all necessary tables.
- Configure the bot
Create a config.ini file in the root directory:
Token = YOUR_BOT_TOKEN
AppID = YOUR_APP_ID
GuildID = YOUR_GUILD_ID
UpdateInterval = 5
SnapshotInterval = 300
LoggerWebhookURL = LOGGER_WEBHOOK_URL
LoggerWebhookUsername = USERNAME_TO_SHOW_AS_WHEN_LOGGING_VIA_WEBHOOK- Run the server
./build_and_run.batThe backend will start on :8080. The scraper and Discord bot run in the background.
| Endpoint | Description |
|---|---|
/api/player/{name} |
Get the history of a player across servers |
/api/server/{ip}/{port} |
Get history of a server including players |
/api/snapshot |
Get a snapshot of current public servers |
-
/playertracker add <playername>– Track a player -
/playertracker remove <playername>– Stop tracking a player -
/playertracker list– List all tracked players -
/servertracker add <playername>– Track a server -
/servertracker remove <playername>– Stop tracking a server -
/servertracker list– List all tracked servers -
/playerhistory <playername> <page>– List all tracked activity of a specific player
The bot sends notifications when players join/leave servers or when servers go online/offline. The notifications are sent to the dms of the user who runs those commands, and they can be sent to multiple users if each one adds it to their tracker.
- The scraper runs in the background every 5 seconds by default.
- It saves snapshots of the server list every 5 minutes.
- Database is SQLite for simplicity and portability.
- Go modules are used for dependency management.
- Fork the repository
- Create a feature branch (
git checkout -b feature-name) - Commit your changes (
git commit -am 'Add new feature') - Push to the branch (
git push origin feature-name) - Open a Pull Request
MIT License © 2025 Team Acedia
For issues, questions, or suggestions, contact the project maintainers via GitHub issues or our Discord, https://discord.gg/invite/z2bW5h6PXQ