From 0a00f0a64578ebd5339c67e23424113e2e991545 Mon Sep 17 00:00:00 2001 From: zleyyij Date: Sun, 23 Jul 2023 09:12:03 -0600 Subject: [PATCH] vault backup: 2023-07-23 09:12:03 --- Setting up a Minecraft server.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Setting up a Minecraft server.md b/Setting up a Minecraft server.md index 8f39250..45c7018 100644 --- a/Setting up a Minecraft server.md +++ b/Setting up a Minecraft server.md @@ -62,6 +62,8 @@ iptables: ``` iptables -A INPUT -p tcp --dport 25565 -j ACCEPT ``` + +# Deploying Minecraft as a systemd service This enables minecraft to run in the background, restart if it crashes, etc etc. In `/etc/systemd/system`, place this file and tailor it to your liking. @@ -78,8 +80,11 @@ After=network-online.target # User=foo # Group=bar +# Where you want the command to be run + + # This command is run when the service is started -|ExecStart=/usr/bin/java -Xmx8G -Xms3g -jar /path/to/server.jar --nojline --noconsole +ExecStart=/usr/bin/java -Xmx8G -Xms3g -jar /path/to/server.jar --nojline --noconsole ```