From 0b09eab4f26d3fdb4f210156640be6e8dfcc238f Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Sat, 21 Jun 2025 10:14:31 +0200 Subject: initial commit --- this-server/a_web_server_on_a_solar_phone.md | 55 +++++++++++++++++++++++++++ this-server/index.html | 48 +++++++++++++++++++++++ this-server/meta.sh | 6 +++ this-server/server.jpeg | Bin 0 -> 64598 bytes 4 files changed, 109 insertions(+) create mode 100644 this-server/a_web_server_on_a_solar_phone.md create mode 100644 this-server/index.html create mode 100644 this-server/meta.sh create mode 100644 this-server/server.jpeg (limited to 'this-server') diff --git a/this-server/a_web_server_on_a_solar_phone.md b/this-server/a_web_server_on_a_solar_phone.md new file mode 100644 index 0000000..ad2757b --- /dev/null +++ b/this-server/a_web_server_on_a_solar_phone.md @@ -0,0 +1,55 @@ +# A web server on a solar phone + +I have this old low-cost phone which was the first one offered to my kid when +he was 15 (he is now 21), before he moved to a more fashionable model. I +noticed that without a SIM card, only on WIFI, the phone needed to be recharged +not after 1 or 2 days, but only after 2 weeks! So this small device, plugged to +a small solar panel, could be the perfect always-on personal web server. The +site that you are browsing right now is hosted on it. + +![The server with its solar panel, and a cat](server.jpeg) + +## Hardware + +The phone is an entry-level Motorola G7 Play, purchased in 2019 for 120€ or so, +worth nothing today. It was used by my son for less than 2 years, then dormant +since. The display is slighly shattered, but it doesn't matter, as I use it +headless. + +I bought a small solar panel on Amazon, 10W produced by 2 plates of 17x17 cm. +Cost: 28€. I could probably get something less expensive. + +And that's it. The solar panel is just suspended vertically at a south window. +The phone sits below, connected to the panel by a USB cable, in the shadow +(do not put the phone directly under the sun, or closed without fresh air). + +## Software + +The single purpose of this device is now to run a small standalone static web +server. By using termux on top of Android, I can run a ssh server for remote +access and Nginx, an efficient web server. I do not need to root the phone, as +port redirection from my internet router compensate for the restriction of not +using a port number below 1024. + +Nevertheless, I installed LineageOS on the phone, as it supports my model and +keeps the system updated. I could have kept the stock android image, at the +expanse of a less secure system. I could have gone further and install PostmarketOS +on it, to have a full unrestricted Linux machine, but I was both lazy and curious +to see what I could get from just Android. + +I then installed F-Droid, only to install Termux from it. Do not install Termux +from the Google Play Store, it is too limited. The version from F-Droid is fine. + +The phone connects to my internet box via WIFI and my internet service provider +allows me to have a static IP4 address at no additional cost. + +The last part is to configure the SSL certificate. I used Acme.sh, +downloaded directly from Github. + +## Operation + +It's too early to say. Lets see how it goes over time (a few months), and if a +relatively old phone can find a second life and be used as an autonomous web +server, running solely on free photons and electrons. + +But for now, we are in june and the battery level is almost always at 100%. diff --git a/this-server/index.html b/this-server/index.html new file mode 100644 index 0000000..019b7db --- /dev/null +++ b/this-server/index.html @@ -0,0 +1,48 @@ + + + +A web server on a solar phone + + + + + +Marc's Notes
+

A web server on a solar phone

+

I have this old low-cost phone which was the first one offered to my kid when he was 15 (he is now 21), before he moved to a more fashionable model. I noticed that without a SIM card, only on WIFI, the phone needed to be recharged not after 1 or 2 days, but only after 2 weeks! So this small device, plugged to a small solar panel, could be the perfect always-on personal web server. The site that you are browsing right now is hosted on it.

+

The server with its solar panel, and a cat

+

Hardware

+

The phone is an entry-level Motorola G7 Play, purchased in 2019 for 120€ or so, worth nothing today. It was used by my son for less than 2 years, then dormant since. The display is slighly shattered, but it doesn't matter, as I use it headless.

+

I bought a small solar panel on Amazon, 10W produced by 2 plates of 17x17 cm. Cost: 28€. I could probably get something less expensive.

+

And that's it. The solar panel is just suspended vertically at a south window. The phone sits below, connected to the panel by a USB cable, in the shadow (do not put the phone directly under the sun, or closed without fresh air).

+

Software

+

The single purpose of this device is now to run a small standalone static web server. By using termux on top of Android, I can run a ssh server for remote access and Nginx, an efficient web server. I do not need to root the phone, as port redirection from my internet router compensate for the restriction of not using a port number below 1024.

+

Nevertheless, I installed LineageOS on the phone, as it supports my model and keeps the system updated. I could have kept the stock android image, at the expanse of a less secure system. I could have gone further and install PostmarketOS on it, to have a full unrestricted Linux machine, but I was both lazy and curious to see what I could get from just Android.

+

I then installed F-Droid, only to install Termux from it. Do not install Termux from the Google Play Store, it is too limited. The version from F-Droid is fine.

+

The phone connects to my internet box via WIFI and my internet service provider allows me to have a static IP4 address at no additional cost.

+

The last part is to configure the SSL certificate. I used Acme.sh, downloaded directly from Github.

+

Operation

+

It's too early to say. Lets see how it goes over time (a few months), and if a relatively old phone can find a second life and be used as an autonomous web server, running solely on free photons and electrons.

+

But for now, we are in june and the battery level is almost always at 100%.

+
From: Marc Vertes, 20 june 2025 diff --git a/this-server/meta.sh b/this-server/meta.sh new file mode 100644 index 0000000..60682cc --- /dev/null +++ b/this-server/meta.sh @@ -0,0 +1,6 @@ +blog_title="Marc's Notes" +title="A web server on a solar phone" +author="Marc Vertes" +description="Hosting a web server on a solar powered phone" +date="20 june 2025" +date_rfc2822="Fri, 20 June 2025 12:00:00 +0200" diff --git a/this-server/server.jpeg b/this-server/server.jpeg new file mode 100644 index 0000000..e1a1427 Binary files /dev/null and b/this-server/server.jpeg differ -- cgit v1.2.3