Minecraft is one of the unique games which lets you create a personal server for multi-player gaming. You can host a Minecraft server on Windows, Linux, and macOS, but it doesn’t support Android devices which is a bummer. Having a portable server like an Android device would have surely made playing Minecraft a lot more fun. So in search of a solution, we discovered an interesting way which lets you host a Minecraft server on an Android device. The process is a bit lengthy and technical, but if you want to do it, you can definitely do it. So without further ado, let’s go ahead and learn how to host a Minecraft server on Android.
Host Minecraft Server on Android
Let me put it straight, the process is a bit complex and you will need some degree of technical knowledge in dealing with command terminal. From my side, I have tried to simplify the process as much as possible. Anyway, to give you a brief overview, we are going to install Ubuntu on top of Android. And from there, we can install a Minecraft server seamlessly. Now having said that, let’s begin with the first setup.
Note: We have done our testing on the OnePlus 7 Pro. You can use any other Android device preferably with higher RAM and decent processor.
Install Ubuntu on Your Android Device
2. Now, launch AnLinux app and tap on the “Choose” button and select “Ubuntu”. After that, tap on “Copy”.
3. Now open the Termux app, paste the copied script and tap the “Enter” key. Termux will start downloading Ubuntu and it will take 2-3 minutes to install Ubuntu.
4. After the installation is done, paste and run the following command to launch Ubuntu. Now, you will see [email protected] on Termux. It means Ubuntu is successfully running on your Android device.
Install Java Development Kit on Ubuntu
1. Now that we have installed Ubuntu, let’s install some packages required to run Minecraft server. First off, we will install the JDK package on Ubuntu. Copy the following command and run it on Termux. Now, wait for the installation to complete.
apt-get install software-properties-common
2. After that, copy the following commands and run on Termux one by one. At times, Termux will seek your approval before installation so allow those requests. This whole process will take 3-4 minutes.
add-apt-repository ppa:openjdk-r/ppa apt-get update apt-get install openjdk-8-jre
Install Minecraft Server on Android
With the installation of Ubuntu and JDK, we have almost set up the base required to run a personal server. Now, we will finally install a Minecraft server on Android. Here are the steps to follow.
1. Open the Minecraft Server page from this link on your Android device. Here, tap and hold on “minecraft-server.jar” and copy the download link.
2. Now, move to Termux and paste the command mentioned below. Make sure to replace the https link with the download link copied above. It will look something like this on Termux. Now, tap the enter key to run the command and it will start installing Minecraft Server on your Android device.
wget -O minecraft_server.jar https://launcher.mojang.com/v1/objects/3dc3d84a581f14691199cf6831b71ed1296a9fdf/server.jar
3. After the installation is complete, run the following command to change the file permission. This time, Termux won’t prompt anything, but changes have been made. Now move to the next section.
chmod +x minecraft_server.jar
Run Minecraft Server on Android
1. You have successfully installed a Minecraft server on Android. Now, we will try to run the server. Copy the following command and run it on Termux. Do note, it will fail on the first run due to non-compliance of the EULA agreement. Worry not, move to the next step to fix it.
java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
2. Run the following commands one by one. It will let you access the EULA agreement and then you can make changes accordingly.
apt-get install nano nano eula.txt
3. On the Nano text editor, change “eula=false” to “eula=true”. Editing text file on Nano editor is tricky though. You can’t navigate using the touchscreen. So, press the “down” key thrice to bring the cursor below the last text. After that, press backspace to move to the above line and then keep pressing backspace to delete false. Now, you can type true.
4. After you have changed the EULA text, tap “CTRL” and then tap the “x” key. It will ask for modifying the file, press “y” and it will save the changes. Finally, tap the “Enter” key and you will be back to Termux.
5. Now, run the same command again as we did in the first step and this time, Minecraft Server will successfully run on your Android phone. Here is the command, if you need again. The process will not take more than a minute.
java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
Tunnel Your Local Minecraft Server to the Internet
So far, we have installed a Minecraft server on our Android device, but we need to bring the server online through a secure tunneling tool called Ngrok. It creates a secure public URL of your server which you can share with your friends for multi-player Minecraft gaming. Here is how to do it.
1. Open the Ngrok download page and tap and hold on “Linux (ARM64)”. Now, copy the download link.
2. After that, go back to Termux and paste the following command. Make sure to replace the https link with the copied Ngrok link from the above step. Now, tap the “Enter” key and it will start installing Ngrok on your Android device.
wget -O ngrok.zip https://bin.equinox.io/a/nmkK3DkqZEB/ngrok-2.2.8-linux-arm64.zip
3. After the installation, run these commands one by one.
apt-get install zip unzip unzip ngrok.zip
4. After you have done that, open the Sign Up page of Ngrok and create an account. Now log in and it will offer you an authentication token under “Connect Your Account” section. Copy the authtoken key.
5. Now run the authtoken key on Termux. It will look something like this.
./ngrok authtoken 1QVNoeHerkYbSncmdjIj2yfaGNk_3Zt1hTF1nY9WyGY5BoSU2
6. After that, run the below command and Ngrok status window will open. If it shows session status as “online”, you have successfully created your personal Minecraft server on Android. Your Minecraft server is live on the internet.
./ngrok tcp 25565
7. Now, copy the “Forwarding” address which starts with tcp. It’s the public URL that you can share with your friends for Minecraft multi-player gaming. It should look something like this.
8. If you want to exit from internet tunneling, tap “CTRL” and “C” keys and your Minecraft server will go offline.
Play Multi-Player Minecraft with Your Friends
Open Minecraft and log in to your account. Go to Multi-player menu and open “Direct Connect”. Here, paste the Forwarding address copied from Step 7 in the above section and press the “Join Server” button. Voila, you are connected to your personal Minecraft server hosted on an Android device. Enjoy!
Host Minecraft Server on Android and Enjoy Personal Gaming
So that was our long guide on how to create a Minecraft server on Android smartphones. As we can see, the steps are quite technical and you have to set up a lot of things before you can create an online server. Nevertheless, I have tried to make the process as simple as possible with collaborative steps and screenshots. Anyway, that is all from our side. If you were able to create a Minecraft server on your Android device, do share your forward address. We would love to play Minecraft with you.