U
/u/Kindly_Swim8051
Guest
It turns out it's really simple to host a server on a phone, as long as it runs android or is android based.
Steps 1-11: Basic java server
Step 12+: Java server with geyser and floodgate
Optional: Change the server properties file by running
Now, your server is fully set up, and to start it run
submitted by /u/Kindly_Swim8051
[link] [comments]
Continue reading...
Steps 1-11: Basic java server
Step 12+: Java server with geyser and floodgate
Install F-DROID
Install Termux (Do it from the link, there are a lot of misleading Termux apps in F-DROID. You can get Termux from Google Play, but it doesn't have the same permissions/capabilities)
Install java by runningpkg install openjdk-21
Make the directory for it by runningmkdir <directory name>
Go into it by typingcd ~/<directory name>
Install wget by runningpkg install wget
Install paper by runningwgethttps://fill-data.papermc.io/v1/objects/84f4283253ae7e50a25b26ef3b03d57818145534fb0c8a27925b7bae59222ba6/paper-1.21.11-99.jar
Change the paper jar file to something better by runningmv paper-1.21.11-99.jar paper.jarThe file is now called paper.jar
Start the server by runningjava -Xms512M -Xmx8192Change the second number to 75% or less of the RAM of your phone.
Accept the eula. The server will stop, and tell you to accept the eula. Runnano eula.txtand changeeula=falsetoeula=true
Start the server again, and you're done! To let people outside your network connect, either forward the port, or, as I did, set your phone a static IP and use playit on another device. To set your phone to static IP, go to your WiFi settings, find the network you're connected to, and change IP settings to static, then change the IP to something high, like 192.168.1.150. Then make a playit tunnel to your phone and people can connect.
Optional: Change the server properties file by running
nano server.properties and editing the file to however you want.
Change into the plugins folder by runningcd ~/<directory name>/plugins
Download geyser by runningwgethttps://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/spigot
It will be named spigot, so rename it by runningmv spigot geyser.jar
Install floodgate withwgethttps://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest/downloads/spigot
Again, it will be called spigot, so usemv spigot floogate.jarto change it.
Make a second playit.gg tunnel for it, and run the server. Geyser and Floodgate will set up.
Edit the Geyser config file to use Floodgate by runningcd ~/<directory name>/plugins/Geyser-Spigotthen usenano config.ymland look for the line whereauth-type: onlineand replace it withauth-type: floodgate
Now, your server is fully set up, and to start it run
java -Xms512M -Xmx8192, again changing the second number to 75% or less of your phones RAM. I did this on a Samsung S20 5G with 12GB RAM and it ran perfectly. If you have any issues post them below and I'll try to help.submitted by /u/Kindly_Swim8051
[link] [comments]
Continue reading...