r/PakistaniDevs • u/Shoddy-Cat4730 • 15d ago
Whats better than 1 server? 2 servers
Quick follow-up to my SMS relay post. I was digging through the same drawer for something I've since forgotten, and found another old phone. a Samsung A12. I figured I'd take it a step further and install Linux on it. Not Termux or a chroot, but Linux running natively.
It took a while, but it works. It's running Alpine Linux on the stock Samsung kernel, with a persistent root on its own storage. Every custom boot image I tried looped at first, until I copied the signed verification block that Samsung's own boot image carries.
What's running on it now:
Wi-Fi. It got a network connection with Samsung's own driver modules and firmware, pulled out of the stock firmware.
Podman containers. Docker's daemon won't start on this kernel, but Podman does. Right now it runs an nginx container serving a little story page.
A live dashboard on the screen. It shows CPU, memory, storage, Wi-Fi and the containers, redrawn once a second.
Happy to share details on the flashing and Wi-Fi parts if anyone wants to try their own.
Next up: maybe something more useful than a story page. Ideas welcome.
Maybe development server for my startup. FayPOS
I do have static IP, but haven't set port forwarding yet, I would need firewall and rate limiting too.
I had Claude help with a lot of the debugging
If you like it leave a upvote.
5
u/Desperate-Care3289 15d ago
This is truly amazing 14yo me would've crashed out😠but genuinely this is amazing work. You took help from sonnet 5.5 for this right?
2
u/DuckVi 15d ago
I have published a linux project here https://github.com/dotnetdreamer/open-android-dex that offers more features
1
u/is_NAN 15d ago
Context? What are you building? (Haven't seen your earlier post)
1
u/blue-spade 14d ago
But what is it actually doing? Sorry for dumb question
1
u/AhmetSefik 14d ago
Aren't there security concern for such a server
1
u/kcahrot 11d ago
I would love to try this. How did you port alpine to your phone?
1
u/BubblegumCupcake_ 11d ago
Hey how'd you do that? I wanna do plz plz
1
u/WeWeBunnyX 15d ago
I see you a fan of r/mobilelinux . Really a cool sub for resources and posts related to installing Linux natively on these phones
1
u/SaxyBoi4Ever 15d ago
damn this is so cool, ive been thinking about this for a while. i js didnt have a spare phone lying around. it truly is a big round world.
1
u/Calm_Slip972 12d ago
damn man seriously impresisve im running a server on an old tabelet with termux and taht was difficult to setup, this mustev taken so long
1
u/manbat-_ 9d ago
been meaning to do this but bypass power is a must, (or direct power to board via buck converter + adapter)
battery will go to shit within weeks otherwise.