Minecraft is one of the most famous games. It allows you to create your own server for multi-player gaming. You can easily host Minecraft server on Linux, macOS and Windows PCs. But there is no straight forward method to set up 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 Minecraft server on your Android device. However, the process is not very straight forward and 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 Android phone.
Host a Minecraft Server on Android Device
Please note that the process of setting up 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 tough time following this tutorial.
So, here is brief description of the process. First of all, we will install Ubuntu on Android. And then, we will install 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 Minecraft server on Android devices step by step.
A) Install Ubuntu on Android
Step 1: Install 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 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 COPY button to copy the command to install Ubuntu.
Step 4: Install and Start Ubuntu
After copying the command, tap on LAUNCH button to open the Termux app. Termux app may take some time on first launch.
Tap and hold on terminal window on 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
./start-ubuntu.sh command to launch installed Ubuntu. You must see a prompt like
[email protected]:~#. Next, run
apt-get update command to update all packages to latest version. Now, with Ubuntu installation, we have created our base to set up 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 necessary packages to run Minecraft server. First of all, we will start with installing the JDK package on Ubuntu.
Step 1: Open Termux and Start Ubuntu
Open Termux and make sure the prompt reads
[email protected]:~#. If not, then run
./start-ubuntu.sh command first.
Step 2: Install JDK Packages on Ubuntu to Host Minecraft Server
Now, copy and run 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 Minecraft server is ready. We just need install and configure Minecraft server on Android.
Step 1: Get Minecraft Server Java Edition Download Link
First, go to the Minecraft Server download page on web browser in your Android phone. Then, tap and hold on 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 Ubuntu server. Make sure the prompt reads [email protected]:~#.
Copy the command shown below and paste it in 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 Minecraft server on Ubuntu.
Step 3: Set up and Run Minecraft Server on Android
After downloading is completed, we need to make downloaded file executable (So that we can run it). Run following command to make downloaded
minecraft_server.jar file executable.
chmod +x minecraft_server.jar
After that we need to accept the EULA agreement. Use following command to create a
eula.txt file and add
eula=true to it. This will work as accepted EULA agreement. If you skip this step, Minecraft server will not run.
echo eula=true > eula.txt
Now, run 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 Internet)
The Minecraft server is running successfully on 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 as 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 Linux (ARM64) under MORE OPTIONS button. Next, tap on copy to copy the download link.
Step 2: Install Ngrok on Ubuntu
Next, go to Termux app, start Ubuntu. Then, paste 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 in your Android phone.
After downloading, unzip the downloaded ngrok.zip file. Run follwing 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 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 authentication token on Ngrok on your Android phone. Run 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 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 live on the internet.
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.
E) Play Multi-Player Minecraft Game with Your Friends
We have successfully set up Minecraft server on 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 Multi-player menu and select Direct Connect. Now, paste the Forwarding address we copied after running Ngrok. Finally, tap on Join Server button to connect to your newly created personal Minecraft server.
Host Minecraft Server on Android Phone
Above tutorial explained how you can set up 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 Minecraft server and firing up Ngrok tunnel, simply share 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 latest updates right into you inbox. Subscription box is available down below.