How to install a Minecraft Java server on Ubuntu UserLand (Local Server)
In this article, we will guide you through the process of installing a Minecraft Java server on Ubuntu UserLand. This setup allows you to run a local server on your Android device, enabling you to play Minecraft with friends or by yourself.
Prerequisites
- UserLand installed on your Android device
- Basic knowledge of Linux commands
- A stable internet connection
- Android device must have at least 6GB of RAM
- It must have a minimum internal memory or ROM of 128GB
Step 1: Open UserLand app
Choose an ubuntu distro
Wait for the process to finish.
If you are done, you will see the terminal environment of Ubuntu UserLand. Then type this command.
sudo apt update && sudo apt upgrade -y Step 2: Install Java 21, nano, and screen
To install Java 21, you can use the command:
sudo apt install openjdk-21-jdk -y After the installation is complete, you can verify the Java installation by checking the version:
java -version To install nano, use the following command:
sudo apt install nano To install screen, use the following command:
sudo apt install screen Step 3: Download the Minecraft Server
First you need to create a directory. Use this command:
mkdir minecraft-server && cd minecraft-server Next, download the Minecraft server jar file. You can use the following command:
wget https://piston-data.mojang.com/v1/objects/e6ec2f64e6080b9b5d9b471b291c33cc7f509733/server.jar Wait for the download to finish.
Once the download is complete, you can see server.jar in your directory.
Step 4: Run the server for the first time, you will need to agree to the EULA later
Run the server with the following command:
java -Xmx4024M -Xms1024M -jar server.jar nogui After running the server, you will see an error message indicating that you need to agree to the EULA. To do this, open a file named eula.txt in the same directory and change the line:
nano eula.txt change eula=false to eula=true Exit nano by pressing CTRL + X, then Y to confirm changes, and Enter to save.
Step 5: Start the Server
Now you can start your Minecraft server again with the following command:
java -Xmx4024M -Xms1024M -jar server.jar nogui Step 6: Find Your IP Address
You need to find the IP address of your Android device. Open settings and navigate to the "About phone" section, then navigate to the "Status information" and look for the "IP address" entry.
Make a note of this IP address, as you will need it to connect to your server.
Step 7: Connect to the Server
To connect to your Minecraft server, open the Minecraft client and select "Multiplayer". Then click "Add Server" and enter the following information:
- Server Name: Your server name
- Server Address: The IP address of your Android device
Click "Done" and then select your server from the list to join.
Optional but Recommended: Running the Server in the Background
If you want to run the server in the background, you can use the screen command:
screen -S minecraft-server This will create a new screen session named "minecraft-server". You can then start your server inside this session.
To detach from the screen session, press CTRL + A, then D. You can reattach to the session later with:
screen -r minecraft-server To exit the screen session completely, you can use the command:
exit This will terminate the screen session and return you to the regular terminal.
Troubleshooting Tips
- If you encounter issues, check your internet connection.
- Ensure that you have enough storage space on your device.
- Make sure you have the correct version of the server jar file.
- If the server fails to start, check the logs for errors.
Conclusion
Congratulations! You have successfully installed a Minecraft Java server on Ubuntu UserLand. You can now invite your friends to join your server and enjoy playing Minecraft together.
Remember to keep your server updated and backed up regularly to avoid losing your progress.
For more information and advanced configurations, refer to the official Minecraft server documentation.