Skip to content

Modded Minecraft Server with OCI

Notes

Modpack used here is RLCraft Dregora v1.0.0, setup may be slightly different to other packs and newer versions of this pack.

Get an OCI Instance

Use the official oracle guide for the initial setup.

Always free VMs are hard to get especially for crowded regions, you can use this script to automate the clicking. Do note that there's a low chance that you'll be able to get an instance with this method.

If your account is new, use the trial credits and create a paid VM while you try to get an ARM VM. When you finally get an instance or if your trial is about to end, you can detach the current volume before deleting the VM to keep your server data. Make sure to use another Linux ARM instance as you cannot reattach the boot volume of your x86 instance.

Easiest way to get an instance is to upgrade your account to pay-as-you-go and stick to the limits of the always free tier to avoid getting charged.

Setting up the VM

Most modern modpacks comes with a server pack that can be used to quickly setup your server instead of manually creating your own. Check the modpacks page or discord for information about the server pack.

Manual setup

Get Java that supports your modpack, replace # with required Java version.

sudo apt install openjdk-#-jdk

Install the modloader that matches the version of your desired modpack, in this case Forge is needed. Not all modpacks uses forge, check the modpack page or zip as they contain notes on their mod loader. Open the forge .jar to install server then move the generated files to where the modpack data will go. Download the modpack server pack and unzip.

Forge

java -jar <forge-installer.jar> --installServer

Before starting your server create a script that will hold the server arguments, this will tell the server how much resources and what flags it will use.

Use this script generator for your run script and ensure that the .sh script is an executable

nano <script.sh>

chmod +x <script.sh>

Starting the server

Create a tmux instance and run the server from there. What tmux does is it allows you to keep the server running after when you exit your session and use it for other things.

tmux new -s <session_name>  create tmux instace

ctrl+b d                    exit tmux instance
tmux a -t <session_name>    rejoin tmux instance
Run the script ./<script.sh>.

Edit the eula then restart your script.

nano eula.txt

eula=true