Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 

Repository files navigation

How to make a Minecraft Server in Termux with Cross-Play Support (Without Root)

Introduction

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.

Requirements

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

Step-by-Step Guide

Step 1: Install and Update Termux

  1. Install Termux from F-Droid (recommended) or the official source.
  2. Open Termux and update the package list:
    pkg update && pkg upgrade
    
  3. Install essential package:
    pkg install  wget 
    

Step 2: Install Java

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-21

Note: 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

Step 3: Download Server

  1. Create a directory for the server:

    mkdir mcserver && cd mcserver
    
  2. Choose Minecraft Version Based on Java Version (IMPORTANT)

    Note: The Minecraft server version you can run **depends entirely on the Java version installed**.


Java Version Compatibility

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


  1. Download and Install the Server (PaperMC)

What is 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.

For openjdk-17 users (Minecraft 1.20.4)

wget https://api.papermc.io/v2/projects/paper/versions/1.20.1/builds/196/downloads/paper-1.20.1-196.jar

For openjdk-21 users (Minecraft 1.21.11)

wget https://api.papermc.io/v2/projects/paper/versions/1.21.11/builds/1/downloads/paper-1.21.11-1.jar

Note

  • 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 .jar file from their official websites and install it in the same way using wget with the provided download link.

Rename the Server File (Step by Step)

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.

Step 1: List the files in the directory

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.jar
  • paper-1.21.11-1.jar

Step 2: Rename the file using mv

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

Step 3: Confirm the rename

Run ls again You should now see: server.jar

Step 4: Run the Server for the First Time

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.

Step 1: Start the server

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.

Step 2: Wait for the server to stop

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.

Step 3: Check generated files

List the files using lsto confirm they were created. You should now see files like:

  • eula.txt
  • server.properties
  • logs folder
  • Plugins folder
  • etc.

The server is now ready for the next step, where you will accept the EULA and configure the server.

Step 5: Accept the EULA and Start the Server

Step 1: Open the EULA file

Use nano to edit the EULA file nano eula.txt

Step 2: Accept the EULA

Inside the file, find this line eula=false Change it to: eula=trueSave and exit Nano:

  • Press Ctrl + X
  • Press Y
  • Press Enter

Step 3: Start the server normally

Now start the server with recommended RAM settings for Android devices:

java -Xms512M -Xmx1024M -jar server.jar nogui

It will take 5-10 minutes then you ready to join

Step 6: Join the Server (IP and Port)

Once the server is running, players can join using the server’s IP address and port.

Step 1: Find your device’s IP address

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.

Step 2: Understand the default ports

  • Java Edition port: 25565

Step 3: Join from Java Edition

On Minecraft Java Edition:

  1. Open Multiplayer
  2. Click Add Server
  3. Enter: Server Address::Port Example 192.168.1.5:25565

Step 7: Enable Cross-Play (Java + Bedrock)

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.

What is GeyserMC and Floodgate?

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

Step 1: Stop the Server

Before installing plugins, stop the server safely.

In the server console, type stop. Wait until the server fully shuts down.

Step 2: Open the plugins folder

Make sure you are inside your server directory, then run cd plugins

Step 3: Download GeyserMC Plugin (Spigot Version)

Download the Geyser Spigot plugin:

wget https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/spigot

Step 4: Download Floodgate Plugin (Paper Version)

Download the Floodgate plugin for Paper:

wget https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest/downloads/spigot

Step 5: Verify Plugin Installation

List the files ls then You should see "Geyser-Spigot.jar & floodgate-paper.jar" These files must stay inside the plugins folder.

Step 6: Start the Server with Limited RAM

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.

Step 7: Wait for Plugins to Load

When the server starts successfully, you should see messages mentioning:

  • Geyser
  • Floodgate

This confirms that cross-play is enabled.

Step 8: Join the Server

Java Edition

IP: Port: 25565

Bedrock Edition:

Port: 19132 Bedrock players can now join the same server as Java players.

Notes

  • 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 stop before closing Termux

Releases

Packages

Contributors