How to Reliably Run a Minecraft Server on OCI Using Systemd for Auto-Restarts
In this guide, we will build on the previous tutorial for setting up a modded Minecraft server on Oracle Cloud Infrastructure (OCI). You will learn how to configure your Minecraft server to run as a systemd service, ensuring it starts automatically at boot and restarts in case of crashes. Step 1: Verify Your Server Setup Before proceeding, ensure that: You have completed the basic setup of a Minecraft server on OCI as outlined in the previous guide. The Minecraft server files are located in ~/minecraft and can be started with the command: java -Xmx8G -Xms8G -jar forge-*.jar nogui Replace 8G with your desired RAM allocation. Step 2: Create a Systemd Service File Open a terminal and switch to the root user: sudo su Navigate to the systemd configuration directory: cd /etc/systemd/system Create a new service file for your Minecraft server: nano minecraft.service Add the following configuration to the file: [Unit] Description=Minecraft Server After=network.targe...