src.nth.io/

summaryrefslogtreecommitdiff
path: root/minecraft/templates
diff options
context:
space:
mode:
Diffstat (limited to 'minecraft/templates')
-rw-r--r--minecraft/templates/minecraft.service.j222
-rw-r--r--minecraft/templates/server.properties.j244
2 files changed, 66 insertions, 0 deletions
diff --git a/minecraft/templates/minecraft.service.j2 b/minecraft/templates/minecraft.service.j2
new file mode 100644
index 0000000..d310634
--- /dev/null
+++ b/minecraft/templates/minecraft.service.j2
@@ -0,0 +1,22 @@
+[Unit]
+Description=Minecraft Server
+Documentation=https://minecraft.gamepedia.com/Tutorials/Setting_up_a_server
+
+Wants=network.target
+After=network.target
+
+[Service]
+User={{minecraft_user}}
+Group={{minecraft_user}}
+WorkingDirectory={{minecraft_dir}}
+Restart=on-failure
+RestartSec=20 5
+ExecStart=/usr/bin/java -Xms1536M -Xmx1536M -jar server.jar nogui
+
+PrivateTmp=true
+ProtectSystem=full
+NoNewPrivileges=true
+PrivateDevices=true
+
+[Install]
+WantedBy=multi-user.target
diff --git a/minecraft/templates/server.properties.j2 b/minecraft/templates/server.properties.j2
new file mode 100644
index 0000000..b2a8411
--- /dev/null
+++ b/minecraft/templates/server.properties.j2
@@ -0,0 +1,44 @@
+broadcast-rcon-to-ops=true
+view-distance=10
+max-build-height=256
+server-ip=
+level-seed=
+rcon.port=25575
+gamemode=survival
+server-port=25565
+allow-nether=true
+enable-command-block=false
+enable-rcon=false
+enable-query=false
+op-permission-level=4
+prevent-proxy-connections=false
+generator-settings=
+resource-pack=
+level-name=world
+rcon.password=
+player-idle-timeout=0
+motd={{minecraft_motd}}
+query.port=25565
+force-gamemode=false
+hardcore=false
+white-list=false
+broadcast-console-to-ops=true
+pvp=true
+spawn-npcs=true
+generate-structures=true
+spawn-animals=true
+snooper-enabled=true
+difficulty=easy
+function-permission-level=2
+network-compression-threshold=256
+level-type=default
+spawn-monsters=true
+max-tick-time=60000
+enforce-whitelist=false
+use-native-transport=true
+max-players=20
+resource-pack-sha1=
+spawn-protection=16
+online-mode=true
+allow-flight=false
+max-world-size=29999984