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!

  • non_burglar@lemmy.world
    link
    fedilink
    English
    arrow-up
    6
    ·
    edit-2
    2 days ago

    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.

    • MuttMutt@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      2 days ago

      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.

        • MuttMutt@lemmy.worldOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          8 hours ago

          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.

          • MuttMutt@lemmy.worldOP
            link
            fedilink
            English
            arrow-up
            1
            ·
            8 hours 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.

  • SolacefromSilence@fedia.io
    link
    fedilink
    arrow-up
    3
    ·
    2 days ago

    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.

    • MuttMutt@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 day ago

      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.

      • abcdqfr@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 day ago

        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.

        • MuttMutt@lemmy.worldOP
          link
          fedilink
          English
          arrow-up
          2
          ·
          8 hours 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.