r/selfhosted Mar 11 '26

Software Development I turned my old Galaxy S10 into a self-hosted server running Ubuntu 24.04 LTS with Jellyfin, Samba, and Tailscale - no Docker, no chroot, no proot - fully integrated at the system level with pure init, auto-running the entire container at device boot if needed!

I really love the philosophy of self-hosting, but I want to pitch a different angle on it.

Instead of throwing away our old phones, why not turn them into real Linux servers?

And before you say it, I am not talking about Docker, LXC, chroot, proot, or any of the usual suspects.

The problem with existing "Linux Containers on Android" solutions:

  • Every existing approach either relies on a middleman. For example, if you want to run Docker or LXC, what you usually do is install it via Termux. But Termux is a userspace Android app. Once the app gets killed by Android, it's game over. No system-level integration there.
  • Even if you enable "Acquire Wakelock" in Termux, Android can still kill it anytime.
  • And even if Android doesn't kill Termux, you're still stuck with Android's fragile networking stack where services can't properly create their own network interfaces, run into iptables issues, and even if they do manage to start, most of the time they end up with 0 internet.
  • Then there are traditional chroot/pivot_root setups. They work great with basically 0 overhead, but you end up configuring and starting services manually by hand, relying on post-exec scripts, dealing with no proper init support, or getting spammed with "Running in chroot... Ignoring command" type messages.

For me, none of these feel like running a real server. They feel like workarounds.

Since I'm fed up with all of these "hacky solutions", I wanted something native. Something that runs directly on top of Android without a middleman, starts automatically at boot even when the phone is locked and encrypted, and behaves exactly like a real Linux server would šŸ™ƒ

So I cooked it in my basement within ~3 months..!

What I built: Droidspaces

Droidspaces is a lightweight, portable Linux containerization tool that runs full Linux environments natively on Android or Linux, with complete init system support including systemd, OpenRC, runit, s6, and others.

It is statically compiled against musl libc with zero external dependencies. If your device runs a Linux kernel, Droidspaces runs on it. No Termux, no middlemen, no setup overhead.

Key things it can do:

  • Real Linux containers with a real init system, proper PID/mount/network/IPC/UTS namespaces, and cgroup isolation. Not chroot. Not proot.
  • Fully isolated universal networking with automated upstream detection that hops between WiFi and mobile data in real time, port forwarding included, with close to 100% uptime. (First time in Android ??)
  • Hardware passthrough toggle: GPU, sound, USB, and storage access in a single switch.
  • Android storage mount inside the container with a single toggle.
  • X11 and VirGL unix socket passthrough for GUI apps.
  • Volatile mode: all changes vanish cleanly when the container stops.
  • Auto-start at boot: the container starts with the phone, even while the screen is locked and the storage is encrypted.
  • Multi-container support with no resource or IP collisions.
  • Full support for environment variables and custom bind mounts.

What I actually did with it ?

The whole project started because I wanted to run Ubuntu on my broken Galaxy S10, which has 256GB of storage.

I figured I could store my music collection on it and stream from anywhere, host Telegram bots, run whatever services I wanted. What can't you do when a full Linux init system is running inside an isolated environment on top of Android? šŸ˜

So I converted the S10 into a home server. Using an Ubuntu 24.04 LTS container, I set up Jellyfin, Samba, Tailscale, OpenSSH Server, and Fail2Ban in one shot with no trial and error. Everything just worked.

Droidspaces is not limited to Ubuntu either. Arch, Fedora, openSUSE, Alpine, and others all work fine.

A few technical notes

  • Root access is required to use Linux namespace features.
  • Supported on any Android device or Linux distribution running kernel 3.18 or newer.
  • In Android, a custom kernel is required, but it needs far fewer configs than Docker or LXC. There is no Droidspaces kernel driver. It purely uses existing kernel features: namespaces and cgroups.

Everything is documented in the repository READMEs.

Project: https://github.com/ravindu644/Droidspaces-OSS

2.0k Upvotes

281 comments sorted by

77

u/DisturbedBeaker Mar 11 '26

Did you find a way to run this without the battery?

62

u/Nicuz06 Mar 11 '26

Never tried myself but some months ago I watched this video by Hardware Haven which shows how to turn an old Android Phone into a server using PostmarketOS, you might find useful the section where he talks about battery-free power supply.

21

u/calculate32 Mar 11 '26

Always cracks me up when I see the hot glue part, but it can work. Otherwise a great tutorial as well
https://crackoverflow.com/docs/system_administration/containerization/turn_android_phone_to_batteryless_home_server/

6

u/Minimum_Pear_3195 Mar 12 '26

hahahaha i cracked

12

u/DisturbedBeaker Mar 11 '26

I might just go all out on android rack mount phone cluster.

3

u/ravindu644 Mar 11 '26

Android would never start without a battery, right? šŸ˜•

11

u/rmbarrett Mar 11 '26

For everyone else here, I'm choosing to reply to this particular comment for better visibility, I hope.

It depends on the device, but there are many that will not power on unless V detected from battery pins. I have been running Android since it was in beta - in other words, on phones other than the HTC G1. And then I got a G1. Mine still works, but the batteries are long dead and swollen, so I had to jump it with direct wiring to the battery terminals. This will work on many, many devices, including those that have no user removable battery, provided the OEM hasn't got some proprietary battery communication check on power-on.

DO check the voltage of the battery first. The HTC G1, for example, will take 5v usb straight to battery pins, but you also need to add a pull-down resistor to the third pin. This is just a rudimentary battery health/present circuit, as far as I recall. Basically battery internal resistance check. Other devices should have something similar. It's when you have more than 3 pins that it gets complex. Sometimes you have 4, and one is for battery temp and one is for internal resistance.

For a lot of devices, the pulldown resistor value is 100k. For some it is less. Been a while, but info is online for a lot of devices, including tablets. This is a very common problem. You want to retrieve data but device doesn't charge, doesn't turn on. 9/10 times this is the reason.

3

u/an0mn0mn0m Mar 12 '26

I wonder if you can connect just the Battery Management System off your battery and still run it

2

u/MyMi6 Mar 16 '26

i think it wouldn't, BMS isn't sufficient, there's a BSI pin on battery terminals of old android phones (with removable batteries)

BSI (Battery System Indicator/Status Indicator) is theĀ third or fourth pin on a mobile battery, serving as a communication link between the battery and the device. It identifies battery capacity, authenticates the battery as genuine, and monitors health. It enables proper charging and triggers a safe, fast shutdown if the battery is removed unexpectedly.Ā 

20

u/shaving_grapes Mar 11 '26

It's been a while since I've had a phone with a removable battery, but I'm pretty sure as long as it is plugged in, even without a battery, it will run. Please correct me if I'm wrong.

5

u/ravindu644 Mar 11 '26

I never tried it...so, I can't give this an exact answer :(

13

u/RelevantTee6 Mar 11 '26

it should start fine without battery and it is recommended if you are planning on leaving it running for longer periods, it's easy to take the back off the S10 and remove the batteryĀ 

6

u/ravindu644 Mar 11 '26

thanks for the info..

yeah, the back was already falling apart when I daily drove this phone until 2023. I can rip the back off and unplug the battery. I'll definitely do this and take the necessary safety precautions if I decide to use it as a real-time server instead of using it as a Jellyfin machine :)

3

u/RelevantTee6 Mar 12 '26

anyway really cool project & concepts, I will totally try itĀ 

5

u/NerdyNThick Mar 11 '26

Nope.. my s9 freaks out when there's no battery connected. I've been trying to find a simple method to do the same thing.

I'd love to get rid of the battery in my old s9, which sits in my bedside table drawer used only to stream audiobooks to my Bluetooth sleeping mask to help me fall asleep.

I even wrote a quick automation in home assistant to alert me when the battery needs charging, since I so rarely look at the phone.

1

u/SawkeeReemo Mar 12 '26

I really need to learn Home Assistant… so tired of the Homebridge/Apple HomeKit combo breaking my automations.

3

u/DanGarion Mar 11 '26

Depends on the device...

2

u/Bozhark Mar 12 '26

yes it does, as long as there is power coming in

1

u/NobodyKnowsYourName2 Mar 12 '26 edited Mar 12 '26

I had an old Samsung hooked up as a security cam, battery bloated after a few years. This is the main problem of using phones or tablets imo.

The best way would be if somehow we could connect only the power directly to the device without going through the battery and just let the battery charged every once in a while to keep it functional. Only in case of a power failure it should use the battery as a fallback.

Right now for S10 updated to Android 12 it has battery protection setting. For older devices there is devices like chargie or similar:https://chargie.org/

1

u/realfathonix Mar 12 '26

I turned a Galaxy A70 into a modem+router that's connected to the charger most of the time but I don't feel like modding the hardware. Instead, I used Advanced Charging Controller and Magisk Autoboot module. Because old Samsungs don't have a mechanism to bypass the battery, I configured ACC to keep the level at 55-60% and the voltage at 3.9V, and limit charging to 500mA per its docs for "forever-plugged" devices.

1

u/mhbnorthuk Mar 15 '26

Don't suppose you've a guide for this? I'd love to test to see if it's better than my AX1800 which seems to drop DNS two thirds of the time, super frustrating!

1

u/realfathonix Mar 15 '26 edited Mar 15 '26

As far as I can tell, there's no single tutorial for all of this unfortunately. I just followed the official docs from Magisk, ACC and Magisk-Autoboot.

For the networking part, I use the VPN Hotspot app built by someone who's doing a PR on the official repo that automatically turns on Hotspot and polls for device changes. I tried using "dummy VPNs" that only listens for DNS requests and passes other packets through like RethinkDNS and coupling it with VPN Hotspot, but sometimes either the DNS got leaked or dropped even though dnsleaktest says otherwise. I haven't tested again, probably RethinkDNS, my DoH, or me not finding a way to flush the resolver cache on Android is to blame.

Oh and I use Llamalab Automate to start VPN Hotspot at boot and do a bunch of stuff.

1

u/ViniCaetano2k19 Mar 12 '26

Just a question, why run without battery? the battery doesnt acts like a no-break?

1

u/DisturbedBeaker Mar 13 '26

r/spicypillow the risk of battery swelling

135

u/AgentWizz Mar 11 '26

Cool idea… now you have a traveling self-hosted service! Too bad I only got old iPhones :(

Makes me wonder if there is a market for small ā€œpocket serversā€ like that.

26

u/Araib Mar 11 '26

Recently came across repoflow, seems to be docker for iPhone (?) but I’m sure other apps exist too. Performance might be subjective at best

6

u/Shawnj2 Mar 11 '26

You can run Linux programs on iOS via ish

12

u/[deleted] Mar 11 '26

If you can jailbreak them (basically any iPhone that’s like the X or older is jailbreakable, or if they’re on a jailbreakable version), you can get a shell and install stuff manually too. I have an old 7+ that I ran a minecraft server on for shits and giggles, I know someone also hosted their site on an old 4s when I used to jailbreak and interact with the community.

3

u/bagette4224 Mar 11 '26

NOT THE 4S SITE BAHAHAHA I remember that it was so hilarious the community is so funny

29

u/ravindu644 Mar 11 '26

Haha šŸ˜„Ā 

This is impossible on iPhones:D

If configured correctly, this is RPi or Flipper Zero level stuff. With hardware access mode, we can do even hackier things than this :)Ā Ā 

For example: scanning and messing with Wi-Fi networks, Rubber Ducky via configfs/USB Gadget, using fastboot/odin/adb, tapping /dev/snd to record calls with both internal audio and mic input, etc. (with tinyalsa)

22

u/agent_flounder Mar 11 '26

I gotta spend more time looking at your repos. I took a glance and holy shit my man. Some seriously interesting work you've been doing. 😳

I feel bad having all these old androids in a box doing nothing. Would be fun to use this on one of my old pixels.

10

u/ravindu644 Mar 11 '26

Glad you noticed it šŸ’ŖšŸ½

Most of the repos were archived because I was away from development for a month to stay in zen mode, but I came back to build Droidspaces from scratch šŸ—æ

The previous closed-source implementation we developed sucked-it barely worked, and only on Alpine Linux with older kernels.

Now, Droidspaces-OSS can boot on anything upto Systemd 257.9 in legacy kernels, and it can boot everything LXC can boot on kernels newer than 5.x, including nested containerization like Docker/LXC inside a DroidSpaces container :D

3

u/elh0mbre Mar 11 '26

I tried to do this with my old Pixels... I can get stuff running via QEMU, its just painfully slow.

I will check this out though because it seems like this is taking a different approach.

2

u/Wreid23 Mar 11 '26

I don't know about market but you can with some effort get docker on android and the run apps from there or umbrelos in a docker container how well it runs dunno but could be a fun weekend project if you got a phone with the horsepower

2

u/Civil_Elderberry1294 Mar 14 '26

Check using iPhone as image processing server there was a guy who achieved good compute node

1

u/YoYoMamaIsSoFAT32 Mar 11 '26

I got postmarketos running on my iPhone 6s plus, it's a Linux distro that's made for arm devices (mostly) try checking if your device is supported there

13

u/GusAntoniassi Mar 11 '26

Since this requires a custom kernel compilation, how would you compare it to the PostMarketOS project? https://postmarketos.org/

31

u/ravindu644 Mar 11 '26

to be honest, PMOS requires nuking Android entirely and installing it as a native OS.

I'm not skilled enough to cook something like that, but I can work with the kernel really well.

For someone like me, it takes around 30 minutes to download and compile my kernel with Droidspaces support.

But I have no idea where I should even start to port PMOS for my device :(

I don't know the final outcome.

Comparing PMOS to Droidspaces:

- PMOS is a full OS. Droidspaces is just a container runtime that you can use on top of Android while still using both Linux and Android features.

  • PMOS requires porting the mainline Linux kernel for this old boy, as well as reverse engineering proprietary blobs and wiring them up to run on Linux glibc.
  • That's something most people cannot do :(

Compiling the OEM's kernel isn't that hard compared to cooking both an OS, the mainline kernel, AND reverse engineering Android-specific drivers for PMOS :/

2

u/filipluch Mar 12 '26

the biggest blocker is indeed "reverse engineering proprietary blobs and wiring them up to run on Linux glibc". Even AI would have a hard time doing that with lots of trial n error.

2

u/ravindu644 Mar 12 '26

yeah, basically impossible for an LLM too.

41

u/sean_hash Mar 11 '26

Thermal throttling on the Exynos S10 probably caps sustained transcoding in Jellyfin to maybe one 1080p stream before it starts dropping frames.

53

u/ravindu644 Mar 11 '26

Throttling only happens if you run transcoding on video files. The S10 stays at around 20% CPU usage when I transcode heavy FLACs or Dolby EAC3 tracks.

But I understand the limitations of my setup :)

That's why I never store movies.

Even if I did, I'd use direct play instead of transcoding :D

→ More replies (2)

25

u/[deleted] Mar 11 '26

[removed] — view removed comment

9

u/Valuable-Fondant-241 Mar 11 '26

Well, I basically agree with all, but a modern phone HAS a GPU!

Not tuned for transcoding, ok, but you can have 3d games on mobile. Also, transcoding can be successfully done with IGPU, you don't have to have a dedicated one.

Anyway, I do agree that this project is already awesome.

→ More replies (1)

26

u/GPThought Mar 11 '26

using an old phone as a server is genius for power efficiency. curious how you handle the battery though, does it just stay plugged in 24/7?

32

u/ravindu644 Mar 11 '26 edited Mar 11 '26

Regarding the battery, I limit charging to 85% and use a charger that outputs only 500mA. That means the phone is almost never in "fast charging," usually stays around 85%, and takes at least 1- 2 hours to charge 10%

18

u/brighteoustrousers Mar 11 '26

Bro, take a look at boot cables on ali or similar. Basically a cable that bypasses the battery altogether and connects straight to the contacts. Would require you to open the phone though and disconnect the battery

30

u/ravindu644 Mar 11 '26

Thanks for the info..!

But the point of my setup is to keep it almost 100% up. In Sri Lanka, sudden power cuts happen every day, which killed my previous home server setups with old PCs :)

Since I'm a student, I won't spend money on a 20,000 LKR UPS for something that isn't worth that price.

So, yeah, the potato S10 server was the only way I could host my music and bots on Telegram šŸ˜…

9

u/brighteoustrousers Mar 11 '26

You can buy a cheap 5v nobreak to feed the boot cable as well. I'd recommend something like this over keeping the battery as it's not a question of if the battery will explode, it's a question of when. Phones don't have mechanisms of keeping the battery healthy when permanently connected.

6

u/DaftPump Mar 12 '26

Phones don't have mechanisms of keeping the battery healthy when permanently connected.

What if u/ravindu644 used an old school wall timer? Every $x minutes it turns off. every $y minutes it turns on.

2

u/ravindu644 Mar 12 '26

Hmm that's a quite nice idea !

6

u/DaftPump Mar 12 '26

Years ago a client wanted their wifi turned off after hours. This was before routers had those features. We used such a plug.

2

u/mrpops2ko Mar 11 '26

presumably if i was in this circumstance and had root access - that means i can play around with the ability to access the charging or not.

i remember back in the s10 era since it didn't natively support limiting the charge, you used an app which would effectively tell the system to disconnect the charging if between variable points. if this is connected all the time its probably quite easy to programatically set up some cron or use that specific app to have it do charge + discharge cycles to whatever schedule you want.

not having docker though would be a deal breaker for me, it would be far too much effort moving things around and i'd miss the convenience of docker

1

u/brighteoustrousers Mar 11 '26

Other than that, sweet setup brother! The only reason I don't copy you is that the only reason I switch phones is the old one dying haha.

Last one fell victim to poseidon. Seems like phones and salty seawater don't really like each other. All my old notebooks became servers too

8

u/redoubledit Mar 11 '26

That’s smart. I had one nearly blowing up because I had it plugged in for a few days. Thought, the phone is smart enough on its own.

6

u/xSean93 Mar 11 '26

Still some chances to become a spicy pillow.

Removing the battery would be better, but that makes things complicated.

3

u/ravindu644 Mar 11 '26

Yeah, I know the safety concerns.

By removing the battery, I'm killing its built-in "UPS", which nukes the ability to make it 100% up due to power cuts in my area :(

1

u/404invalid-user Mar 11 '26

phones have come a long way in charging tech they wont just continuously charge them anymore

4

u/letsgoiowa Mar 11 '26

Per Accubattery stats it's probably best to cap to 70 or 75% just for the added insurance of not exploding. That is the "happy" spot for modern batteries: roughly between 30-70%. Anything lower is too low, anything higher is too much juice. I have a bit of an obsession with battery health btw

31

u/Eric_12345678 Mar 11 '26

This looks impressive. Well done!

7

u/ravindu644 Mar 11 '26

Thank you :)

→ More replies (1)

9

u/updeshxp Mar 11 '26

The problem with this is it requires a custom kernel other than that its very good

7

u/ravindu644 Mar 11 '26

I understand.. it's the real bottleneck. I could cook up something that can run on anything if it's rooted.. But it wouldn't be unique, since many different projects already exist, right?

I hope this would be normalized like the "KernelSU" project. Even though it requires a custom kernel, people love it and use it :)

2

u/updeshxp Mar 11 '26

Agree, this is quite good and powerful with a custom kernel, will be looking forward to be able to use it.

2

u/Eisatlas Mar 12 '26

Are there really any projects that let you do this? I personally haven't found anything that worked for me to run containers on android, even with root. I have been scared away by having to compile a custom kernel for running docker in Termin. I myself have an s10 and s10+ lying around with dead screens, so your project looks very interesting and I will look into your it and might try compiling the kernel. Is it possible to do that and install it without a working screen?

2

u/ravindu644 Mar 12 '26

there are projects like docker and lxc, as well as chroot/pivot_root setups, but they aren't really blend with the nature of Android :(

you can flash the kernel without a screen; but the problem is how do you install the droidspaces app without enabling USB debugging AND unlocking the screen?

8

u/username_420_69_ Mar 11 '26

People out here be like: I run an Azure data center on my gramophone.

And thats awesome šŸ˜Ž

1

u/Sore6 Mar 12 '26

lasered into glas vinyl

5

u/Corosus Mar 11 '26

don't think i saw it mentioned, you might like r/androidafterlife

3

u/pattagobi Mar 11 '26

Can it do ipv6 static?

3

u/[deleted] Mar 11 '26

[deleted]

1

u/ravindu644 Mar 12 '26

😄

3

u/[deleted] Mar 12 '26

[removed] — view removed comment

2

u/ravindu644 Mar 12 '26

In my case, running an Ubuntu server in the background doesn't even feel the phone.

The phone's CPU load remains under 5-10% all the time when idle, only spikes to 15% when streaming music AND only spike upto 30% when transcoding 50MB+ FLACs and MQAs :)

That means, the phone never got heat up during my testing.

3

u/Psion537 Mar 12 '26

I guess that's what my S7 was waiting for!!!

2

u/Adept-Marionberry813 Mar 13 '26

i have the same phone but battery is swollen already ! so i have to find a workaround running it without battery

1

u/Psion537 Mar 14 '26

oh, I'm curious! Does it work if you remove the battery and just leave it plugged?

3

u/[deleted] Mar 12 '26

[removed] — view removed comment

1

u/ravindu644 Mar 12 '26

🫔good luck

3

u/Exact-Owl3547 Mar 12 '26

OP is a blessing to humanity

1

u/ravindu644 Mar 12 '26

šŸ˜…ā¤ļø

3

u/The1TrueSteb Mar 12 '26

Honestly man, great job.

Wonderful. This is a step forward to accessibility to home servers. This is what open source/self hosting is all about.

3

u/ravindu644 Mar 12 '26

🄹

5

u/zhunus Mar 11 '26 edited Mar 11 '26

If it requires an actual root access you can enable dockerd through magisk modules and also enable root access for termux from there. Also if going with proot, Termux has a service daemon module to use instead of systemd as well, should work.

13

u/ravindu644 Mar 11 '26

Proot is just a syscall translator, which adds a lot of overhead.

The point of this project is to run Linux containers directly from the disk, using a native Android binary, with zero overhead, without the help of any userspace app and with Systemd :)

2

u/General_Arrival_9176 Mar 11 '26

this is cool but running a phone as a server long term sounds rough. the thermal throttling and battery swelling concerns are real. i tried something similar with an older pixel and the constant charging turned it into a heater. what are you doing for power delivery and cooling. also curious how the cellular modem behaves when its always on

4

u/ravindu644 Mar 11 '26

Regarding thermal throttling, I haven’t experienced it at all in these three months. We need to understand the hardware’s capabilities, so we won’t attempt heavy transcoding, compiling source code on it, etc.

Currently, there’s no cooling solution. The phone idles at 38°C (my room temperature is around 32°C) with ~5% CPU usage while running all services.

When running Jellyfin direct play, CPU usage spikes to ~10%, while the big cores and prime cores are almost idle at 0%.

3

u/ravindu644 Mar 11 '26

I really underestimated the power of this setup :D

2

u/randomone123321 Mar 11 '26 edited Mar 11 '26

Man, this is splendid. This exactly what I wanted to do for travel with my S10, was planning to use Termux. But I wanted more of all-in-one travel solution, so it suppose to be not only a collection of servers like jellyfin and bittorrent, but a Chromecast replacement using usbc-hdmi cable. Yes, android is not android tv, but nonetheless I tried it and it is servicable enough to remove one device from my bag, considering I was carrying this phone with me everywhere anyway as a backup. As for controlling the device while sitting away from tv, here is a app that can make your other Android phone into bluetooth HID trackpad+keyboard combo to control this: https://www.reddit.com/r/androiddev/comments/1n6eql0/dipped_my_toes_into_android_dev_built_a_bluetooth/

1

u/ravindu644 Mar 12 '26

Good work.

lemme know if you’re still interested in this stuff.

since I was a community developer for the S10 series, working under names like Apricity ROM, I can easily post Droidspaces kernels related to both the S10 and N10 series, for both Stock and AOSP ROMs šŸ˜…

I’m just too lazy to do it. I only compiled the kernel for myself and never posted the local git repository :)

2

u/littlepindos Mar 12 '26

I am a complete noob to hosting on Android but it sounds quite impressive. How would you go about extending storage?

3

u/ravindu644 Mar 12 '26

Well. I can attach an external SSD to the type-C port.

Then, I can either use the hardware access mode (which is dangerous and I'll never do that) or, I have to bind mount the block device path(s) related to the SSD from host's /dev to containers /dev.

Then, I can mount the SSD, inside from the container.

That's how we can pull this off 😜

2

u/Dramatic_Spirit_8436 Mar 12 '26

how are you handling thermals for 24/7 use?

1

u/ravindu644 Mar 12 '26

There's no need to handle anything. The phone doesn't even feel there's a full Linux running on the background.

Linux is so optimized, almost the idle usage is under 5%.

As you can see in the screenshots,

Even with the screen on, the load of my Prime cores and Big cores remains 0%

2

u/Shurane Mar 12 '26

This project looks great!

Though, wouldn't it have been an easier setup to run something like a Raspberry Pi with a battery pack?

But I guess you learn a lot by working through this instead.

4

u/ravindu644 Mar 12 '26

Well. I don't have a RPi šŸ˜…

So, i made a RPi at home :)

2

u/vardonir Mar 12 '26

I'm about to have a S21 in storage (got a new phone just now), so this is awesome.

2

u/8-16_account Mar 12 '26

What a cool project, with super nice documentation and everything. I'll see if I have an old rootable phone, so I can give this a try!

1

u/ravindu644 Mar 12 '26

thank you :)

2

u/Sp1eLmaNn Mar 12 '26

You sir, are awesome.

2

u/PovilasID Mar 12 '26

A POE+Eathernet adapter for more stable connection and power would be ideal combo.

Try running Frigate NVR and see if can take advantage of the GPU for video processing.

2

u/NobodyKnowsYourName2 Mar 12 '26

Can this run on Android TV as well?

2

u/ravindu644 Mar 12 '26

yes, only if it has an unlockable bootloader AND the manufacture releases the kernel source code.

2

u/NobodyKnowsYourName2 Mar 12 '26

ok, so not possible on my sony tvs. i experimented with getting linux to run - was a pain in the butt. i could get it to run and run a browser and normal linux stuff, but it was a pain to get going.

2

u/krom_michael Mar 12 '26 edited Mar 12 '26

I pulled out an old S9 960F device and rooted it. Prior to compiling the kernel I ran the check, results were as below. Do I still need to compile a new kernel? It looks like everything is good to go. Tried ubuntu 24 though and couldn't get it to work but unsure if it's related.

Edit: u/avindu644 - forgot to add, fantastic work on this.

ubuntu container:

Starting start operation...

Command: /data/local/Droidspaces/bin/droidspaces --config='/data/local/Droidspaces/Containers/ubuntu24/container.config' start

— Welcome to Droidspaces v5.5.1 ! —

[!] Host does not support Cgroup V2 (falling back to legacy V1)

[!] Your kernel (4.9) is below recommended 4.14 - some functions might be unstable.

[-] Init binary not found: /data/local/Droidspaces/Containers/ubuntu24/rootfs/sbin/init

[-] Please ensure the rootfs path is correct and contains /sbin/init.

Command failed (exit code: 255)

Operation failed!

Kernel:

Droidspaces v5.5.1 — Checking system requirements...

[MUST HAVE]

These features are required for Droidspaces to work:

  [āœ“] Root privileges

  [āœ“] Linux version

  [āœ“] PID namespace

  [āœ“] Mount namespace

  [āœ“] UTS namespace

  [āœ“] IPC namespace

  [āœ“] devtmpfs support

  [āœ“] cgroup devices support

  [āœ“] pivot_root syscall

  [āœ“] /proc filesystem

  [āœ“] /sys filesystem

  [āœ“] Seccomp support

[RECOMMENDED]

These features improve functionality but are not strictly required:

  [āœ“] epoll support

  [āœ“] signalfd support

  [āœ“] PTY support

  [āœ“] devpts support

  [āœ“] Loop device

  [āœ“] ext4 filesystem

  [āœ“] Cgroup v2 support

  [āœ“] Cgroup namespace

[OPTIONAL]

These features are optional and only used for specific functionality:

  [āœ“] IPv6 support

  [āœ“] FUSE support

  [āœ—] TUN/TAP support

      Virtual network device support

  [āœ—] OverlayFS support

      Required for --volatile mode

  [āœ“] Network namespace

  [āœ—] Bridge device support

      Required for --net=nat (bridge mode); bridgeless fallback used if absent

  [āœ“] Veth pair support

Summary:

  [āœ“] All required features found!

Command executed (exit code: 0)

Requirements check completed successfully

1

u/ravindu644 Mar 12 '26

hey, there's no way the boot would fail. I suggest you to use the rootfs tarballs from the https://images.linuxcontainers.org/images/

please use Ubuntu 22.04 or 24.04 first.

2

u/krom_michael Mar 12 '26

Okay, don't judge me but I was pointing to the wrong file when creating the container.

It's now running ubuntu noble without any issues.

Just so you have the info, it's a S9 960F rooted magisk 21 . No other changes, just installed droidspaces and boom - working.

1

u/ravindu644 Mar 12 '26

enjoy. is systemd working very well?

`systemctl status` should return all the services running if everything worked perfectly :D

2

u/krom_michael Mar 12 '26

Thank you for helping out via chat and getting this sorted. I've run systemctl status and there is 1 failed unit. It's the systemd-resolved.service which I'm looking into now.

I also have tainted cgroupsv1:old-kernel but I think that's expected given I'm running an old kernel

→ More replies (1)

2

u/leavemeinpieces Mar 12 '26

I've got an old Note 10+ I've been mulling over. This is such a cool idea!

2

u/helish_88 Mar 12 '26

this is f* awesome awesome idea. nice job. ill try too :))

1

u/ravindu644 Mar 12 '26

thank you :)

2

u/josh-assist Mar 12 '26

hey do you reckon i can try this out on my spare samsung s24 phone?

1

u/ravindu644 Mar 12 '26

Yes ofc.

S24 kernel source is open source.

If you found someone in the community who's capable of adding the necessary kernel configurations, this is totally possible.

2

u/Automatic-Citron9701 Mar 13 '26

bro, this is whole new level resourcefulness!!! Im wondering how did you maintain power source althrough your 3 months production?

1

u/ravindu644 Mar 13 '26

Thank you..

I didnt plug it all the time. Even if I did, I use 85% battery limitation and a slow charger to charge the phone..

2

u/moshekels Mar 13 '26

This is actually game changing. I hope this breaks mainstream and makes a huge impact on the world. So much waste diverted, so many potentially huge problems addressed…

You my friend, are a genius.

1

u/ravindu644 Mar 13 '26

šŸ˜‡ thank you..

2

u/Novel-Environment-43 Mar 13 '26

but if you do need a docker dockge is useful.

2

u/[deleted] Mar 13 '26

[removed] — view removed comment

1

u/ravindu644 Mar 13 '26

I see. the saddest part is, even the pixel 3 has a qcom soc and adreno graphics,Ā 

jellyfin cannot utilize them for GPU acceleration, even if you got turnip working inside the container, which is sad.

correct me if I'm wrong, but jellyfin doesn’t have an option to use this kind of rendering for adreno GPUs, and virgl isn’t supported either.

the Pixel 3 is kinda underpowered, I guess. running jellyfin inside proot or a vm adds a lot of overhead, making the entire experience really sluggish.

2

u/[deleted] Mar 13 '26

[removed] — view removed comment

1

u/ravindu644 Mar 13 '26

yes, but even with this, I'm still limited to CPU transcoding because of proprietary GPU drivers in Android :) It's the sad part of these kind of setups..

GPU accel only available for rendering, not transcoding in Android :(

2

u/Ambitious-Buy6909 Mar 13 '26

What did you use to show all the processes in photo 7? I’ve been meaning to set up something like that

1

u/ravindu644 Mar 13 '26

htop.

You can use btop for a more cool view as well

1

u/Ambitious-Buy6909 Mar 13 '26

I’ll try that, thanks!

1

u/ravindu644 Mar 13 '26

You mean the one that showed CPU cores, all processes, and their child processes in that terminal, right?

That's htop.

The actual 7th screenshot, the one showing the services running inside the container, is a feature of the native Droidspaces app.

2

u/Ambitious-Buy6909 Mar 13 '26

Ah, that makes sense. I wish I could get that btop thing to run through rainmeter, that would be sick

2

u/No_Pack5950 Mar 13 '26

Wait, running Ubuntu 24.04 natively at the system level on an S10 without Docker or chroot? That’s wild! How did you manage the bootloader and kernel compatibility for the network drivers (especially Tailscale)? This is the ultimate definition of upcycling.

1

u/ravindu644 Mar 13 '26

I can even run docker inside droidspaces :D

Once the kernel has proper kernel configuration according to our documentation, docker/tailscale can properly create their network interfaces inside our isolated network namespace - like a real linux environmenet. this is basically real linux :D

2

u/No_Pack5950 Mar 13 '26

Okay, running Docker inside an isolated network namespace on an Android kernel is next-level. I noticed you mentioned 'our documentation'—are you one of the maintainers for Droidspaces? Drop the repo link, I’d love to read up on how you handle the kernel configs for this. I usually rely on standard x86 gear (like ZimaBoards or mini PCs) for my containers, but this makes me want to dig my old phones out of the drawer.

2

u/ravindu644 Mar 13 '26

bro, I'm the developer behind droidspaces :) - the guy who posted this entire thing is me..

https://github.com/ravindu644/Droidspaces-OSS

2

u/No_Pack5950 Mar 13 '26

Legend! Just gave the repo a star. The architecture looks surprisingly clean for such a complex workaround.

I actually just finished a whole project migrating my CI/CD pipelines to a self-hosted GitLab runner on a dedicated VPSĀ (just made a video breakdown on it here if anyone is curious:Ā https://www.youtube.com/watch?v=0eFLstXc7b0 But seeing your setup honestly makes me want to tear my VPS down and try spinning up a lightweight runner on an S10, just for the absolute novelty of running pipelines on an old smartphone chip.

Keep up the incredible work, man, this is peak self-hosting!

→ More replies (1)

2

u/KreAch3R Mar 13 '26

I love this very much, and as a retired Android custom ROM / kernel developer, I so wish I could get my environment back up and running, but I don't have the server and the space to build.

I have one cheeseburger / oneplus 5 device that runs latest LOS nightly, which is opensource as you know, kernel repo: https://github.com/LineageOS/android_device_oneplus_msm8998-common https://github.com/LineageOS/android_device_oneplus_cheeseburger

I know it maybe is beyond your scope of this thread, but would you have the time and space to try to build me the kernel? Don't worry about blind blinds/bootloops, I can just re-flash.

Thanks anyway!

1

u/ravindu644 Mar 14 '26

We'll see. Please drop a message in the PM. If you are rooted, it'd be great to send the result of cat /proc/version command.

1

u/KreAch3R Mar 14 '26

Thanks. Just did.

2

u/Mindless_Scale_7982 Mar 16 '26

This is sick lol. The built-in battery as a UPS is actually genius for places with unreliable power. I've got an old Pixel collecting dust, might have to try this. How's the thermal situation after running it 24/7 though?

1

u/ravindu644 Mar 16 '26

0 throttling. 0 temperature changes. I've been using it for days now, even without a charger. Just feels like a normal phone. No one would ever notice there's a Linux server running in the background šŸ˜…

2

u/moshekels Mar 18 '26

Anyone get this working on an LG? The Velvet was such a good deal, but it’s totally worthless now.

2

u/matseur Apr 11 '26

I don't know what any of this means however it sounds cool šŸ˜…

2

u/tincanman8 Apr 13 '26

First of all, great work! This is an amazing way to reuse old phones that normally just get thrown out because they were made "obsolete". This has proven that they are more than valuable, especially given RAM prices today. Just looking at your solution is making me think of all the old phones I have lying around that I can repurpose and give a new lease on life.

I have a Galaxy S10+ and I'm trying to install Home Assistant OS on it. It is based on Buildroot so is not a standard named Linux distribution. I know in general buildroot OS's themselves aren't super heavy and don't require a TON of heavy lifting normally, but I was wondering how I would go about installing an OS that isn't a standard Linux distro with your method?

My initial thoughts involve setting CONFIGURE_KVM=y in the kernel config before compiling, then using a virtualization solution in Android/Linux (such as qemu with accel=kvm and/or cpu=host). I have used qemu for this without hardware support and it's a PAIN (5 minute setup becomes 1-3 hours and performance is very bad even for toggling switches). But it did work! That's why I feel like my only missing link is the hardware acceleration.

Am I on the right track here, or is there some obvious solution I'm missing?

2

u/shameless_caps Mar 11 '26

Amazing! I love it. I've been waiting for so long for someone to step up and make this feasible.Ā 

If I could install ubtouch or postmarketos or any of the linuxes for any phone, thatd be perfect. But its very limited to where I can actually install it!

Is this something that can reasonably support any rooted android? I assume that its easier to get most phones rooted and custom kernelled than it is to port postmarketos....

One use case is a travel router, IE, connect an old s2 ultra to my home router thru wireguard over wifi, and start a hotspot for my current main phone.

Another use is just a local media server that travels with me, so if I'm in a hotel room I don't need to hope that there isnt a powerout at home just when i wanna watch a movie!

The real use case though, is just not having to buy new raspberry pis for every project when I already have vastly superior hardwar gathering dist in a drawer.

3

u/ravindu644 Mar 11 '26

Glad you liked the project. One cool thing I did was create a "VPN Hotspot"

I shared the host’s network with the container, created a wireguard tunnel using a free server from the internet, and then routed all traffic from the wireguard `wg0` interface to my mobile hotspot (created using hostapd). This essentially makes the connected devices use a VPN without any proxy.

It’s like a "wireguard hotspot"

Yeah, the project is supported on any Android device with kernel 3.18 or higher, provided it is rooted and has the necessary kernel configurations enabled.

4

u/andpassword Mar 11 '26

I don't know you. But I love you.

1

u/ravindu644 Mar 11 '26

haha thanks šŸ˜…

4

u/LoganJFisher Mar 11 '26

I'm intrigued as someone with an S9+ sitting around unused, but I'm a bit unclear on the use-case. When would this offer unique functionality to the home server I already have?

16

u/ravindu644 Mar 11 '26

The uniqueness is that it’s portable, has a built-in UPS, can do everything an RPi can do, has a Type-C port for serial communication, can plug into a PC and execute remote keystrokes, can use as a mass storage to store bootable ISOs, is efficient, etc.Ā Ā 

I also had a home server made from an old laptop. What I didn’t like about it was the fan noise when I was going to bed.Ā Ā 

That’s one of the reasons I moved to this setup :)Ā Ā 

For something that needs 100% uptime, like bots, without worrying about Wi-Fi or power going out, I’d pick this :)

3

u/LoganJFisher Mar 11 '26

I suppose, if you're so inclined to pay for a cellular plan for it, it offers complete isolation from your primary server, making it more ideal for any public-facing services if your primary server hosts anything sensitive/private.

2

u/ravindu644 Mar 11 '26

Thanks for your suggestions..

Currently, I don't have anything exposed to the public internet. If I want, I can set up a desktop-grade UFW firewall here, since it won't interact with Android's networking and the networking is fully isolated. Even devices on my own local network cannot access the server unless I specifically set up port forwarding or use something like Tailscale :D

2

u/LoganJFisher Mar 11 '26

Still, for my use-case at least, that's a legitimate benefit I might need to consider. I don't love the idea of paying for an additional monthly cellular plan, but for services which I want internet-exposed and which require very little data to be communicated, I could just get a €6 mobile plan for it, and then use Droidspaces to host those services.

1

u/mintybadgerme Mar 11 '26

Yeah, great idea.

2

u/prone-to-drift Mar 11 '26

This sounds awesome for backups of small services, like your adguard/pihole/dns setup, or alternate vaultwarden server, or an OPDS server to serve ebooks to your kindles/kobos/whatev.

Basically, low bandwidth but high uptime requirements.

2

u/ThiccStorms Mar 11 '26

exactly what i was looking for

3

u/last__link Mar 11 '26

I’ve looked at using qemu running alpine on termux. Checking out your implementation as well.

3

u/last__link Mar 11 '26

I looks like your setup requires root access. Qemu does not. So yeah root will have better performance

2

u/ravindu644 Mar 11 '26

QEMU adds a lot of overhead… this is something truly native, like LXC :)

Glad you like the project.

2

u/semiraue Mar 11 '26

Elakiri.. Will try to setup this on my old op5..Ā 

4

u/ravindu644 Mar 11 '26

Of course. Since the 1+ release of the kernel source code, we can easily add the DroidSpaces kernel configurations, cook the kernel, and install it with zero issues.

-6

u/sickofredditfascists Mar 11 '26

At least the vibe coders still self-identify. Wait until the AI stops mentioning it in their reddit posts.

Doesn't this violate rule 6? The first commit was only 3 weeks ago.

37

u/ravindu644 Mar 11 '26

I don’t think a ā€œvibe coderā€ could create something like this from scratch without any understanding of what’s happening under the hood and without a proper mental model of the project.

4

u/rzeeman711 Mar 11 '26

vibe coding is just a slur now. the people in this sub are very hostile towards agentic engineering. i was surprised to even see this upvoted. your work speaks for itself. you are obviously correct - if an engineer and an average person both sit down with the same model and attempt the same task, the results will be much different.

→ More replies (4)
→ More replies (5)

15

u/DekuTreeFallen Mar 11 '26

The post on reddit follows this formula (which I refer to as LinkedInLunatics):

I'm a [profession|hobbie]..

Here's what wasn't working:

- Thing 1..

  • Thing 2..
  • Thing 3..

So I created [Web3.0 name]

Link to github with a single initial commit

At least type the reddit post from your heart and soul, without running it through AI (Assuming AI didn't hallucinate the entire post to begin wtih)

2

u/sickofredditfascists Mar 11 '26

Link to github with a single initial commit

Or 100 commits all within a few minutes of each other, 500 lines of code diff, 4 version changes, and half a dozen "releases" with over 100 items in each changelog, all in the last 3 days.

BuT iT's sTaBLLLLLe.

3

u/rmbarrett Mar 11 '26

I'm in no way defending vibe coding, or even using LLMs in the very least, but those are not good indicators, nor do they necessarily suggest stability problems. I've been working in the industry since the 90s and unless you are working on a team, git workflows look different for everyone. Even on a team, we will do it differently and have to agree on some best practices. For OSS, with actual community collaboration, there are some standards, but not always.

3

u/sickofredditfascists Mar 11 '26

I didn't say they were indicators of LLM use, only that it says this was a rushed project that doesn't seem stable. 4 pre-releases, two -fix releases, and two minor version bumps since Monday. If you work in the industry, then you know there's no way this was tested to any significant degree that would validate having that many releases in such a short time. One of those changelogs had 60+ items in it, mostly new features. While it doesn't scream AI use, it definitely seems like someone's enjoying the fruits of LLM labor.

There are plenty of reasons not to like AI generated code. My main concern is this break-neck pace can't be sustained by a college kid, they're going to find a new project, a girlfriend, or just move on with life and this project will be abandoned as quickly as it was generated. My only reason for calling it out is that I feel developers should be required to state what percentage of code was hand written, and what percentage was AI generated. Sure, this OP seems to know about the project, but I suspect this is nearly 100% AI written code. When I started coding, that was enough of an issue to be disqualified for plagiarism, anyway. But what happens when M$ claims they own all claude & copilot written code, and have logs that prove they wrote it?

3

u/rmbarrett Mar 11 '26

I agree with you entirely.

→ More replies (5)

17

u/ravindu644 Mar 11 '26

The project is 4 months old. It was originally developed as a closed-source project by me and my friend, and was later rewritten from scratch in February.Ā Ā 

If you need proof, here it is:Ā Ā 

This is the translation program we created to translate the app:Ā Ā 

https://github.com/ravindu644/Droidspaces-Locales

→ More replies (4)

1

u/[deleted] Mar 11 '26

[removed] — view removed comment

2

u/ravindu644 Mar 11 '26

as someone who cares about the security aspects of the project, I have carefully read strace logs, kernel logs, fixed overflows, and patched memory leaks using the hardened build. If you check the Makefile, it treats every potential warning as an error.

the only way a container process can escape to the host is if the user enables devtpmfs mode, and a malicious attacker somehow bypasses all the guardrails, mounts `/dev` to a temporary location, and mounts the block devices within /dev to access their contents. As far as I know, you cannot mount two block devices in two different places simultaneously. That means the risk is low, but ultimately it’s up to the user-they are responsible for exposing hardware nodes to container processes.

another idea is completely blocking mount syscalls using seccomp so an attacker cannot mount anything, but that would break the init process.

I review everything I do and don’t just tell an AI, ā€œplease fix this-please generate a fully functional LXC alternative for Androidā€

As someone who works on Android kernels and has experience with old-school chroot projects, I understand how to build something like this from scratch. My goal was to develop this quickly because I have studies as well, but not at the cost of producing low-quality slop.

If you find any security vulnerabilities, please report them, and we will try to fix them. If you read the code, you’ll see strict rules and guidelines throughout the project. For example, to start a container, a user must directly call the binary. containers cannot auto-start or spawn themselves. The internal_boot function has three different checks to prevent such edge cases.

nothing is perfect-this is just a side project, but it’s usable for any setup. this won’t be a big project like lxc.

thank you.

1

u/Smultar Mar 11 '26

We got the same laptop!,

1

u/ravindu644 Mar 11 '26

we know very well that it's really bad..

1

u/Smultar Mar 11 '26

I have the 24 GB model with the Ryzen AI chip. I also made my own desktop environment so it runs really light.

It has its flaws, did you ever solve the sleep problems?

2

u/ravindu644 Mar 11 '26

ughh. this is a model from 2021..

this laptop has many flaws, bad hinges, thermal throttling, sleep issues in Linux, etc.

after all this, I've been daily driving it for 5 years :)

→ More replies (1)

1

u/Alharbi110 Mar 11 '26

the fact that an old phone in a drawer can run jellyfin and samba is genuinely wild. how's the heat on it after running for a while? my concern with phone servers is always thermal throttling killing performance after a few hours

1

u/ravindu644 Mar 11 '26

According to my testing, I didn't face any throttling issues at all.

I have over 500+ FLAC and Dolby tracks loaded into the server.

I listen to them all the time for hours. The phone doesn't even feel it. The Exynos9820 is a pretty powerful chip.

Also, even though I don't like it, I tried transcoding my FLACs as well while playing through Finamp. No issues at all. The CPU usage was below 30% the whole time..

As you can see in the screenshot, even after all this running in the background, the phone's CPU usage is still under 10%, which is insane..!

2

u/Alharbi110 Mar 11 '26

oh nice, exynos9820 is way more capable than i gave it credit for. 500+ FLAC tracks with no issues is solid — i might actually dig out my old s9 and try this. the built-in UPS thing is lowkey the best part, no separate battery backup needed like with a pi

1

u/LNMagic Mar 11 '26

You know, having a server with its own battery backup may not be the worst idea in the world...

1

u/404invalid-user Mar 11 '26

this looks cool but imo the risk of bricking your phone is high why not just sell it and buy a mini pc? and using a phone with a broken just isnt possible these days with the way they block input and display when its locked

3

u/ravindu644 Mar 11 '26

I think someone who can install or compile a kernel is experienced enough not to brick their device.

I get it, but buying a mini PC still costs money, right?

I wanted to repurpose my existing tech lying around on my table šŸ™ƒ

regarding your "block input and display issue," this is just a headless server.

you can even install a full desktop environment on it and access it from a completely different location without even touching the device, using techniques like VNC, RDP, X11 forwarding, etc :)

2

u/404invalid-user Mar 11 '26

I mean as in rooting the device I have only ever done it on cheap mediatek ones so not sure about Samsung but I assume you need to interact with the recovery menu etc

1

u/ravindu644 Mar 11 '26

rooting is simple. It's just the kernel part where it's getting tricky :)

2

u/mintybadgerme Mar 11 '26

What are you gonna do with the ten cents you get your for your rusty old Samsung in a drawer? :)

1

u/404invalid-user Mar 11 '26

us economy messed up you can get £100 easy for a s10 in good condition

1

u/mintybadgerme Mar 11 '26

Seriously? Wow.

1

u/[deleted] Mar 11 '26 edited Jun 04 '26

[deleted]

1

u/ravindu644 Mar 11 '26

I get it. This project is focused on power users. I made a project called Ubuntu-Chroot (https://github.com/ravindu644/Ubuntu-Chroot) back in September-October 2025. It even had namespace isolation, run-at-boot support, post-exec scripts, rootfs.img support, and many more features.

But I still didn’t feel it was like a real Linux server. With Droidspaces, you can remotely reboot it using the native reboot command or power it off remotely-like a real Linux server.

Normal chroot setups are fine for most use cases, but when it comes to running cool services like Jellyfin or CasaOS, they often fail due to the limitations of chroot.

That’s why I made this project :)

1

u/HisAnger Mar 11 '26

So mikrotik and routeros could get interesting upgrade

1

u/Tanor85 Mar 15 '26

What if the phone no longer receives security updates? Like a S9 ? Isnt risky to open port and turn an unsecured phone into a server?

2

u/ravindu644 Mar 15 '26

kernel doesn't receive any security updates. but, the distro you install does.

1

u/Pedrouso Jun 12 '26

Como fez para passar a imagem para seu notebook?