Skip to content

Simple Minecraft Server query program using Python, a little bit of HTML, and a tiny bit of JS and JSON.

License

Notifications You must be signed in to change notification settings

alzhahir/mcsimplequery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

mcsimplequery

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.

How to install?

Prerequisites and dependencies

  1. Apache or any other HTML webserver
  2. Access to the webserver's CLI either through SSH or any other means
  3. Python 3.8 or above
  4. Dependency: Dinnerbone's mcstatus
  5. Dependency: Daniel Bader's Schedule
  6. A Minecraft server to query

Installation process

  1. 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
  1. Install dependencies.
pip install mcstatus && pip install schedule
  1. Clone this repository.
git clone https://github.com/alzhahir/mcsimplequery
  1. Move status.html to the webserver HTML website directory. For example, /var/www/html/ for most Apache webservers.
  2. You can either rename and move config.json.example to the same folder as main.py or you can also just let main.py to create a new config.json file for you.
  3. Change the config.json to what you need.
  4. Create a new Screen or tmux instance and launch main.py.
  5. Restart the webserver.

Configuration options

domainAddress

domainAddress is the value of the IPv4 or domain name of the Minecraft Server you want to query.

serverPort

serverPort is the server's port value.

rateRefresh

rateRefresh is the frequency of which the application will requery the Minecraft Server. Value in minutes.

outputDir

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

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.

Contact

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!

About

Simple Minecraft Server query program using Python, a little bit of HTML, and a tiny bit of JS and JSON.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published