-
Notifications
You must be signed in to change notification settings - Fork 10
Termux + Playit Minecraft Server Guide #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
squiddygg
wants to merge
15
commits into
playit-cloud:master
Choose a base branch
from
squiddygg:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
41f02c9
Add files via upload
squiddygg 719fc51
Delete content/termux-+-playit-minecraft-server-guide.md
squiddygg 07232b8
Termux Minecraft Server Guide
squiddygg a748238
Fix OpenJDK version in Minecraft server guide
squiddygg 0737122
Add files via upload
squiddygg d5cd3a1
Delete content/termux-link-server.gif
squiddygg 33adc64
Delete content/termux-new-session.gif
squiddygg dcbb168
Delete content/termux-playit-download.png
squiddygg a0ee087
Delete content/playit-create-tunnel.png
squiddygg 042d3ac
Delete content/termux-+-playit-minecraft-server-guide.md
squiddygg c766df6
termux-+-playit-minecraft-server-guide
squiddygg db838d5
Add files via upload
squiddygg 9a5049a
Delete content/termux-+-playit-minecraft-server-guide.md
squiddygg 9557649
Add files via upload
squiddygg 2309bc0
Add files via upload
squiddygg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,199 @@ | ||
| +++ | ||
| title = "Termux + Playit Minecraft Server Guide" | ||
| tags = ["minecraft", "termux", "playit"] | ||
| +++ | ||
|
|
||
| # Termux + Playit Minecraft Server Setup Guide | ||
|
|
||
| This guide walks you through setting up a **Minecraft 1.21.11 vanilla server** in an **Android device** using `Termux`, and then sharing it to the internet using `Playit`. | ||
|
|
||
| > **⚠️ Note: Running servers on Android is for small private servers. Performance depends heavily on your device.** | ||
|
|
||
| > Official Minecraft server documentation: | ||
| > https://minecraft.fandom.com/wiki/Tutorials/Setting_up_a_server | ||
|
|
||
| ## Requirements | ||
|
|
||
| * Android device | ||
| * Latest Termux APK from F-Droid | ||
| https://f-droid.org/packages/com.termux/ | ||
| * Java (OpenJDK) | ||
| * A playit account | ||
|
|
||
| ## Install Java | ||
| > Install Java 21 (recommended for Minecraft 1.21.x): | ||
|
|
||
| ```bash | ||
| pkg update && pkg upgrade | ||
| pkg install openjdk-21a | ||
| java --version | ||
| ``` | ||
| > Run `pkg update && pkg upgrade` always to keep packages updated to avoid **ERRORS** | ||
|
|
||
| > If you need a different Java version later, replace `21` with the desired version number, for example: | ||
| > ```bash | ||
| > pkg install openjdk-17 | ||
| > ``` | ||
| Expected output of `java --version`: | ||
| ``` | ||
| openjdk "version" | ||
| ``` | ||
| ## Download Minecraft Vanilla server.jar | ||
|
|
||
| To download the server.jar: | ||
|
|
||
| - Go to [MCVersions](https://mcversions.net/) | ||
| - Find the version you want (for this guide: **1.21.11**) | ||
| - Click **Download** → **Download server.jar** | ||
| - Click `Copy link address` | ||
|  | ||
|
|
||
| ## Download server.jar in Termux | ||
|
|
||
| Use `wget` (available by default in Termux): | ||
|
|
||
| ```bash | ||
| wget https://piston-data.mojang.com/v1/objects/64bb6d763bed0a9f1d632ec347938594144943ed/server.jar | ||
| ``` | ||
|
|
||
| Verify `server.jar` exists: | ||
|
|
||
| ```bash | ||
| ls | ||
| ``` | ||
|
|
||
| ## Run the server `ONCE` to generate files | ||
|
|
||
| ```bash | ||
| java -jar server.jar echo "eula=true" > eula.txt | ||
| ``` | ||
| Verify `server.properties` `eula.txt` `versions` exist: | ||
|
|
||
| ```bash | ||
| ls | ||
| ``` | ||
|
|
||
| ## Installing Ubuntu | ||
|
|
||
| ```bash | ||
| pkg install proot-distro | ||
| proot-distro install ubuntu | ||
| proot-distro login ubuntu | ||
| ``` | ||
|
|
||
| Once logged in, you should see: | ||
|
|
||
| ```text | ||
| root@localhost:~# | ||
| ``` | ||
|
|
||
| > Now we are inside Ubuntu, time to install `Playit` | ||
|
|
||
| ## Install Playit Agent using Raw Binaries (aarch64) | ||
|
|
||
| - Go to [Playit Linux Download Website](https://playit.gg/download/linux) | ||
|  | ||
| - Press and Hold `aarch64` | ||
| - Click `Copy Link Address` | ||
| > Why `aarch64`? | ||
| - Because termux uses `aarch64` (or ARM64) **architecture** | ||
|
|
||
| type this command to check termux **architecture** | ||
| ```bash | ||
| uname -m | ||
| ``` | ||
| Expected Output | ||
| ``` | ||
| root@localhost:~# uname -m | ||
| aarch64 | ||
| ``` | ||
|
|
||
| - Press and Hold `aarch64` and click `Copy Link Address` | ||
| - Go back to `Termux` and type: | ||
| ```bash | ||
| wget https://github.com/playit-cloud/playit-agent/releases/download/v0.16.5/playit-linux-aarch64 | ||
| ``` | ||
|
|
||
| >Check if playit is installed | ||
| ```bash | ||
| ls | ||
| ``` | ||
|
|
||
| Expected Output | ||
| ``` | ||
| rooot@localhost:~# ls | ||
| playit-linux-aarch64 | ||
| ``` | ||
| > Make the file execituble and run it: | ||
| ```bash | ||
| chmod +x playit-linux-aarch64 | ||
| ./playit-linux-aarch64 | ||
| ``` | ||
| > This lines should show if done correctly | ||
| ``` | ||
| Line 1 : no command provided, doing auto run | ||
| Line 2 : checking if secret key is valid | ||
| Line 3 : Visit link to setup https://playit.gg/claim/ "secret-key" | ||
|
|
||
| secret-key are random numbers and letters | ||
| ``` | ||
|
|
||
| > Follow the steps after visting the link provided by `Playit` | ||
| - Create Minecraft Java tunnel and click `Add Tunnel` | ||
|  | ||
| ## Starting the minecraft server | ||
| - Go to termux and starting from the left side of your phone, swipe from `LEFT` to `RIGHT` | ||
| - Click new session | ||
|
|
||
|  | ||
|  | ||
|  | ||
|
|
||
| - Start the server: | ||
| ```bash | ||
| java -Xms1024m -Xmx3072m -jar server.jar nogui | ||
| ``` | ||
| >RAM Recommendations | ||
|
|
||
| - Low-end devices: `512M` – `1024M` | ||
|
|
||
| - Medium devices: `2048M` – `3072M` | ||
|
|
||
| - High-end devices: `4096M` – `6114M` | ||
|
|
||
| ## What does `-Xms` `-Xmx` mean? | ||
| > `-Xms` (Initial Heap Size) | ||
| - Sets the minimum amount of `RAM` that the `Java Virtual Machine (JVM)` will allocate to your server when it starts | ||
| - Can be said this is the starting memory the JVM will have | ||
|
|
||
| > `-Xmx` (Maximum Heap Size) | ||
| - Sets the maxmimum amount of `RAM` the `JVM` is allowed to use | ||
| - Can be said this is where it sets the boundary to avoid using all your `RAM` | ||
|
|
||
| > Congrats! You have now made a minecraft server using your Android Phone! | ||
|
|
||
| ## How to join? | ||
|
|
||
| - Go to termux and starting from the left side of your phone, swipe from `LEFT` to `RIGHT` | ||
| - Click the terminal named `root@localhost: ~` | ||
| - It should show your minecraft java tunnel like this | ||
| ``` | ||
|
|
||
| playit (v0.16.5): 1768426907033 tunnel running, 1 tunnels registered | ||
|
|
||
|
|
||
| TUNNELS | ||
| canadian-external.gl.joinmc.link => 127.0.0.1:25565 (minecraft-java) | ||
| ``` | ||
|
|
||
| - Enter your `Minecraft Java Tunnel address` (e.g. `canadian-external.gl.joinmc.link`) in the Server Address, or use Direct Connect and paste it there. | ||
| > Enjoy playing with your friends! | ||
|
|
||
| ## (Optional) For cracked clients joining the server | ||
| - Stop the server if it is running by typing `/stop` | ||
| - Run: | ||
| ```bash | ||
| echo "online-mode=false" > server.properties | ||
| ``` | ||
| > This will set `online-mode` to `false` allowing cracked clients to join | ||
| > Start the server again and cracked clients should be able to join now! | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if they want to have this mentioned in the docs...
Edit: Line 192-199, I messed up the selection.