How to Set Up and Run a Minecraft Server with Forge and Mods on OCI Free Tier

 

How to Set Up and Run a Minecraft Server with Forge and Mods on OCI Free Tier

Oracle Cloud Infrastructure (OCI) offers a generous always-free tier, making it a fantastic option to host a modded Minecraft server. This guide will walk you step-by-step through setting up a Minecraft server with Forge and mods, even if you’re a complete beginner.


Step 1: Sign Up for Oracle Cloud Free Tier

  1. Visit Oracle Cloud’s Free Tier page.
  2. Click on "Start for Free" and create an account. You’ll need to provide a valid email, phone number, and credit card for verification (no charges will be made).
  3. Once your account is set up, log in to the Oracle Cloud Console.

Step 2: Create a Virtual Machine Instance

  1. In the Oracle Cloud Console, go to Compute > Instances.
  2. Click on "Create Instance".
  3. Fill in the details:
    • Name: Enter "MinecraftServer".
    • Image and Shape:
      • Click "Edit" next to "Image and Shape".
      • Image: Select Ubuntu 22.04.
      • Shape: Choose the Ampere A1 instance with 4 OCPUs and 24 GB of RAM.
    • Networking:
      • Select the default Virtual Cloud Network (VCN) and subnet automatically created by Oracle.
    • Add SSH Key: Paste the public SSH key from your local machine. If you don’t have an SSH key:
      • Run ssh-keygen on your computer to generate a key pair.
      • Use the public key located at ~/.ssh/id_rsa.pub.
  4. Click "Create" to launch your instance.

Step 3: Connect to Your Instance

  1. Open a terminal on your computer.
  2. Connect to the instance using SSH:
    ssh -i ~/.ssh/id_rsa ubuntu@<instance-public-ip>
    
    Replace <instance-public-ip> with the public IP address of your instance (found in the OCI Console under your instance details).

Step 4: Install Java and Required Tools

  1. Update the package list:
    sudo apt update && sudo apt upgrade -y
    
  2. Install Java:
    sudo apt install openjdk-17-jre -y
    
  3. Install other tools:
    sudo apt install unzip wget -y
    

Step 5: Download and Set Up Minecraft Server

  1. Create a directory for the Minecraft server:
    mkdir ~/minecraft && cd ~/minecraft
    
  2. Download the latest Minecraft Forge installer for the server from Forge’s official website.
    • Copy the direct download link for the installer version.
    • Use wget to download:
      wget <forge-installer-url>
      
      Replace <forge-installer-url> with the copied link.
  3. Run the Forge installer:
    java -jar forge-*.jar --installServer
    
  4. Accept the EULA:
    echo "eula=true" > eula.txt
    

Step 6: Set Up Mods

  1. Download your desired mods from a trusted source like CurseForge.
  2. Upload the mod files to your server using SCP:
    scp -i ~/.ssh/id_rsa <mod-file>.jar ubuntu@<instance-public-ip>:~/minecraft/mods
    
    Replace <mod-file>.jar with the name of your mod file.
  3. Ensure all mods are compatible with the Forge version you installed.

Step 7: Open the Required Port

  1. In the Oracle Cloud Console, go to Networking > Virtual Cloud Networks.
  2. Click on your default VCN.
  3. Select the Subnet used by your instance.
  4. Under Security Lists, click on the default security list.
  5. Add a new ingress rule:
    • Source CIDR: 0.0.0.0/0 (to allow connections from anywhere).
    • IP Protocol: TCP.
    • Source Port Range: Leave blank.
    • Destination Port Range: 25565 (Minecraft’s default port).
  6. Save the rule.

Step 8: Start the Server

  1. Navigate back to the Minecraft server directory:
    cd ~/minecraft
    
  2. Start the server:
    java -Xmx8G -Xms8G -jar forge-*.jar nogui
    
    • Replace 8G with the amount of RAM you want to allocate (adjust based on your mods and server needs).
  3. Keep the terminal session open to keep the server running, or use a tool like tmux to run it in the background:
    sudo apt install tmux -y
    tmux
    java -Xmx8G -Xms8G -jar forge-*.jar nogui
    
    • Detach from tmux by pressing Ctrl+B and then D.

Step 9: Connect to Your Server

  1. Open Minecraft on your computer and select the same version as your Forge server.
  2. Go to Multiplayer and click Add Server.
  3. Enter your server’s public IP address and click Done.
  4. Join the server to start playing.

Comments

Popular posts from this blog

Is Docker Still Relevant in 2025? A Practical Guide to Modern Containerization

Going In With Rust: The Interview Prep Guide for the Brave (or the Mad)

Becoming an AI Developer Without the Math PhD: A Practical Journey into LLMs, Agents, and Real-World Tools