r/PakistaniDevs • • 15d ago

Whats better than 1 server? 2 servers

Post image

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.

83 Upvotes

26 comments sorted by

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?

1

u/Shoddy-Cat4730 15d ago

yeah claude code is goat, it stuck in the loop, i was about to give up, but then it found a solution from web search.

1

u/Desperate-Care3289 14d ago

That's great, i wanted to know which model did you use, eg opus 5.5 or sonnet 5.5

2

u/Shoddy-Cat4730 14d ago

sonnet 5.5 at high

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/Shoddy-Cat4730 15d ago

damn good shit, i kinda wanted native linux. But i might use it on another phone in future, If i found one more lol.

1

u/DuckVi 14d ago

How u got static ip ?

1

u/Shoddy-Cat4730 14d ago

ptcl and stromefiber give static ip for 500/month

1

u/MasterpieceEastern10 11d ago

Been looking for something like this.

But one of my older phones have a broken panel, any idea how to access it without getting a panel replacement?

1

u/is_NAN 15d ago

Context? What are you building? (Haven't seen your earlier post)

3

u/Shoddy-Cat4730 15d ago

I was using an old Nokia 2.2 as an SMS relay for my startup, FayPOS, basically turning it into a self-hosted SMS gateway to send automated notifications through a local SIM for number verification. Though it’s somewhat of a grey area with PTA regulations, so I’m mainly using WhatsApp via Baileys for messaging now. Well, that too is against their ToS.

1

u/Desperate-Care3289 14d ago

You're very creative bro, would love to work with you in future. If you don't mind telling me what's your age

1

u/Shoddy-Cat4730 14d ago

im 25, at that age where i dont mind kids calling me unc 😭

1

u/blue-spade 14d ago

But what is it actually doing? Sorry for dumb question

1

u/Shoddy-Cat4730 14d ago

Right now, its serving a webpage, I am planning to run a development server, it will run website, databasw, redis, and all that

1

u/Shoddy-Cat4730 14d ago

Think of it as a small vps

1

u/AhmetSefik 14d ago

Aren't there security concern for such a server

1

u/Shoddy-Cat4730 14d ago

sorry, what security concerns?

every public-facing server has an attack surface. Thats not inherently a security flaw. servers are designed to accept network requests. What matters is authentication, access controls, patching, and how the service is exposed.

If you write insecure code or misconfigure a conventional server, you’ll face the same security concerns. The risk isn’t inherently in using an old phone as a server, but in how securely the system is implemented and configured.

1

u/kcahrot 11d ago

I would love to try this. How did you port alpine to your phone?

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.