No description
Find a file
2025-08-10 16:31:28 -04:00
.hooks init 2023-06-23 04:43:18 -04:00
group_vars stop fucking lagging 2025-02-02 12:58:32 -05:00
host_vars chili-smp: move relay 2025-08-08 23:45:36 -04:00
library support targeting individual instances 2025-05-01 12:51:09 -04:00
playbooks support targeting individual instances 2025-05-01 12:51:09 -04:00
roles separate colors into commands.go 2025-08-10 16:31:28 -04:00
.gitignore nix dev env 2025-08-08 23:45:02 -04:00
.vault_pass.sh.sample improve samples; remove cron sudo req 2023-10-14 23:11:17 -04:00
ansible.cfg fix lib 2025-01-03 02:20:37 -05:00
flake.lock nix dev env 2025-08-08 23:45:02 -04:00
flake.nix nix dev env 2025-08-08 23:45:02 -04:00
inventory.yml.sample improve samples; remove cron sudo req 2023-10-14 23:11:17 -04:00
Makefile create relay_nopack directive 2025-08-08 23:45:18 -04:00
mrpack.py Merge branch 'prod' 2025-08-08 23:46:40 -04:00
README.md Merge branch 'main' of github.com:jack-avery/fmcs-server 2025-01-03 02:23:21 -05:00
requirements.txt update readme, fix my_host sample tip 2023-10-05 10:35:44 -04:00
shell.nix add golangci-lint, satisfy some complaints 2025-08-09 03:34:18 -04:00

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. On the server, run:
  • sudo apt-get install openjdk-21-jre-headless python3 python3-pip - install java and python
  • useradd -Um fmcs - add the "fmcs" user
  • sudo loginctl enable-linger fmcs - enable systemd service lingering for the user
  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 or join the Discord.

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