Steps & Commands To Host 24/7 Minecraft Server for Free With 16GB RAM
- Visit Lightning.ai and Signup for Free !
- Create a new folder and name it
mc_server
on left hand side.
- Download server jar file Download Papermc Site Link of your choice from internet and rename it to server.jar
- Upload server.jar file in
- Now click on “view” and then “terminal” to show terminal.
In terminal enter these commands
sudo -s apt update && apt upgrade -y
- Download the appropriate version of Localtonet for their Linux distribution using a tool like wget.
wget https://localtonet.com/download/localtonet-linux-x64.zip
- Extract the downloaded file from the zip archive
unzip localtonet-linux-x64.zip
- Grant read and write permissions to the Localtonet executable
chmod 777 ./localtonet
- Now go in “mc_server” dir and try to start your minecraft server
cd mc_server
apt install openjdk-21-jre
java -Xmx14G -Xms2G -jar server.jar nogui
- It will ask you to accept “eula”, accept it by editing eula.txt file and changing “eula=false” to “eula=true”
apt install nano
nano eula.txt
- Note : similarly you can edit “server.properties” file using command “nano server.properties”
- Now you can use the command below to start your minecraft server
java -Xmx14G -Xms2G -jar server.jar nogui
- Next we need a Server IP to connect to our minecraft server
- To get that Visit Localtonat.com and Signup for Free. On Dashboard you will find your authtoken.
- Now open a new terminal on lightning.ai and enter the authentication token using the following command, replacing PASTE_HERE_COPIED_AUTHTOKEN with the actual token:
sudo -s
./localtonet authtoken PASTE_HERE_COPIED_AUTHTOKEN
- After completing these steps, create a “TCP-UDP” tunnel from Localtonat.com dashboard by selecting prefered server location.
- Now You will get the IP and Port which you can use to join your minecraft server.
- You can access your minecraft server files and console on lightning.ai.
Note : From next time whenever you want to start the server , just open lightning.ai website – open this studio – view terminal – enter “sudo -s” then enter “cd mc_server” then start the Minecraft server with this command “java -Xmx14G -Xms2G -jar server.jar nogui”
This minecraft server will be online 24/7.
Enjoy !