|chylex 07c31ac70b||2 months ago|
|.config||8 months ago|
|.run||8 months ago|
|.workdir||8 months ago|
|Agent||2 months ago|
|Common||2 months ago|
|Docker||8 months ago|
|Server||2 months ago|
|Utils||2 months ago|
|.dockerignore||7 months ago|
|.gitattributes||8 months ago|
|.gitignore||10 months ago|
|AddMigration.bat||8 months ago|
|AddMigration.sh||8 months ago|
|Directory.Build.props||2 months ago|
|Directory.Build.targets||8 months ago|
|Dockerfile||2 months ago|
|LICENSE||7 months ago|
|Packages.props||3 months ago|
|PhantomPanel.sln||2 months ago|
|README.md||3 months ago|
|global.json||2 months ago|
Phantom Panel is a work-in-progress web interface for managing Minecraft servers.
Phantom Panel is built on what I'm calling a Server-Agent architecture:
- The Server is provides a web interface, persists data in a database, and sends commands to the Agents.
- One or more Agents receive commands from the Server, manage the Minecraft server processes, and report on their status.
This architecture has several goals and benefits:
- The Server and Agents can run on separate computers, in separate containers, or a mixture of both.
- The Server and Agents can be updated independently.
- The Server can receive new features, bug fixes, and security updates without the need to shutdown every Minecraft server.
- Agent updates can be staggered or delayed. For example, if you have Agents in different geographical locations, you could schedule around timezones and update them at times when people are unlikely to be online.
- Agents are lightweight processes which should have minimal impact on the performance of Minecraft servers.
When an official Server update is released, it will work with older versions of Agents. There is no guarantee it will also work in reverse (updated Agents and an older Server), but if there is an Agent update that is compatible with older Servers, it will be mentioned in the release notes.
Note that compatibility is only guaranteed when using official releases. If you build the project from a version of the source between two official releases, you have to understand which changes break compatibility.
This project is work-in-progress, and currently has no official releases. Feel free to try it and experiment, but there will be missing features, bugs, and breaking changes.
For a quick start, I recommend using Docker or another containerization platform. The
Dockerfile in the root of the repository can build two target images:
Both images put the built application into the
/app folder. The Agent image also installs Java 8, 16, 17, and 18.
Files are stored relative to the working directory. In the provided images, the working directory is set to
The Server comprises 3 key areas:
- Web server that provides the web interface.
- RPC server that Agents connect to.
- Database connection that requires a PostgreSQL database server in order to persist data.
The configuration for these is set via environment variables.
When the Server starts for the first time, it will generate and an Agent Key. The Agent Key contains an encryption certificate and an authorization token, which are needed for the Agents to connect to the Server.
The Agent Key has two forms:
- A binary file stored in
/data/secrets/agent.keythat the Agents can read.
- A plaintext-encoded version the Server outputs into the logs on every startup, that can be passed to the Agents in an environemnt variable.
Use volumes to persist the whole
- Web Server
WEB_SERVER_HOSTis the host. Default:
WEB_SERVER_PORTis the port. Default:
WEB_BASE_PATHis the base path of every URL. Must begin with a slash. Default:
- RPC Server
RPC_SERVER_HOSTis the host. Default:
RPC_SERVER_PORTis the port. Default:
- PostgreSQL Database Server
PG_HOSTis the hostname.
PG_PORTis the port.
PG_USERis the username.
PG_PASSis the password.
PG_DATABASEis the database name.
/data folder will contain two folders:
/data/datafor persistent files
/data/tempfor volatile files (such as downloaded Minecraft
Use volumes to persist either the whole
/data folder, or just
/data/data if you don't want to persist the volatile files.
- Server Communication
- Agent Configuration
MAX_INSTANCESis the number of instances that can be created.
MAX_MEMORYis the maximum amount of RAM that can be distributed among all instances. Use a positive integer with an optional suffix 'M' for MB, or 'G' for GB. Examples:
MAX_CONCURRENT_BACKUP_COMPRESSION_TASKSis how many backup compression tasks can run at the same time. Limiting concurrent compression tasks limits memory usage of compression, but it increases time between backups because the next backup is only scheduled once the current one completes. Default:
- Minecraft Configuration
JAVA_SEARCH_PATHis a path to a folder which will be searched for Java runtime installations. Linux default:
ALLOWED_SERVER_PORTSis a comma-separated list of ports and port ranges that can be used as Minecraft Server ports. Example:
ALLOWED_RCON_PORTSis a comma-separated list of ports and port ranges that can be used as Minecraft RCON ports. Example:
Both the Server and Agent support a
LOG_LEVEL environment variable to set the minimum log level. Possible values:
If the environment variable is omitted, the log level is set to
VERBOSE for Debug builds and
INFORMATION for Release builds.
The repository includes a Rider projects with several run configurations. The
.workdir folder in the root of the repository is used for storage. Here's how to get started:
- You will need a local PostgreSQL instance. If you have Docker, you can enter the
Dockerfolder in this repository, and run
docker compose up. Otherwise, you will need to set it up manually with the following configuration:
- Install one or more Java versions into the
- Open the project in Rider and use one of the provided run configurations:
Serverstarts the Server.
Agent 3start one of the Agents.
Server + Agentstarts the Server and Agent 1.
Server + Agent x3starts the Server and Agent 1, 2, and 3.
The project uses Bootstrap 5 with a custom theme and several other customizations. The sources are in the
If you make any changes to the sources, you will need to use the
Compile Bootstrap run configuration, then restart the Server to load the new version. This is not done automatically, and it requires Node and npm.