Minecraft is one of the most famous games. What makes it even better is that it allows you to create your own server for multiplayer gaming. You can easily host a Minecraft server on Linux, macOS, and Windows PCs. But there is no straightforward method to set up the Minecraft server on Android devices.
If you have a portable Minecraft server on your Android phone, you can have fun anywhere and everywhere with your friends. So, we have figured out a cool method to host the Minecraft server on your Android device. However, the process is not very straightforward and is a bit lengthy. But you can easily get it if you pay attention. So, let’s see how to create and host a Minecraft server on an Android phone.
Host a Minecraft Server on Android Device
Please note that the process of setting up the Minecraft server on Android devices is not very easy. And you have to deal with terminal commands which require some technical knowledge. However, we have simplified the process very much. You probably won’t have a tough time following this tutorial.
So, here is a brief description of the process. First of all, we will install Ubuntu on Android. And then, we will install the Minecraft server on Ubuntu. Also please make sure to use a better configuration Android phone to have better performance. Let’s see how to set up a Minecraft server on Android devices step by step.
A) Install Ubuntu on Android
As described above, we will start with installing Ubuntu on the Android phone. So, follow these steps.
Step 1: Install the AnLinux and Termux Apps
Step 2: Open AnLinux and Click CHOOSE to Select Distro
After installing, open AnLinux app. You will see a Terms and conditions notice on the first launch. Scroll down, check I Understand, and tap on CLOSE.
Now, swipe from the left and tap on Dashboard. Here, tap on the CHOOSE button.
Step 3: Select Ubuntu to Run Minecraft Server on Android
Now, select Ubuntu (Recommended for Beginner) and tap on OK. After that, tap on the COPY button to copy the command to install Ubuntu.
SEE ALSO: How to Make your Computer a Time Server?
Step 4: Install and Start Ubuntu
After copying the command, tap on the LAUNCH button to open the Termux app. Termux app may take some time on the first launch.
Tap and hold on the terminal window in the Termux app, select PASTE to paste the copied command, and press Enter. Termux will download and install Ubuntu on your Android phone.
After installation is complete, run the
./start-ubuntu.sh command to launch the installed Ubuntu. You must see a prompt like
[email protected]:~#. Next, run
apt-get update command to update all packages to the latest version. Now, with Ubuntu installation, we have created our base to set up the Minecraft server on Android.
PLEASE NOTE: Whenever you wish to run any command on Ubuntu via Termux app, you need to run
./start-ubuntu.sh command first. Otherwise you will get command or package not found error.
B) Install Java Development Kit (JDK) on Ubuntu
After successful Ubuntu installation, it’s time to install the necessary packages to run the Minecraft server. First of all, we will start with installing the JDK package in Ubuntu.
Step 1: Open Termux and Start Ubuntu
Open Termux and make sure the prompt reads
[email protected]:~#. If not, then run the
./start-ubuntu.sh command first.
Step 2: Install JDK Packages on Ubuntu to Host Minecraft Server
Now, copy and run the following commands one by one in Termux. Wait for the installation to complete.
apt-get install software-properties-common add-apt-repository ppa:openjdk-r/ppa apt-get update apt-get install openjdk-8-jre
You may be prompted for confirmation during the installation, type
y and press Enter to continue.
C) Install and Set up Minecraft Server on Android
As we have installed Ubuntu and JDK, the platform for the Minecraft server is ready. We just need to install and configure the Minecraft server on Android.
Step 1: Get Minecraft Server Java Edition Download Link
First, go to the Minecraft Server download page on a web browser on your Android phone. Then, tap and hold on the minecraft-server.x.xx.x.jar download link and select Copy to copy the download link.
Step 2: Download Minecraft Server on Ubuntu
Now, open Termux and start the Ubuntu server. Make sure the prompt reads [email protected]:~#.
Copy the command shown below and paste it into the Termux (tap and hold, then tap on Paste).
wget -O minecraft_server.jar https://launcher.mojang.com/v1/objects/3dc3d84a581f14691199cf6831b71ed1296a9fdf/server.jar
NOTE: Replace the https link with the download link you just copied in previous step.
Press the Enter key to execute the command. Termux will download the Minecraft server on Ubuntu.
Step 3: Set up and Run Minecraft Server on Android
After downloading is completed, we need to make the downloaded file executable (So that we can run it). Run the following command to make the downloaded
minecraft_server.jar file executable.
chmod +x minecraft_server.jar
After that, we need to accept the EULA agreement. Use the following command to create a
eula.txt file and add
eula=true to it. This will work as an accepted EULA agreement. If you skip this step, the Minecraft server will not run.
echo eula=true > eula.txt
Now, run the following command to start and run Minecraft Server on your Android device.
java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
D) Bring Your Minecraft Server Online (via the Internet)
The Minecraft server is running successfully on your Android phone. But it is not available to other players. We need to bring our Minecraft server online so that other players can join.
We will use a secure tunneling tool named ngrok. This tool will create a secure public URL for our Minecraft server. Other players can use this public URL to join our Minecraft server for multi-player gaming.
Step 1: Copy Ngrok Download Link
Go to the Ngrok download page. Here, tap and hold on the Linux (ARM64) option under the MORE OPTIONS button. Next, tap on copy to copy the download link.
Step 2: Install Ngrok on Ubuntu
Next, go to the Termux app, and start Ubuntu. Then, paste the following command and press Enter.
wget -O ngrok.zip https://bin.equinox.io/a/nmkK3DkqZEB/ngrok-2.2.8-linux-arm64.zip
NOTE: Replace the https link with the ngrok link you copied in previous step.
Termux will start downloading ngrok on Ubuntu on your Android phone.
After downloading, unzip the downloaded ngrok.zip file. Run the following commands one by one.
apt-get install zip unzip unzip ngrok.zip
Step 3: Configure Ngrok Authentication Token
Now, go to the Sign Up page of Ngrok on the web browser and create an account if you don’t have one already. Login with your account and go to Connect Your Account section. Here, you will see your authentication token. Copy the whole command.
Now, configure the authentication token on Ngrok on your Android phone. Run the following command on Termux inside Ubuntu (
./ngrok authtoken 1QVNoeHerkYbSncmdjIj2yfaGNk_3Zt1hTF1nY9WyGY5BoSU2
Step 4: Bring Minecraft Server Online via Ngrok
It’s time to make our Minecraft server online. Execute the following command to run Ngrok.
./ngrok tcp 25565
If you see the Session status as online, ngrok has successfully established the connection. Your Minecraft server is ready and online.
Now, copy the Forwarding address starting with
tcp://. It is the public URL of your Minecraft server. Share this URL with your friends for Minecraft multi-player gaming. The URL looks like this (it may be different for you).
You can close ngrok tunneling by entering CTRL + C keys. This will bring your Minecraft server offline.
SEE ALSO: How to Make your Computer a Web Server?
E) Play Multi-Player Minecraft Game with Your Friends
We have successfully set up Minecraft server on an Android device. It’s time to test the Minecraft server we just created.
Launch the Minecraft app and log in to your account. Next, go to the Multi-player menu and select Direct Connect. Now, paste the Forwarding address we copied after running Ngrok. Finally, tap on the Join Server button to connect to your newly created personal Minecraft server.
SEE ALSO: How to Play Roblox Games on Chromebook?
Host Minecraft Server on Android Phone
The above tutorial explained how you can set up a Minecraft server on your Android phone. We agree the process is lengthy and complex but we have tried to make it easy for you by dividing it into parts. Hope you will get it easily. After setting up the Minecraft server and firing up Ngrok tunnel, simply share the Forwarding address with your friends and enjoy multi-player Minecraft gaming.
Hope you liked this tutorial. In case you have any queries or suggestions, feel free to drop them in the comments down below. Also, consider subscribing to our newsletter for getting the latest updates right into your inbox. The subscription box is available down below.