minecraft_server
The configuration files for the Illegal Crime Minecraft server.
Usage
Follow these steps to set up and configure the project:
-
Clone the repository:
git clone https://gitea.leaf.home.kappeh.org/Homelab/minecraft_server.git cd minecraft_server -
Create required directories: See Directory Setup for details.
-
Set up environment variables: See Environment Variables for details.
-
Import world files:
The world for the Fabric server is located at
fabric/data/world. If you want to use an existing world, copy it to this location before running the container:cp path/to/world fabric/data/world -
Adjust permissions (recommended): Run the following commands in the root of the repository, replacing
PUIDandPGIDwith the corresponding values from your.envfile:sudo chown -R PUID:PGID . sudo chmod -R 770 . -
Start the Docker Compose stack: To start the services in detached mode, run:
docker compose up -d -
Stop the Docker Compose stack: To stop and remove the running containers, use:
docker compose down
Directory Setup
Make a directory called schematics in the root of the repository. This directory is used for storing WorldEdit schematic files. To create it, run:
mkdir schematics
Environment Variables
To configure environment variables, make a copy of the example file:
cp .env.example .env
Then, open .env in a text editor and set appropriate values for your setup.
| Environment Variable | Description |
|---|---|
PUID |
The user ID that should be used for file ownership within the project. |
PGID |
The group ID that should be used for file ownership within the project. |
VELOCITY_PORT |
The port number where the Velocity proxy service will listen. Default is set to 25565. |
RCON_PASSWORD |
The password for Remote Console (RCON) access. This should be a secure password. |
FORWARDING_SECRET |
A secret key for forwarding data between services or to the proxy. This should be a secure password. |
DCLINK_GUILD |
The Discord guild ID (server ID) where the bot will operate. See dclink for more information. |
DCLINK_CHANNEL |
The Discord channel ID where the bot will operate. See dclink for more information. |
DCLINK_ROLE |
The ID of the role that the bot will give to Discord members when they link their accounts. See dclink for more information. |
DCLINK_TOKEN |
The bot token used for authentication with Discord's API. Ensure this is kept secret and secure. |
LUCKPERMS_DB_PASSWORD |
The password for the LuckPerms database. This should be a secure password. |
Instead of using environment variables, the secrets section of docker-compose.yml can be modified to read files instead. This method will likely be used by default in future.
dclink
This configuration uses dclink to link users' Minecraft accounts and Discord accounts. This is so that a user can gain access to the Minecraft server if they are a member of the configured Discord server.
For this to work you must first setup a discord bot. Then set the relevant Environment Variables.