How to Make a Minecraft Server
Prerequisites
Before starting, you will need to complete the following tasks:
- VS Code: Download and install from the VS Code website.
- Remote - SSH Extension: Install from the VS Code marketplace.
Additionally, this tutorial will assume that you are familiar with the following topics:
- VS Code: A code editor with loads of functionality that makes programming as convenient and seamless as possible.
Creating an Oracle Cloud VM Instance
Follow this tutorial and stop when you get to the ‘Connect to the Running VM in the Cloud’ section.
Connecting to the VM Instance
Create a file named start_server.sh containing:
nohup java -Xmx9G -Xms9G -jar <server_filename> nogui &
Replace <server_filename> with the filename of your server (e.g. server.jar).
Optional Content: What the Command Means
nohup: Without it, your server will quit when you exit the remote session.-Xmx9G -Xms9G: Sets the server RAM to 9GB, the optimal amount of RAM per the Minecraft wiki.1 Xmx is maximum RAM while Xms is minimum RAM, though it is best practice to keep these two values the same.1nogui: Disables the native Minecraft server interface from launching.1&: Runs the server in the background so your terminal is free.
Now when you want to start the server, run:
./start_server.sh