My server is a phone now
271–276 of 276 posts
Re: My server is a phone now
#272FYI you can't do this on phones with locked bootloaders as well as the author did. you could use termux but if termux runs on anything lower than android 8 termux will be significantly limited and you will need postmarketos and maybe fix support for it. with termux, at best things will be slow without root, as the author mentioned rooting resulted in a speed increase. without root, you also can't bind to ports on any…
Termux is only slower without root if you use proot. PRoot provides a limited implementation of chroot that runs unprivileged in userspace, but this also causes it to be pretty slow. If the server software you want to run is available in the Termux repos, you can use that and have it run at full-speed.
Termux works by patching all programs to treat /data/data/com.termux/files/usr as the root directory and /data/data/com.termux/files/home as the home directory. This introduces some compatibility issues, but it doesn't make it any slower.
The Termux project has a great wiki at https://wiki.termux.com/
Re: My server is a phone now
#273I still think the best bang for your buck is an old desktop PC. Something like an i5 with 8GB RAM and an SSD will suit 99% of home server uses with capacity to spare. Even in this environment of inflated hardware prices, you can get one for a reasonable price. Although I do see the appeal in getting unconventional hardware to do what you want, just for the love of the game.
Old Optiplex are also good deals. I bought a Dell Optiplex 5070 MT for $150 for myself and 2 Dell Optiplex 3070 SFF computers for $75 each to replace my mom's aging Windows 7 PC. All 3 computers take DDR4 and M.2 NVMe SSDs and have an Intel i5-9500 CPU that will also run Windows 11 pretty well, if you're into masochism that is.
Re: My server is a phone now
#274It is incredible the amount of gimmicks some folks will go through, even if it was to stay with reuse Android phone story, Java and Kotlin as regular Android app already provide all the juice required to do the job.
You can't bind to ports so you can't run a server without a proxy. Depending on your android version you also can't run containers due to missing kernel syscalls, so you have to use x86 emulation
Containers are nice, but they're not strictly necessary. On Google Pixel 6 and newer phones, you can take it a step further and root your phone and run a KVM-accellerated arm64 Linux virtual machine on your phone. There's a port of Limbo PC emulator that includes support for the KVM accelleration, and it works quite well! It even allows you to pass through USB devices to the guest.
Re: My server is a phone now
#275Earlier quoted context omitted.
> It will probably destroy this battery very quickly. 'Very quickly' seems to be measured in decades from what I see Most people I know have their laptop docked, either near-permanently at home or taking it between home and a desk with dock (so it's nearly always plugged in when in use) The 'servers' I've had were all old laptops - yes, with battery (don't have to buy a separate UPS if one is already included). I've…
I had a laptop as a server for a really long time, and I also poked around using a phone for some server things (not as main server) and after some time it was unusable (the whole phone was suffering because wasn't prepared for a battery that fucked). Anyway, my point is, maybe his phone has some mechanism similar to laptops to prevent this kind of thing, but in the end it's a phone. It's not the intended use for it.
Re: My server is a phone now
#276Earlier quoted context omitted.
You can't bind to ports so you can't run a server without a proxy. Depending on your android version you also can't run containers due to missing kernel syscalls, so you have to use x86 emulation
You can bind ports 1024-65535, and if you're in a home setting, you can just configure the port forwarding/DNAT settings on your home router to forward external ports 80/443 to whatever ports you're using internally. Containers are nice, but they're not strictly necessary. On Google Pixel 6 and newer phones, you can take it a step further and root your phone and run a KVM-accellerated arm64 Linux virtual machine on y…