Compare commits

..

5 commits

Author SHA256 Message Date
377aa28aa4 improve description 2025-12-28 00:09:27 +01:00
1002a471ba
add velocity
the server now utilizes the velocity proxy for
- domain based connection instead of ports (called forced-hosts in velocity)
- a fancy motd message indicating when only the minecraft server is down, but not the host system
2025-12-27 23:31:10 +01:00
3164df2579
now signed as well 2025-12-16 00:53:09 +01:00
0289aab9b0 fix rcon and intruduce systemd integration 2025-12-16 00:36:16 +01:00
a0d0c47b53
shutdown via rcon 2025-12-15 20:14:13 +01:00
18 changed files with 127 additions and 31 deletions

View file

@ -2,7 +2,7 @@ on:
workflow_dispatch: workflow_dispatch:
push: push:
tags: tags:
- 'jre-alpine*.**/v**' - 'jre-alpine*.**.*/v**'
schedule: schedule:
- cron: '0 0 1-31 1-12 1' - cron: '0 0 1-31 1-12 1'

View file

@ -1,7 +1,7 @@
## About MMS ## About MMS
This is a **M**odded **M**inecraft **S**erver project, mostly a modpack. (please tell me a better name than MMS, I'm open for suggestions) **M**odded **M**inecraft **S**erver project - the name says it all (I'm open for suggestions if you've got a better name). This repository is mostly about the modpack and includes other info like the configuration of the official server running at mms.nanody.de.
MMS is centralised around the [Create mod](https://github.com/Fabricators-of-Create/Create). Why Create? Because it's a cool mod, obviously! MMS revolves around the [Create mod](https://github.com/Fabricators-of-Create/Create). Why Create? Because it's a cool mod, obviously!
Apart from that there are 4 goals: Apart from that there are 4 goals:
- Only add features and functionality to the game, keep the vanilla features and functionality untouched. Complex Redstone contraptions, for example, which are supposed to work in vanilla, should also work with the MMS modpack. - Only add features and functionality to the game, keep the vanilla features and functionality untouched. Complex Redstone contraptions, for example, which are supposed to work in vanilla, should also work with the MMS modpack.
- Find a middle ground between being too minimalistic and too bloated. - Find a middle ground between being too minimalistic and too bloated.

27
server/MMS.container Normal file
View file

@ -0,0 +1,27 @@
[Unit]
Description=Modded Minecraft Server via Podman managed by Systemd
Documentation=https://git.nanody.de/anonoe/MMS
Wants=velocity.service
After=velocity.service
[Container]
Image=git.nanody.de/anonoe/jre-alpine:latest
AutoUpdate=registry
PublishPort=25566:25565/tcp
PublishPort=24455:24455/udp
UserNS=keep-id
Mount=type=bind,src=/PATH/TO/server,dst=/mnt/server
Mount=type=bind,src=/PATH/TO/rcon,dst=/mnt/rcon
WorkingDir=/mnt/server
PodmanArgs=--tty --interactive
Exec=java -Xmx4G -Xms1G -jar minecraft_server.jar --nogui
[Service]
SuccessExitStatus=0 143
TimeoutStartSec=480
TimeoutStopSec=480
ExecStop=-podman exec systemd-MMS sh /mnt/rcon/stop.sh
[Install]
# Start by default on boot
WantedBy=default.target

View file

@ -1,13 +0,0 @@
version: '3.8'
services:
jre-hl-mc-MMS:
image: alp-jre-21-hl:latest
volumes:
- ./server:/mnt/server
working_dir: /mnt/server
command: ["java", "-Xmx4G", "-Xms1G", "-jar", "minecraft_server.jar", "--nogui"]
ports:
- "25565:25565/tcp" # minecraft
- "24454:24454/udp" # simple voicechat
tty: true
# restart: unless-stopped

View file

@ -1,12 +0,0 @@
podman run \
--rm \
--name jre-hl-mc-MMS \
--tty \
--interactive \
--publish 25565:25565/tcp \
--publish 24454:24454/udp \
--volume ./server:/mnt/server \
--workdir /mnt/server \
alp-jre-21-hl:latest \
java -Xmx4G -Xms1G -jar minecraft_server.jar --nogui

5
server/rcon/rconrc Executable file
View file

@ -0,0 +1,5 @@
[MMS]
hostname = 0.0.0.0
port = 25575
password = PUT_PASSWORD_HERE_FROM_server.properties
minecraft = true

15
server/rcon/stop.sh Executable file
View file

@ -0,0 +1,15 @@
alias rc='rcon -c /mnt/rcon/rconrc -s MMS '
rc 'tellraw @a ["",{"text":"!WARNING!","bold":true,"color":"red"}," The server will ",{"text":"shut down or restart","hoverEvent":{"action":"show_text","contents":"The state is unknown (like quantum physics)"}}," in",{"text":" 10","color":"dark_red"}," seconds..."]'
sleep 5
rc 'tellraw @a ["Stopping in"]'
rc 'tellraw @a {"text":"5","color":"red"}'
sleep 1
rc 'tellraw @a {"text":"4","color":"red"}'
sleep 1
rc 'tellraw @a {"text":"3","color":"red"}'
sleep 1
rc 'tellraw @a {"text":"2","color":"dark_red"}'
sleep 1
rc 'tellraw @a ["",{"text":"!","obfuscated":true,"color":"dark_red"},{"text":" 1 ","color":"dark_red"},{"text":"!","obfuscated":true,"color":"dark_red"}]'
sleep 1
rc stop

View file

@ -0,0 +1,4 @@
hackOnlineMode = true
hackEarlySend = false
hackMessageChain = false
secret = "PUT SOMETHING HERE"

View file

@ -6,7 +6,7 @@
# Set this to '-1' to use the same port number that is used by the Minecraft server. # Set this to '-1' to use the same port number that is used by the Minecraft server.
# However, it is strongly recommended NOT to use the same port number because UDP on # However, it is strongly recommended NOT to use the same port number because UDP on
# it is also used by default for the server query. Doing so may crash the server! # it is also used by default for the server query. Doing so may crash the server!
port=24454 port=24455
# The server IP address to bind the voice chat to # The server IP address to bind the voice chat to
# Leave blank to use the 'server-ip' property from the 'server.properties' config file # Leave blank to use the 'server-ip' property from the 'server.properties' config file
# To bind to the wildcard IP address, use '*' # To bind to the wildcard IP address, use '*'

Binary file not shown.

Binary file not shown.

View file

@ -46,9 +46,9 @@ server-port=25565
enable-jmx-monitoring=false enable-jmx-monitoring=false
enable-query=false enable-query=false
query.port=25565 query.port=25565
enable-rcon=false enable-rcon=true
rcon.port=25575 rcon.port=25575
#password is redacted # PUT A PASSWORD HERE
rcon.password= rcon.password=
use-native-transport=true use-native-transport=true
network-compression-threshold=256 network-compression-threshold=256

23
server/velocity.container Normal file
View file

@ -0,0 +1,23 @@
[Unit]
Description=Minecraft Proxy Velocity via Podman managed by Systemd
Documentation=https://docs.papermc.io/velocity/
[Container]
Image=git.nanody.de/anonoe/jre-alpine:latest
AutoUpdate=registry
PublishPort=25565:25565/tcp
PublishPort=24454:24454/udp
UserNS=keep-id
Mount=type=bind,src=PATH/TO/velocity,dst=/mnt/server
WorkingDir=/mnt/server
PodmanArgs=--tty --interactive
Exec=java -Xms500M -Xmx500M -XX:+UseG1GC -XX:G1HeapRegionSize=4M -XX:+UnlockExperimentalVMOptions -XX:+ParallelRefProcEnabled -XX:+AlwaysPreTouch -XX:MaxInlineLevel=15 -jar velocity.jar
[Service]
SuccessExitStatus=0 143
TimeoutStartSec=480
TimeoutStopSec=480
[Install]
# Start by default on boot
WantedBy=default.target

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,7 @@
# Simple Voice Chat proxy config v2.6.4
# The port number to use for the voice chat communication.
# Audio packets are always transmitted via the UDP protocol on the port number
# specified here, independently of other networking used for the game server.
# Set this to '-1' to use the same port number as the one used by the proxy.
port=24454

View file

@ -0,0 +1 @@
velocity-3.4.0-SNAPSHOT-558.jar

View file

@ -0,0 +1,39 @@
# Config version. Do not change this
config-version = "2.7"
# What should be the MOTD? This gets displayed when the player adds your server to
# their server list. Only MiniMessage format is accepted.
motd = "<#09add3>The Server is down (╯°□°)╯︵ ┻━┻"
# Should we forward IP addresses and other data to backend servers?
# Available options:
# - "none": No forwarding will be done. All players will appear to be connecting
# from the proxy and will have offline-mode UUIDs.
# - "legacy": Forward player IPs and UUIDs in a BungeeCord-compatible format. Use this
# if you run servers using Minecraft 1.12 or lower.
# - "bungeeguard": Forward player IPs and UUIDs in a format supported by the BungeeGuard
# plugin. Use this if you run servers using Minecraft 1.12 or lower, and are
# unable to implement network level firewalling (on a shared host).
# - "modern": Forward player IPs and UUIDs as part of the login process using
# Velocity's native forwarding. Only applicable for Minecraft 1.13 or higher.
player-info-forwarding-mode = "modern"
[servers]
# Configure your servers here. Each key represents the server's name, and the value
# represents the IP address of the server to connect to.
#lobby = "127.0.0.1:30066"
#factions = "127.0.0.1:30067"
#minigames = "127.0.0.1:30068"
mms = "host.containers.internal:25566"
# In what order we should try servers when a player logs in or is kicked from a server.
try = [
"mms"
]
[forced-hosts]
"nanody.de" = [
"mms"
]
"mms.nanody.de" = [
"mms"
]