Is there a good solution for an entirely off-grid server?
Is it possible to use a smartphone hotspot/USB tethering for internet connection?
I have some solar panels & batteries and an old laptop (or I might get a raspberry pi) and am curious about whether I could selfhost literally in the middle of nowhere, without a residential internet connection?
If you’re only looking to access the services locally, absolutely.
TL:DR, yes you can. But its not nearly as reliable as wired internet and is dependant on where you are.
I’m currently living in a place where only DSL is available for wired internet and its 1.5 mbps down at maximum so this is essentially my situation. I dont self host anything currently as I’m kind of in between projects but I could in theory self host something and access it remotely.
What I’m currently using for internet is a load balanced connection between starlink and lte. I’d recommend just using lte if possible. Starlink is good but it can be very spotty.
I’m surrounded by trees and the towers near me are old and go down more often that I would like or get bogged down so I need starlink but due to the trees it goes down frequently. Every minute or so. Sometimes I get 5 minutes of internet through it and thats fun.
I recommend getting a dedicated cellular router like the GL.iNet Mudi (but you’re gonna need a USB Hub if you want to use Ethernet), Spitz (4G) or Puli (5G). The latter two have integrated Ethernet ports. Both are also available with built-in batteries.
I have a Spitz, just don’t plan to run a VPN on the device itself as the CPU is very slow and will limit max thruput.
The Spitz AX has a more powerful MediaTek dual core CPU running @ 1.3GHz. It also supports 5G, and has 2.5 Gbps Ethernet. As far as I can see, the Puli uses the same CPU, but it also includes a battery.
I should probably give in and get the Puli, I dislike non-replaceable batteries but I’m sure if it dies before I upgrade to 5G and give the device away I could figure out how to replace it.
The Spitz AX looks awesome for e.g. an RV base station etc, but too many antennas for travel use. I used old Spitz on Amtrak with some success. I wish they had a similar 5G unit with 2x external 5G antennas, and internal antennas only for wifi.
Maybe I will get my wish someday, GLi do like producing a variety of devices on a theme…
Some people do it. For example we have this solar-powered website: https://solar.lowtechmagazine.com/
You’d need an energy source like a solar panel, a battery and some computing device. Like a single board computer (Raspberry Pi) you can also run webservers on smartphones, or even a microcontroller. The server part works without an internet connection. But you obviously need some way to connect to it. A wifi (router) or a computer connected via an ethernet cable.
The tech isn’t too complicated. Just install nginx if you have a raspberry pi, open a wifi and put your website on it. If you choose a phone, try Termux and a supported webserver. Both Linux and smartphones are designed to even work without an internet connection ;-)
Of course, you just need to make sure your power supply, however it is set up, needs to provide constant power over long term that the system needs at minimum. That means for ex. if you use solar, you need to have a big enough battery and array so that it can charge batteries throughout the day even when it’s cloudy so the system can be up overnight when there is no power generation happening. If you have for ex. a raspberry pi and a smartphone as a hotspot, you can probably have enough energy with an average UPS and one solar panel to make sure it will never go fully empty overnight, regardless how cloudy the day was.
I have a trailer (workshop) with solar power, batteries, a raspberry pi controlling everything and a cellular hot spot. It pumps all the solar, battery information and light controls over MQTT and home assistant over cellular. So yes its possible, what do you want to do?
Awesome, that’s very close to what I had in mind in terms of hardware.
I’d mostly like to host a lightweight website but perhaps also some communications stuff like xmpp and maybe even email.
Without cable, you’re bound to have quite some downtime. If you want it to be more reliable, maybe locating closer to cell towers/doubling with satellite might help.
For public services you will need some kind of tunnel, as cellular networks or Starlink will not provide you with a public IP. Otherwise no big issue with an ARM SBC and a somewhat decent battery.
How does that work? Thanks :)
Basically a VPN where the endpoint is a VPS or a specialized service that offers a public IP.
OK, does that mean it’s not possible to have a public IP using a cellular device?
Technically it is possible, and I have heard rumors about some eastern European providers given unique public IPs on request, but practically no, not possible/available.
Besides what the other commenter mentioned, there’s also existing services you can use instead of doing it all yourself and having to keep track of another VPS/Server
https://www.noip.com/remote-access
Especially if all you want to do is access your own server from outside your local off-grid network, then the free tier of the above service is probably perfect. Paid tiers give you a bit more features and can use your own TLD; Oracle also offers something similar that is paid.
At that point just get a GSM router
As it happens, I’ve just finished setting up a system exactly like this for a completely off-grid setup. I needed a Raspberry Pi running Home Assistant to be completely self-contained to monitor an adjacent, larger system that is only powered up intermittently (close enough that the two systems have a common ground).
Short version: the Raspberry Pi and the Huawei LTE router I’m using for connectivity draw a steady 9W between them (there’s a lot of monitoring going on). I went with an old pair of 80W panels in very suboptimal positioning, a simple MPPT charge controller and a 110Ah deep cycle leisure battery which costs about €45, €30 and €120 respectively. The system has been running a few months now and the battery had never, ever dropped below 12.4V. The Pi uses WireGuard to connect to my VPS so Home Assistant can be accessed with a web browser since the network I’m using on-site doesn’t do public IP addresses.
Note: I have not done any research on the topic, but I’m just theorizing based on what I already know, as it’s an interesting mental excersice.
Obviously the biggest problems will be uplink and power. Solar and a battery bank is the obvious choice, but other methods of powers can also work, such as a small generator in a river, etc.
Lead acid batteries are relatively cheap, and building a 12V bank out of car batteries makes sense as there is plenty of off the shelf hardware available to invert or transform 12V into whatever you need. Charging it from solar will be inefficient, but it will work, and there is also plenty of hardware for this (tip: boat-related shops can help you out here)
As for hosting hardware we’re of course dealing with the constraints of load vs power consumption. If you can go for something like a raspberry pi zero, you can run for days off of a single car battery with those cheap 5v cigarette-pkug chargers. If you need something more powerful, you need to scale up power accordingly.
As for uplink, the question is “How much” off grid we’re talking. I will assume that there’s at least GPRS coverage that you can connect to with a 4G modem, even if you don’t get 4G speeds. Plenty of off-the-shelf hardware available here. If not applicable, just substitute with whatever is available, be it CDMA, packet radio, starlink (eww), or anything else.
in the USA, LiFePO4 battery cost of drop-in 12V replacements has fallen to the point where lead-acid may no longer make sense for projects like this.
I’m using USB Router ZTE MF79U + Raspberry pi zero 2W to self host some basic stuff, really efficient setup for off grid systems
This is entirely doable, but you may need to do some manual network configuration.