Just a simple Minecraft Server query website application using Python, some JavaScript, and a little bit of simple HTML. This project is intended for people who want to host a website to specifically display the current status of a Minecraft Server.
- Apache or any other HTML webserver
- Access to the webserver's CLI either through SSH or any other means
- Python 3.8 or above
- Dependency: Dinnerbone's mcstatus
- Dependency: Daniel Bader's Schedule
- A Minecraft server to query
- Install Python 3.8 or above.
# The command below is for Ubuntu or Debian systems.
sudo apt update && sudo apt upgrade -y && \
sudo apt install software-properties-common && sudo add-apt-repository ppa:deadsnakes/ppa && \
sudo apt update && sudo apt install python3.8- Install dependencies.
pip install mcstatus && pip install schedule- Clone this repository.
git clone https://github.com/alzhahir/mcsimplequery- Move
status.htmlto the webserver HTML website directory. For example,/var/www/html/for most Apache webservers. - You can either rename and move
config.json.exampleto the same folder asmain.pyor you can also just letmain.pyto create a newconfig.jsonfile for you. - Change the
config.jsonto what you need. - Create a new Screen or tmux instance and launch
main.py. - Restart the webserver.
domainAddress is the value of the IPv4 or domain name of the Minecraft Server you want to query.
serverPort is the server's port value.
rateRefresh is the frequency of which the application will requery the Minecraft Server. Value in minutes.
outputDir specifies where the output file serverstatus.js should be placed, which is used by status.html. Please make sure that the directory is the same as the one in status.html or the app will not work.
enableQuery specifies whether the program should use the query protocol via UDP or server list ping via TCP connection when checking the server status. If you are not sure, please set this to 0 to prevent the program from malfunctioning.
You can contact me through my e-mail, website or through Discord.
Thank you for using this project! If you like this project, be sure to star it!