Steps & Commands To Host 24/7 Minecraft Server for Free With 16GB RAM
- Visit (getButton) #text=(Lightning.ai) #icon=(link) and Signup for Free !
- Create a new folder and name it
mc_server (code-box)
on left hand side.
- Download server jar file (getButton) #text=(Download Papermc Site Link) #icon=(link) of your choice from internet and rename it to server.jar
- Upload server.jar file in
mc_server folder.(alert-passed)
- Now click on “view” and then “terminal” to show terminal.
In terminal enter these commands
sudo -s apt update && apt upgrade -y (code-box)
- Download the appropriate version of Localtonet for their Linux distribution using a tool like wget.
wget https://localtonet.com/download/localtonet-linux-x64.zip (code-box)
- Extract the downloaded file from the zip archive
unzip localtonet-linux-x64.zip (code-box)
- Grant read and write permissions to the Localtonet executable
chmod 777 ./localtonet (code-box)
- Now go in “mc_server” dir and try to start your minecraft server
cd mc_server (code-box)
apt install openjdk-21-jre (code-box)
java -Xmx14G -Xms2G -jar server.jar nogui (code-box)
- It will ask you to accept “eula”, accept it by editing eula.txt file and changing “eula=false” to “eula=true”
apt install nano (code-box)
nano eula.txt (code-box)
- 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 (code-box)
- Next we need a Server IP to connect to our minecraft server
- To get that Visit (getButton) #text=(Localtonat.com) #icon=(link) 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 (code-box)
./localtonet authtoken PASTE_HERE_COPIED_AUTHTOKEN (code-box)
- After completing these steps, create a “TCP-UDP” tunnel from (getButton) #text=(Localtonat.com) #icon=(link) 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 !