I had an old Google Pixel 3a XL sitting around and decided to see if it could handle running as a fully offline, self-contained web server.

I flashed postmarketOS 26.06 (headless Alpine Linux base) to it and set up a portable media node that broadcasts its own Wi-Fi AP, serves static pages, and streams video over a captive portal - no cell data or upstream internet needed.

Quick Hardware/Tech Stack Breakdown:

  • Device: Google Pixel 3a XL (2019)
  • OS: postmarketOS 26.06 (CLI base with OpenRC)
  • Networking/AP: hostapd for the AP, dnsmasq for DHCP & wildcard DNS routing
  • Firewall: nftables redirecting port 80 requests to trigger the captive portal popup automatically
  • Web Server: Lighttpd handling HTTP requests and MP4 video range requests

Performance & Power Draw: Under a test load streaming 720p video to 4 concurrent devices, total CPU usage averaged around 5% (load avg 0.51). Power draw stayed around ~2.4W off the internal battery, with temps holding steady at 54°C.

Why build this? Mainly as an offline entertainment and information node. I run a non-profit foundation providing SCUBA training to young survivors of childhood abuse, and having a tiny, battery-powered web node lets us provide offline information and videos to people while traveling. I will also be able to use it to provide training videos if I am teaching in a location that does not have internet access available.

I wrote up a complete overview covering the setup, and performance metrics if anyone wants to replicate it or build something similar. Over the coming weeks I will be posting configs and some other information to Github with a link from my site.

https://www.muttmutt.us/geeky-stuff/portable-web-server-on-an-android-phone-for-offline-access/

Happy to answer any questions about postmarketOS setup or the networking config!

all 6 comments

sorted by: hot top controversial new old
[–] 2 points 1 month ago (5 children)

I use my 3a as GPS using Lineage OS and a Wi-Fi hotspot

  • source
  • hideshow 5 child comments
  • [–] [S] 2 points 1 month ago (4 children)

    I've used older phones for a lot of things like that. I have a couple that I use for bedroom HomeAssistant controllers, along with a couple tablets for near the front and back doors. I have an LG V20 I have been tinkering with so that I can power it without a battery at all but that is a bit of a pain.

    I have seen projects where phones have been turned into vehicle dash camera's that once connected to WiFi will upload to the home server. There are a ton of other things you can do with an old phone if you just find a way to use it. The bad thing is that a lot of the older phones are stuck on the OS they have with no chance of another update or ability to change the OS for other uses.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 1 point 1 month ago (3 children)

    It was fun! I'd never done any kind of sideloading or customization of a phone prior. I learned a lot from the experience. Similar getting the Jellyfin app to run on a Samsung TV. I'd like to eventually convert my old laptop into an automotive diagnostic reader, with the ability to add/delete keys via the OBDII port. That's a big project tho, lots of moving parts

    Thanks for the write-up on your post, very informative 😁♥️

  • source
  • parent
  • hideshow 3 child comments
  • [–] [S] 1 point 1 month ago (2 children)

    Just grab an ELM327 Bluetooth OBD II adapter and Torque for Android. At night it can easily be used as a heads up display and if you get the window cling for the heads up displays you can use it in the daytime too. It won't add or remove keys but it works great for data logging and diagnostics.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 1 month ago (1 child)

    I have that, it's pretty neat. I want to see what I can get into regarding keys in party because I'm a commercial door locksmith that is bi-specialty curious

  • source
  • parent
  • hideshow 1 child comment
  • [–] [S] 1 point 1 month ago

    Ahh I understand. I only have one vehicle that uses electronic keys so I bought an OBD II adapter from a place vs taking it to a shop. I highly doubt I'm going to get a different vehicle any time soon to need to add more more keys.

  • source
  • parent
  • 26 comments in c/selfhosted@lemmy.world view that post
    [–] 32 points 1 month ago* (last edited 1 month ago) (8 children)

    I love this.

    As I get older, I realize that the myriad of lower-power devices I have a perfectly suitable to fill roles in my infra in this way.

  • source
  • hideshow 8 child comments
  • [–] [S] 13 points 1 month ago (7 children)

    If the bootloader can be unlocked you can do a ton of things like this. If not you are limited to using Termux and the packages you can install without roof permissions.

  • source
  • parent
  • hideshow 7 child comments
  • [–] 8 points 1 month ago (5 children)

    What are you planning on doing on the roof?

  • source
  • parent
  • hideshow 5 child comments
  • [–] [S] 4 points 1 month ago (2 children)

    Damn swype... I replaced the roof 2 years ago. And I mean that literally tore it off completely all (4 layers) and put a new one on by myself.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 1 month ago (1 child)

    Hopefully installing solar panels on spite of the HOA

  • source
  • parent
  • hideshow 1 child comment
  • [–] [S] 4 points 1 month ago

    Yes on the solar panels. No on the HOA. Small town life is good. I installed the system controller 3, IQ Combiner 5, and two IQ 5P battery's already. Never pulled a single permit, nor had anyone tell me I couldn't do it. 7.2KW with IQ8A's will be on the roof soon.

  • source
  • parent
  • [–] 24 points 1 month ago (10 children)

    Very nice and very cool, although please don't trust their batteries. The pixel line is known for spicy pillows and I have personal experience with the pixel 3xl going bad.

  • source
  • hideshow 10 child comments
  • [–] 11 points 1 month ago (4 children)

    Yeah, I had to replace the battery on my 3a. Wish I knew how to mod it to run without a battery so I could use it to upload pics to google photos for free

  • source
  • parent
  • hideshow 4 child comments
  • [–] 9 points 1 month ago (3 children)

    Don't take this as advice, just more info. This guy pulled off the same thing on a different phone

    https://m.youtube.com/watch?v=0cOEc7ZG6rg

  • source
  • parent
  • hideshow 3 child comments
  • [–] 5 points 1 month ago (2 children)

    Cool but I really dont have the technical know how to do that haha

  • source
  • parent
  • hideshow 2 child comments
  • [–] [S] 7 points 1 month ago (4 children)

    Yeah, I don't trust any of the device batteries truthfully. This one has a little swelling because my stepson used it for a while and had the bright idea to leave it constantly plugged in. I will not be flying with it for sure and when I do travel it will not get packed where I can't access it easily.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 3 points 1 month ago (1 child)

    Might want to look into methods for charging to 80 percent tops most times and allow some discharge time. Let the lithium breathe. Only reason it never tolerated 24/7 power out of the box is lack of considerate design.

  • source
  • parent
  • hideshow 1 child comment
  • [–] [S] 4 points 1 month ago

    On my wall mounted stuff at home I use HomeAssistant and turn the charger on when the batteries get to 50 percent and off at 80 percent. Not really an option for this device while on the go though.

  • source
  • parent
  • [–] 7 points 1 month ago

    Really cool project - well done!

  • source
  • [–] 5 points 1 month ago (1 child)

    Curious if I can do something similar with the pixel 3…

  • source
  • hideshow 1 child comment
  • [–] 6 points 1 month ago (2 children)