Skip to content

Fabric Minecraft server set-up with Server<->Discord relay bot

Notifications You must be signed in to change notification settings

jack-avery/fmcs-server

Repository files navigation

fmcs-server

Automatic set-up Fabric or Forge modded Minecraft dedicated servers, supporting .mrpack exports for import with Prism Launcher and a Server <-> Discord relay bot.

Found the playbooks useful? Buy me a coffee ☕!

How to Use ✍️

Ansible requires Linux. If you're running Windows, consider setting up WSL.

In this folder in Linux or WSL (instructions are for Ubuntu):

  1. Run sudo apt-get update && sudo apt-get upgrade
  2. Install Python and Pip: sudo apt-get install python3 python3-pip
  3. Install Python requirements: pip install -r requirements.txt
  4. Ensure your servers have Python and Docker installed, and a user named fmcs with the docker role.

If you are hosting on your own machine, you must have Python, Ansible and Docker installed on your machine
You can install docker using: sudo apt-get install docker.io

  1. Build your Ansible inventory and global/host variables using the samples:
  • host_vars/mc.myhost.com.secret.yml.sample
  • host_vars/mc.myhost.com.yml.sample
  • inventory.yml.sample
  1. Ansible supports encrypted data vaults. Rename .vault_pass.sh.sample to .vault_pass.sh and put your vault key in. Even if you're not using vaults, the file must still exist!

Creating servers

  1. Trigger make servers to build images and run servers.
    -- Save the server icon(s) you want as roles/servers/files/{host}/{instance}.png

Updating ops/whitelist

  1. Trigger make perms.
    -- Define ops/whitelist in {host}.yml

Creating .mrpacks

  1. Trigger make mrpack.
    -- The files are put into the mrpacks folder

Running relay bots

  1. Ensure you have the required setup:
  • Discord bot token
  • Guild (Server) and Channel ID
  1. Trigger make relay.

Backing up worlds

  1. Trigger make backup.
    -- Backups will appear in roles/backup/files/{host}

🔌 Ports

fmcs-server bases all used ports off of mcs_base_port; default 25565.
Every server reserves mcs_reserve_ports ports for itself; default 10.

e.g. if you have multiple servers on one machine, they would be: 25565, 25575, etc...

A list of ports, relative to mcs_base_port:

  • +0 (UDP/TCP): Main server
  • +1 (TCP): Rcon (the relay bot does not need this to port to be open on the host machine to work!)
  • +2 (UDP): Port opened for voice chat mods such as Simple Voice Chat
  • +3 (TCP): Autoconfigured for Dynmap

Pre-commit 🛡️

There is a pre-commit hook that you should enable to ensure you don't commit any unencrypted secret:
ln .hooks/pre-commit .git/hooks/pre-commit

Bug reports & feature suggestions 🐛

Has something gone horribly wrong? Or do you just think something's missing?

Feel free to create a new issue, join the Discord, or message me directly on Discord about it: raspy#0292.

If you're reporting a bug, it's most useful to me if you can find a way to consistently replicate the issue.

About

Fabric Minecraft server set-up with Server<->Discord relay bot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published