Skip to content

DavidMacDonald11/msw-frontend

Repository files navigation

Minecraft Server Website Frontend

The Minecraft Server Website Toolkit

This is part of a three-part system designed to automate a minecraft server using a website. Also see:

This was developed for my own personal use. The system I’ve designed is very unique to my scenario, so it may not be easy to directly replicate. I also have no intention of implementing features that I will never actaully use. That said, it may still be worth asking for features, as I may find use in them.

Otherwise, feel free to edit this project however you need to for it to suit your needs. If you would like pointers to help you do so, feel free to ask.

System Structure

  1. The Frontend Server

    1. This is the website users will actually interact with.

    2. It will send http requests to the backend for authentication and data management.

  2. The Backend Server

    1. Handles website authentication and remotely controls the host.

    2. The server uses SSH to access a raspberry pi to use WoL to wake up the host machine. This is to save power. Compared to a complete host machine, a raspberry pi uses far less power. Using a raspberry pi allows WoL from outside of the local network.

    3. The server uses SSH to interact with the local API on the host.

  3. The Local API

    1. Shuts down the host machine after 15 minutes of inactivity.

    2. Starts the Minecraft servers.

    3. Uses local-network only RCON to send commands to the server. Allows the local api to keep track of players and time left.

  4. The Idle Timeout Datapack

    1. Each server will have this datapack installed.

    2. If no one is online, the server will shutdown after 30 minutes.

    3. Allows the local api to keep track of players online.

Instructions

  1. Follow these instructions to set up the backend and local api.

  2. Fork this project and create a new Vercel project using that repo, or install the Vercel command-line tool, download this repo, and run vercel.

  3. Edit vercel.json and, with [URL] being the URL of your deployed backend, and set "destination": "[URL]/api/$1"

  4. Deploy these changes to Vercel.

Accounts

There are only meant to be one or two accounts used with this. The more accounts there are, the more vulnerable your system is. You can set an admin account to modify your servers using the website, as well as make new accounts.

Details comming soon.