Hosting a Minecraft Server on Android

Hosting a Minecraft Server on Android

Minecraft stands out among games for its unique feature allowing users to create personal multiplayer servers. While traditionally limited to Windows, Linux, and macOS, the absence of Android support has been a disappointment for many. Imagine the convenience of hosting a server on your Android device, making Minecraft even more enjoyable on the go. Fortunately, a solution exists. Despite the somewhat intricate process, it’s entirely achievable. Let’s delve into how to host a Minecraft server on Android.

Steps to Host Minecraft Server on Android

Straightforwardly, the process is somewhat complex, requiring technical proficiency in handling the command terminal. I’ve endeavored to streamline it as much as possible. To provide a concise overview, we’ll be installing Ubuntu atop Android, facilitating the seamless installation of a Minecraft server. Now, let’s initiate the initial setup.

Installing Ubuntu on Your Android Device

1. Begin by installing AnLinux (Free) and Termux apps (Free) from the Google Play Store.

2. Launch the AnLinux app and select “Ubuntu” by tapping the “Choose” button. Then, tap “Copy”.

3. Open the Termux app, paste the script and tap the “Enter” key. Termux will start downloading Ubuntu, taking 2-3 minutes for installation.

4. After installation, paste and execute the command to launch Ubuntu. root@localhost will appear on Termux, indicating successful Ubuntu operation on your Android device.


Installing Java Development Kit on Ubuntu

1. With Ubuntu installed, let’s install packages necessary for running Minecraft server. Begin by installing the JDK package on Ubuntu. Copy and execute the following command in Termux. Wait for the installation to finish.

apt-get install software-properties-common

2. Next, execute the following commands one by one in Termux. Occasionally, Termux may prompt for your permission before proceeding with installation, so be sure to grant it. This entire process typically takes 3-4 minutes.

add-apt-repository ppa:openjdk-r/ppa && apt-get update && apt-get install openjdk-8-jre

Installing Minecraft Server on Android

With Ubuntu and JDK installed, we’ve nearly completed the groundwork for setting up a personal server. Now, let’s proceed to install the Minecraft server on Android. Follow these steps:

1. Access the Minecraft Server page on your Android device through this link. Here, long-press “minecraft-server.jar” and copy the download link.

2. Proceed to Termux and input the following command. Ensure to substitute the https link with the downloaded link. The format resembles the following in Termux. Now, press the enter key to execute the command and commence Minecraft Server installation on your Android.

wget -O minecraft_server.jar

3. Once the installation finishes, execute the subsequent command to modify file permissions. This time, Termux will not prompt any confirmation, but the changes will take effect. Proceed to the next section.

chmod +x minecraft_server.jar

Launch Minecraft Server on Android

1. After successfully installing a Minecraft server on Android, it’s time to run it. Simply copy and execute the command below in Termux. Keep in mind, the initial run may fail due to EULA agreement non-compliance. No worries, we’ll address this in the next step.

Hosting a Minecraft Server on Android
java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui

2. Proceed by running the subsequent commands individually. This will grant you access to the EULA agreement, allowing you to make necessary adjustments.

apt-get install nano nano eula.txt

3. In Nano text editor, replace “eula=false” with “eula=true”. Editing text in Nano can be tricky. You can’t use the touchscreen for navigation. Press the “down” key three times to move the cursor below the last text. Then, press backspace to move up a line and continue pressing backspace to delete false. Now, type true.

4. After changing the EULA text, press “CTRL” and then “x”. Confirm file modification by pressing “y” to save changes. Finally, press “Enter” to return to Termux.

5. Repeat the same command from the first step. This time, Minecraft Server will run successfully on your Android phone. Here’s the command again, if needed. The process should take less than a minute.

Tunnel Your Local Minecraft Server to the Internet

We’ve installed a Minecraft server on our Android device, but bringing the server online requires Ngrok, a secure tunneling tool. Ngrok creates a public URL for your server, facilitating multiplayer Minecraft gaming with friends. Here’s how:

1. Visit the Ngrok download page and long-press “Linux (ARM64)” to copy the download link.

2. Return to Termux and paste the following command. Replace the https link with the copied Ngrok URL. Then, press “Enter” to initiate Ngrok installation on your Android device.

This revision maintains the essential instructions while eliminating redundancy and enhancing clarity.

3. After installation, run these commands one by one.

apt-get install zip unzip

4. After completing the installation, open the Ngrok Sign Up page and create an account. Log in and copy the authentication token provided under the “Connect Your Account” section.

5. Now paste the authentication token into Termux. It will resemble the following.

./ngrok authtoken 1QVNoeHerkYbSncmdjIj2yfaGNk_3Zt1hTF1nY9WyGY5BoSU2

6. Next, execute the command below to open the Ngrok status window. If the session status displays as “online”, you have successfully established your personal Minecraft server on Android, making it accessible on the internet.

./ngrok tcp 25565

7. Now, copy the “Forwarding” address starting with tcp. It’s the public URL to share with friends for Minecraft multiplayer gaming. It should resemble this.

Play Multiplayer Minecraft with Friends

Open Minecraft, log in, and go to the Multiplayer menu. Select “Direct Connect”. Here, paste the Forwarding address from Step 7 above, then press “Join Server”. Voila! You’re connected to your personal Minecraft server hosted on an Android device. Enjoy!

Host Minecraft Server on Android for Personal Gaming

Here’s our guide on creating a Minecraft server on Android smartphones. The steps are technical, requiring setup before creating an online server. Nonetheless, I’ve simplified the process with collaborative steps and screenshots. If you’ve set up a Minecraft server on your Android, share your forward address. We’d love to play with you.