How to Set up Minecraft Server on Android Phone

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. However, 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.

SEE ALSO: How to Install and Play Minecraft on Chromebook?

Host a Minecraft Server on an 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

First of all, we need to install the AnLinux (Free) and Termux apps (Free) on your Android phone. You can install them directly from the Google Play Store.

Install Anlinux And Termux Apps On Your Android Phone
Install the Anlinux and Termux on Your Android Phone

SEE ALSO: How to Transfer Google Play Music Content to YouTube Music?


Step 2: Open AnLinux and Click CHOOSE to Select Distro

After installing, open the 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.

Open Anlinux App Close The Notice Then Go To Dashboard And Tap Choose
Open the Anlinux app, and CLOSE the Notice. Then, go to Dashboard and tap CHOOSE.

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.

Select Ubuntu And Tap Ok Then Tap On Copy
Select Ubuntu and tap OK. Then tap on COPY.

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 in 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 root@localhost:~#. 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.

Open Termux App Paste Copied Link And Press Enter Then Run Ubuntu And Finally Run Update Command
Install and run Ubuntu on Android. Also, run apt-get update command.

PLEASE NOTE: Whenever you wish to run any command on Ubuntu via the Termux app, you need to run the ./start-ubuntu.sh command first. Otherwise, you will get the command or package not found error.


B) Install Java Development Kit (JDK) on Ubuntu

After a 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 root@localhost:~#. If not, then run the ./start-ubuntu.sh command first.

Open Termux And Start Ubuntu
Open Termux and start Ubuntu

Step 2: Install JDK Packages on Ubuntu to Host the 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.

Install The Jdk Package On Ubuntu Via Termux
Install the JDK Package on Ubuntu

SEE ALSO: A to Z List of Windows CMD Commands – PDF Download Available.


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.

First, go to the Minecraft Server download page on a web browser on your Android phone. Then, long press on the minecraft-server.x.xx.x.jar download link and select Copy to copy the download link.

Copy Minecraft Java Edition Download Link From Official Website - set up minecraft server on android
Copy the Minecraft Java Edition Download Link from the Official Website

Step 2: Download Minecraft Server on Ubuntu

Now, open Termux and start the Ubuntu server. Make sure the prompt reads root@localhost:~#.

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 the previous step.

Press the Enter key to execute the command. Termux will download the Minecraft server on Ubuntu.

Download Minecraft Server Java Edition On Anlinux Ubuntu - set up minecraft server on android
Download Minecraft Server Java Edition 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
Set Eula To True Via Echo Command
Set EULA to “True”

Now, run the following command to start and run Minecraft Server on your Android device.

java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
Run Minecraft Java Edition Server On Ubuntu On Android
Run Minecraft Java Edition Server on Ubuntu

SEE ALSO: How to Uninstall a Program using Command Prompt in Windows 10?


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.

Go to the Ngrok download page. Here, long-press on the Linux (ARM64) option under the MORE OPTIONS button. Next, tap on copy to copy the download link.

Copy The Ngrok Download Link For Linux Arm64
Copy the Ngrok download link for Linux (ARM64)

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 the previous step.

Termux will start downloading ngrok on Ubuntu on your Android phone.

Download Ngrok Zip File On Ubuntu to set up minecraft server on android
Download ngrok Zip File on Ubuntu

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 the Connect Your Account section. Here, you will see your authentication token. Copy the whole command.

Get Authentication Token From Ngrok Website Dashboard
Get an Authentication Token from Ngrok

Now, configure the authentication token on Ngrok on your Android phone. Run the following command on Termux inside Ubuntu (./start-ubuntu.sh).

./ngrok authtoken 1QVNoeHerkYbSncmdjIj2yfaGNk_3Zt1hTF1nY9WyGY5BoSU2

Step 4: Bring the 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.

Check Ngrok Server Status And Copy Forwarding Address - set up minecraft server on android
Ngrok Server Online. Copy Forwarding Address

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).

0.tcp.ngrok.io:14970

You can close ngrok tunneling by entering the 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 a 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.

Open Micraft Go To Multiplayer Menu And Select Direct Connect And Join Server
Join 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 the 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 to get the latest updates right into your inbox. The subscription box is available down below.

Editorial Staff

Hi there, we are the editorial staff at WINDOSPC (former HELLPC). We are a team of funny and technical people. Feel free to get in touch with us via Contact-Us page.

3 Comments

  1. Thought I’d share an alternative method that should gain better performance and less overhead on android
    https://www.reddit.com/r/Android/comments/wyl0eh/optimised_minimaloverhead_java_minecraft_server/

    1. After you start the Minecraft server, you can follow the last part (D) of the tutorial to install and run the ngrok to bring your server online.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.