Setting up a Minecraft server on your Android device using Termux is a great way to host a multiplayer world without needing a dedicated computer or rooting your phone. Termux is a powerful terminal emulator that runs a Linux environment on Android, and it doesn't require root access. This guide focuses on setting up a Java Edition server, which supports cross-play on Bedrock Edition.
- Android Device: Any Android phone or tablet running Android 7.0 or higher.
- Termux App: Download and install Termux from F-Droid or the official website (Google Play Store version may have limitations).
- Storage Space: At least 1-2 GB free space for the server files.
- Internet Connection: Stable Wi-Fi or mobile data for downloading and hosting.
- Install Termux from F-Droid (recommended) or the official source.
- Open Termux and update the package list:
pkg update && pkg upgrade - Install essential package:
pkg install wget
We need to install Java first. Below are the supported Java versions for running a Minecraft server in Termux:
pkg install openjdk-17
pkg install openjdk-21Note: if you are you using an older Android versions then use openjdk-17 because older versions does not support openjdk-21
Verify the installation of java:
java -version
-
Create a directory for the server:
mkdir mcserver && cd mcserver -
Choose Minecraft Version Based on Java Version (IMPORTANT)
Note: The Minecraft server version you can run **depends entirely on the Java version installed**.
- openjdk-17
- Supports Minecraft 1.17 – 1.20.4
- Best choice for older or low-end phones
- openjdk-21
- Required for Minecraft 1.20.5+
- Needed to run latest versions like 1.21.11
⚠️ Using the wrong Java version will cause the server to crash or fail to start.
- Download and Install the Server (PaperMC)
- PaperMC is a high-performance Minecraft Java Edition server software. It is more optimized and uses less RAM than the official Mojang server, making it suitable - for running on Android devices using Termux.
wget https://api.papermc.io/v2/projects/paper/versions/1.20.1/builds/196/downloads/paper-1.20.1-196.jar
wget https://api.papermc.io/v2/projects/paper/versions/1.21.11/builds/1/downloads/paper-1.21.11-1.jar
- If you want to download other Minecraft versions, you can visit the PaperMC version list on the official PaperMC website and copy the download link for your desired version.
- If you want to use other server software (such as Vanilla, Spigot, Fabric, or Forge), you can download their server
.jarfile from their official websites and install it in the same way usingwgetwith the provided download link.
After downloading the PaperMC server file, you should rename it to server.jar.
This avoids confusion and makes it easier to run the server later.
Use the ls command to see the downloaded file name. You will see a file name similar to one of these:
paper-1.20.1-196.jarpaper-1.21.11-1.jar
Copy the exact file name shown by ls, then use the mv command to rename it.
Example for Minecraft 1.20.1 (openjdk-17):
mv paper-1.20.1-196.jar server.jar
Example for Minecraft 1.21.11 (openjdk-21):
mv paper-1.21.11-1.jar server.jar
Run ls again You should now see: server.jar
After renaming the file to server.jar, you need to run the server once.
This first run is required to generate important files such as eula.txt and the server configuration files.
Make sure you are inside the server folder, then run:
java -jar server.jar
Note:This command will start the server. It take some time and also show some warning but dont worry about that.
During the first run, the server will start briefly and then stop automatically.
This is normal and happens because you have not accepted the Minecraft EULA yet.
List the files using lsto confirm they were created. You should now see files like:
eula.txtserver.propertieslogsfolderPluginsfolder- etc.
The server is now ready for the next step, where you will accept the EULA and configure the server.
Use nano to edit the EULA file nano eula.txt
Inside the file, find this line eula=false Change it to: eula=trueSave and exit Nano:
- Press Ctrl + X
- Press Y
- Press Enter
Now start the server with recommended RAM settings for Android devices:
java -Xms512M -Xmx1024M -jar server.jar nogui
Once the server is running, players can join using the server’s IP address and port.
In Termux,You need to stop the server Ctrl + z to stop then run the following command ip addr show. Look for an address that starts with inet for example inet 192.168.1.5 This is your local IP address.
- Java Edition port:
25565
On Minecraft Java Edition:
- Open Multiplayer
- Click Add Server
- Enter: Server Address::Port Example
192.168.1.5:25565
At this point, Java Edition players can already join the server using the IP and port from Step 6.
To allow Bedrock Edition (Mobile / Console) players to join the same server, you must install plugins.
- GeyserMC allows Bedrock Edition players to join a Java Edition server.
- Floodgate allows Bedrock players to join without needing a Java account.
- Both plugins are required for proper cross-play.
Before installing plugins, stop the server safely.
In the server console, type stop. Wait until the server fully shuts down.
Make sure you are inside your server directory, then run cd plugins
Download the Geyser Spigot plugin:
wget https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/spigot
Download the Floodgate plugin for Paper:
wget https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest/downloads/spigot
List the files ls then You should see "Geyser-Spigot.jar & floodgate-paper.jar" These files must stay inside the plugins folder.
Go back to the main server folder cd .. Start the server with recommended RAM limits for Android:
java -Xms512M -Xmx1024M -jar server.jar nogui
⏳ The first start after installing plugins may take some extra time.
Be patient and wait until the server finishes loading.
When the server starts successfully, you should see messages mentioning:
GeyserFloodgate
This confirms that cross-play is enabled.
IP: Port: 25565
Port: 19132
Bedrock players can now join the same server as Java players.
- Bedrock players may take slightly longer to join the first time
- Do not close Termux while the server is running
- Always stop the server using
stopbefore closing Termux