Hosting a website on a PinePhone, etc.
(02-27-2021, 03:55 AM)a-l Wrote:
(02-24-2021, 12:08 AM)Trbl Wrote:
(02-23-2021, 08:15 PM)TRS-80 Wrote:
(02-23-2021, 06:04 PM)Trbl Wrote: you gotta jump some hoops with verizon but it seems to be possible to get an APN with open ports / a public IP or at least some forwarding.

Nginx runs well, I'm hosting a static website on my pinephone *on 4G*
This is really interesting (and honestly, better than what I was expecting)!

So, now that it appears technically possible, the question becomes: do you want to / is that a good idea?  I must say, that Trbl's website loaded right away for me.  For a small static site, that's not getting much traffic yet, that might actually be perfectly fine.
In fact, playing around with self-hosting your own services is a really good way to learn GNU/Linux.  And here it appears you can do so with no further expenditure.

Neat site by the way!  A little creepy.  But neat!  Big Grin
My current setup looks like this:
  • 4G contract with unlimited data & public IP apn (30$)
  • Domain ( (about 1$ a month)
  • Home Server (8W/h not really visible on the powerbill)
  • VPS (5$ /m) ((free, im my own hosting provider, specs are equal to what I sell for 5$/m))
VPS is running mailinabox (email, dns, nextcloud, webmail, static websites)
all personal projects I want to share with others / expose to the public

My Home Server deals with Storage, backups, some scripts like a youtube-dl sync script that trancodes to audio and pushes the files to my phone automatically every night, by monitoring a youtube playlists for changes, local testing before pushing it on the VPS

All I needed to do to make the dynamic IP situation work was setup a DNS record in the mailinabox admin panel, and a script on the pinephone that posts its public IP through the simple REST API mailinabox provides  with a networkmanager hook, whenever the connection goes up, it updates the DNS record to point to the new IP.

With a setup like that you can do ANYTHING and its like 35$ a month. The CPU in the pp is really slow, so I try to offload anything I can to either the homeserver or the VPS, i think this is the best appraoch for slow hardware, distributed computing - but since all of those distributed services can also run locally, you can have failovers for alot of stuff running (slowly) directly on the pinephone.

Sorry for the wall of text, i just love my pinephone xD

Thank you Trbl,

It's great to finally hear some more positive news! :-D  I do have questions, but let me say at the outset, instead of bothering you, if you can recommend any tutorials, etc., I will try very hard to learn on my own. Also, I don't know if you saw my 3rd post, but here are some specific questions:

1. Regarding the page you referenced:  , are you saying that by me writing some code to create a "public IP Apn" that it will basically be giving the pp an IPv6 address?

2. Since you seem to be offloading as much as you can due to the pp's slow CPU, and my original intention was to host on a laptop connected to the pp via hotspot, I'm assuming that the laptop will also have an IPv6 address (same one as the pp?). But, how do you keep the WiFi from dropping off? Also, I don't know if I'll need this, but are you allowed to have multiple devices connected via the hotspot, or would you need to use a router?

3. About VPS and Home Server - would I need both of these, and if so, can I do them on my own, as you have?

Again, sorry if my questions are too basic. I'm anxious to learn though, if I can just get my hands on a pp. Big Grin


Sorry for the wait, I got a puppy and she's keeping me busy 24/7..

So here's how it works for me:

On the PinePhone I have 4G, with an APN that gives me a publicly reachable IPv4 address (how to do that on verizon seems to be described in the URL, maybe you can call them instead and ask for a public ipv4 apn? US of A is a bit backwards when it comes to internet service)
My homeserver is simply connected to my home internet, with a dynamic IP
My VPS runs the DNS server, for the domain. 

i can assign each machine a url (hostname), like and for the pinephone and homeserver respectively.

PinePhone and HomeServer both have a script running that runs when the internet connection has been established (homeserver waits for ethernet, pinephone waits for 4g) and then updates the url with its public ip.

Now points to the IPv4 it got from 4G and points to the IPv4 the homeserver got from ethernet (home internet connection)

so if I want to talk to the phone, i just connect to, and if i want to talk to the homeserver, i connect to I don't have to worry about my IP's changing everytime I connect to the internet, everything is always available with the hostnames

Quote:But, how do you keep the WiFi from dropping off? 

I don't. I don't have to. It doesn't matter if its wifi or 4g. The VPS keeps track of the hostnames and if the connection changes, and therefore the IP, the script just updates the IP.

Quote:I don't know if I'll need this, but are you allowed to have multiple devices connected via the hotspot, or would you need to use a router?

I don't do wifi hotspots myself, but you can connect more than one client to a hotspot.

Quote:3. About VPS and Home Server - would I need both of these, and if so, can I do them on my own, as you have?

If you want hostnames & email, you need a VPS with a static IPv4 and a domain. You can't host that at home without a business internet contract w/ static IP. - VPS is much cheaper than that, and once you have a VPS, you can simply assign a hostname to the homeserver and have both, or just stick with the vps.

Messages In This Thread
Hosting a website on a PinePhone, etc. - by a-l - 02-12-2021, 06:09 PM
RE: Hosting a website on a PinePhone, etc. - by Trbl - 03-06-2021, 03:25 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Are you using the Pinephone as your daily driver? jro 28 3,043 Yesterday, 04:31 PM
Last Post: OhneZ
  UPDATED (June 2021): 17-distro multi-boot image for Pinephone (incl. 3GiB variant) megous 145 92,510 Yesterday, 09:42 AM
Last Post: lordnahte2
  Buiding apps for pinephone katesfb 6 412 06-10-2021, 10:52 PM
Last Post: katesfb
  Pinephone 3/32GB , convergence, beta edition for sale -- Europe(Czech republice) pom3ranc 0 62 06-09-2021, 07:29 AM
Last Post: pom3ranc
  The Best Feature of the PinePhone is... Dog House Dave 8 307 06-08-2021, 06:22 PM
Last Post: ryo
Heart What native PinePhone application would you like to see in the near future? kern707 61 8,617 06-05-2021, 04:13 PM
Last Post: AwHereWeGoAgain
  List of Pinephone browsers Gamey 15 2,857 06-04-2021, 11:22 AM
Last Post: ryo
  PinePhone Game Thread PixelPaintbrush 15 6,721 06-02-2021, 05:07 AM
Last Post: biketool
  How should pinephone integrate with Desktop? gamerminstrel 9 693 06-01-2021, 09:24 AM
Last Post: TRS-80
  Does the Pinephone rely on components built with slave labor? MirceaKitsune 8 387 05-31-2021, 02:46 PM
Last Post: zetabeta

Forum Jump:

Users browsing this thread: 1 Guest(s)