Recipes For An Off-Grid 'Internet'
How to make an off-grid micro 'internet' that can run off solar power (or any power) for emergencies, camping, protests, or building community autonomy and dual power.
This is less so an exhaustive technical guide for making a DIY micro internet, and more so a group of recipes with ingredients that combine together to create whatever you need to create. Understand this to be a system of different parts that you can add or subtract from, and less so a “here is exactly how to do this” instruction manual. I do include instructions and some tips if you want to copy parts of my current build. Though after this you should have the tools or a starting place to make your own network to suit your unique needs. This is all modular and can scale up or down depending on how much you can spend, what you have on hand, and what you can get access to. Modularity, interoperability, and repurposing things is key to creating a better future.
How this article is laid out
I’ve broken this down into sections, here is a rundown so you can jump to the info you want.
TLDR section - Summary of what we are doing here and how the systems work.
Book Repo information - How to download the entire library I put together.
Goals & Constraints - What we are trying to do, and what issues we may run into.
Technical Stack - The software that runs things.
Building The Foundation - The core concepts to understand so you can make your own modular intranet network.
Showing examples of the solar servers in action.
Adding nodes to make the network bigger.
Antennas and pirate nodes.
Full technical step-by-step guide on building this on a Raspberry Pi.
Speculative ideas of this in action and the uses.
More ideas on how to use the servers.
This article will be a guide on how to make a DIY local internet that can run off solar, or any power you can find. This network can include nodes to make a bigger mesh network. Neighbors can chat together on a server, useful in natural disasters or times where physically talking is hard. People can access a library of thousands of ebooks that include educational textbooks for impromptu schooling, technical guides on growing food, raising animals. Construction and building infrastructure. Info on everything from passive solar water filters to making windmill generators, to growing, processing and preserving organic food, making tools, sewage management and treatment, road building. All in one server to read or download on any device that can access the network. Also including a media server that can stream movies, music, saved youtube videos, and instructionals.
When people connect to the network, they can be redirected to a website that requires no experience in web design to build. The site can act as a landing page or navigation to your servers along with offering information. All without having to code.
Neighbors can use their existing routers with some added power, to bring more nodes onto the network, giving more people access to the books, music, videos, and communication networks.
This is like mycelium and mushrooms, a network of nodes that spread out and send information to the network.
This system is modular, with the ability to add whatever you want to it, and also works with almost any router and computer.
TLDR For Nerds
This network is basically just a mesh LAN connected together through routers either in repeater mode or using WDS to bridge routers together and create a mesh of sorts. Anyone can join and include their own servers and clients can read the data without the need for proprietary clients, all of it will run natively in a browser. The routers used are cheap travel routers that run off USB, but with inverters, larger routers that run off AC power can be used for better range. The routers used run openWRT. For those with radio licenses, you can connect these LAN networks and send data over RF to send the signal over longer ranges. You can combine this with LoRa for messaging or even weird shit like using RF to pull satellite images or weather information. The mesh is created by either using your own routers, powered by solar or any means of power, or by getting neighbors to power their routers and combine them into the network as nodes to further the range. This is platform agnostic and modular to scale up depending on what you have and can do. Everything runs on software that is FOSS, or is free and easy to install.
I’ve been compiling a giant library of books, textbooks, pamphlets and technical guides for a previous project called “Building a solarpunk future”. Most of the book comps you see have mostly a tinge of like disaster prepper shit, not the real stuff like canning and taking care of water contamination, but like how to survive in the woods with only a knife and preparing for EMP weapon attacks. I wanted this to be a little more realistic and focus on things that people actually need. Not just in emergencies, or not for when shit falls apart, but to build a better world. Tools and easy-to-access information that can be saved and dispursed quickly across a wide range of topics that are important to building dual power, or building new communities from scratch.
I can’t go into full detail here about every single thing but it’s massive. Most of the large parts are broken up into food, water, sanitation, construction, and tools. For food there are general permaculture guides, technical guides for food preparation and canning, technical guides for growing specific crops with easy-to-access information, organic pest control and finding plant diseases, raising animals, processing and harvesting food. For the water sections we have books on water collection, both with barrels and natural collection, water pumping, making wells and how to move water. Things about water treatment, water filtration, making low tech water filters all the way up to making city wide water treatment facilities. After that stuff about sewage, blackwater and greywater reuse. The education folder has a bunch of open textbooks to keep people learning. Infrastructure and Construction includes everything from concrete work, to biogas chambers, building earth domes and super adobe, electical, plumbing, HVAC, building roads and repairing roads, solar, repair guides on things, making wind turbines. The medical folder has info on keeping people well, and includes field medicine guides along with stuff like emergency childbirth, mental health and general surgery for small wounds. Under Tools and Manufacturing, there are guides to making bicycle ambulances, clay tile manufacturing, candle making, textile production, soap making. There is a ton of stuff in this.
This is version one, it takes a long time to compile this info and put it into categories. I want to expand the education category and add more books into various areas. But this should be a good starting place to build on or add to your existing ebook collections. Link is down below.
Goals & Constraints
There are specific criteria that are important to making a system that is easy to make, install, and maintain by regular people. Not every community will have someone extremely technical that can install telecom level communication networks. Not every community will have access to the best equipment or hardware. So there are constraints about making these systems:
Needs to be accessible to both technical and non-technical people.
Easy to make with off-the-shelf parts, easy to source hardware, or existing infrastructure.
Chat functions need to have local registration without internet.
Services can’t require client software that needs to be downloaded in order to work. Services must be standalone and accessible through a browser. (You can’t download apps off the Apple app store without internet)
Low power consumption / can be powered easily.
With the constraints, there are specific things that are helpful in emergencies, or in cases where a local internet would make sense like in hostile political areas where internet connections are terminated by police, military, or state powers.
A chat server to communicate with other people.
A book repository with information not just on survival, but how to thrive, build and rebuild.
Media servers to have movies and music. Not just educational stuff but also entertainment.
Adding to that list would be maps, Wikipedia and other wikis, access to news and other information streams, weather information, and a lot more. But this article will mainly cover the three categories listed above.
Working within those constraints and requirements is kinda hard. At first, I used the freedombox as a platform but I found it hard to use and maintain. There wasn’t anything that had things perfectly together but there are projects, software and tools out there that work well together. So I landed on using these services because they met some of the requirements of being easy to install/maintain and can be set up and administered by someone with very basic tech skills.
RocketChat (for the chat server)
Calibre (for hosting ebook libraries)
Emby (for the media server)
Hugo (hosting a simple, yet polished landing page for a captive portal)
GLinet travel router (hosts the network and is powered by USB)
Before you dogpile me on twitter or in the comments of this post, there are specific reasons why I chose these for the tech stack over other things. I could have used Matrix and hosted the chat server and included all the bells and whistles like end-to-end encryption and federation. That’s great but this is for people to use in emergencies and cases where normal internet access is cut off. If you need to have a client downloaded before that all happens, how do you get your neighbor down the street to install the Element client when you don’t have access to the broader internet? (Yes you can host the APK for Androids but iPhones can’t install apps offline without doing some annoying shit, also do you want to be installing packages for like 30 different people?)
It’s way easier to tell them to connect to a network and go to a site. No need for a client or having to register online to get an account before an emergency happens. Again, this is a starting place. If you have the technical skills to use other platforms, do it! This is all modular, this is all customizable so you can tailor things to how you want it. I would love to see what you create! This is just a recommendation.
(You can skip this if you want, but there are reasons why I wanted to create this)
Being Black and living in Texas I have become accustomed to seeing the ways that regressive, hierarchical, individualistic, racist, and capitalist systems fail firsthand. Texas is the only state in the US to have its own separate power grid that isn’t tied to the national interconnected grid. (Technically there isn’t a giant grid that is completely connected across the US but separate regions basically that can share power but whatever, you get the point.)
The power grid is maintained by a private company in an effort to deregulate power in Texas. With privatization and the grid being held in private corporate hands, that means regulation, winterization, maintenance, and upgrades come second to maximizing profits. The corporate “freedom” that comes with deregulation means that while the grid maintainers and operators gain massive profits, they forgo actually taking care of shit.
February 13-17 2021, winter storm Uri rocked Texas. Due to the changing climate, Texas saw one of the worst winter storms in recent history. We saw extreme cold for close to a week, keep in mind that because businesses want to maximize profits, homes, businesses, and infrastructure are not built to handle cold weather by construction companies. That would “cost too much” to adapt to our changing climate. Homes here lack any kind of heavy winter insulation.
The power grid was not prepared for extreme winter weather events. Why? Because the private corporations said winterization would cut into profits. There is a lot that went into the grid almost totally collapsing, but basically, electrical lines were getting damaged, power production plants were going offline because natural gas lines were freezing. A huge driver for the rolling blackouts was that the cost to operate the grid was getting too expensive, and so ERCOT, the board that regulates the Texas power grid decided to do rolling blackouts.
Around 700 people died as a result of the blackouts caused by corporate greed and climate change. (This number ranges, it’s said to be up to around a thousand people) Thousands lost their homes because of frozen pipes and destroyed infrastructure. The national guard and the state did nothing for the first three days, and the only people who were out providing hot meals, clean drinking water, and essentials were mutual aid groups.
This was a giant wake up call of the fragility of the Texas powergrid, we were minutes away from being in the dark for months. After this storm, seeing how many people died and lost their homes, opened my eyes to the pressing fact that we need to build resiliency NOW. We need autonomy from state oppression and neglect and to build local autonomy and power NOW. And so with that came ideas of fostering dual power, of making our own systems in the shell of the one currently falling apart.
With that came projects about water, food, and now electricity, communications and what I would consider to be a public utility, internet.
My goal is to help bridge the gap from speculative fiction, of imagining a better future, of prefiguration, and to bring those ideas into action in any way I can. But I’m not alone in this. Everything I do is for free, and released for other people to enjoy, work on, be inspired by, build and collaborate. The only way out of this is together. We start by building the infrastructure to make a better future. A more egalitarian one, without hierarchy, where we can intertwine our social change with political change. Intertwine technology and ecology, not for destruction, but for regeneration. A better future won’t come from destroying old systems alone. It will come by building social change, building autonomy and true freedom, building equality, building our connection with the earth and the ways we can stop destroying nature and instead living with it. We can change. And it starts with building.
Getting Started: Building the Foundation
Look at this article as a general framework of building an off-grid network. There are core concepts that once you understand, you can substitute out the details and make whatever you want. I put ‘internet’ in quotes in the title of this article because what we are making basically is a smaller-scale version of the ‘internet’. As a whole, computer networks have like three pieces. (Network engineers are seething rn but whatever)
Say you want to see a video on youtube. Your computer (the client) will make a request to go to youtube.com. The router takes that information and consults something that says the address of youtube.com and packages your request with your IP address. Think of routers as air traffic control, they determine who is on a network and where other computers are located. Your request basically gets sent through a giant game of telephone to a google network that your request was addressed to and is forwarded to the server. The server hosts different services, in this example it hosts media. That media then goes back through the giant game of telephone to come back to you.
Routers handle the network, servers serve out data, and clients receive the data.
The internet is basically like a giant game of telephone, or more like a giant mail system. With packets of requests that have senders and receivers being circulated by routers and other networking equipment to move information around.
Internet service providers are who connect your home to the larger network aka the internet. Think AT&T, Verizon, Spectrum, Hughesnet, Starlink, ya know, the corporate fuckers you have to pay every month to have access to a now basic utility. They control the giant networks that help your request get received by your targeted network. All of these steps, from leaving your house, to going to the ISP, to the giant networks that run the backbone of the internet, to the place that you want to access the information - all rely on infrastructure. All of this is powered by grid power, power plants, service lines, cable lines, fiber optic lines, satellites, datacenters, all of it interconnected to facilitate sharing data. The same idea applies to how phones work, there are giant networks that connect your phone to be able to make calls and access the internet.
But when natural disasters happen, or when governments take control of ISP’s and just shut off access to the internet, poof. It all goes away.
What we are doing here with the DIY off-grid internet, is becoming our own internet service provider by chaining and connecting the things necessary to make a network, then using servers to host information - that clients will connect to and get whatever info is served!
You can see above that we have a server connected to a router which is giving a wifi signal to your neighbors to connect to. Awesome! But the range will be limited by one router. Our goal is to create a network of other routers to act as beacons, making the wifi network larger, and allowing more people to connect to the network and thus to the server.
So now we are scaling up, connecting more routers as nodes to propagate and spread the network. A neighbor down the block agrees to use their router powered with a backup generator to act as a node. Another friend farther away has a big antenna and a solar battery bank and powers their router on and connects to the network.
So with three routers all connected together you are now giving access to the information on your server to a shit ton of people. This can keep growing to a city wide network, a state-wide network, a regional network, or a national network all owned and operated collectively by the people. This is a cool idea but let’s keep it realistic and local for now! There are projects out there like NYCMesh that are doing basically this exact thing at a way more professional level. They use professional networking gear to make professional networks. What we’re doing here is making a DIY network out of cheap goods, existing routers, and what we got laying around. Different circumstances call for different approaches!
Ingredients to an off-grid server network
Off-grid just means not connected to the power grid. So not connected to the power coming out of your walls. Off-grid systems work independently, so if the power goes out, they can still work because you are generating and storing your own power. There are a few ingredients or things that you need to get things going.
Power storage (Optional / Depends)
Let’s start with an extremely simple example. I’m using a Rasberry Pi single board computer that is powered by USB. On it, I have Ubuntu as an operating system, and the tech stack I mentioned above, Rocketchat for the chat server - Calibre for the ebooks - and Plex for the Media server. For the router, I am using a Glinet AR150 travel router that is powered by USB. For power generation, I am using a cheap 9 watt folding solar panel from harbor freight they go on sale often for like $30.
The router and server are connected by USB to the solar panel, which is powering both. But if the sun goes down, so does the network, because in this example I am missing the power storage component.
If I add a portable battery bank to the mix, then I can power the router and server with the battery bank and recharge it off solar! What if the solar charging and the battery were combined?
We don’t have to just use portable battery banks, we can use anything that can produce power for USB devices. I have a ton of Ryobi tools because they all use the same battery. So during natural disasters, I can use a cordless chainsaw to cut fallen branches, but also use an inverter attachment to use the tool battery as a battery bank.
So you can start to see that we have wiggle room in how we setup the network, how we power it, and how generation works. You don’t have to use a Rasberry pi as the server, you can use an arduino, or a NUC, or an old laptop. You don’t have to use a battery bank to power the network, you can direct power it off solar and just have a daytime network. Or use your car, or a laptop to power the network via USB. Hell, you can hook up a bike to a generator and use pedal power. You don’t have to use the travel router, you can use the router you already have in your house, or an even bigger one with higher transmit capabilities. All of these parts can be switched out. The key to remember here is to have the core components in the system:
Power storage (Optional / Depends)
Powering larger items
If you opt to use a laptop, external tool batteries, or to run a regular sized router, you will need access to Alternating Current (AC) power. The power that comes from the wall is AC power, solar power and the power that comes from battery banks directly are Direct Current (DC) power. So you need either a generator (they always have built-in inverters) or if you have a solar system or DC batteries, you need an inverter. I have a full article here, that goes over how to build your own DIY off-grid solar system, all the details behind what you need, batteries, all that good stuff.
You can replicate the same idea in the article but on a small to medium scale. Below is what you need to generate solar power:
All the details are in that article on how to connect them but the goal is to have a place to generate electricity as long as the sun shines. You might not always have access to gasoline, plus gas generators kinda suck and are terrible for the environment. You can also buy pre-made kits, again, more info in that article. The important part of that is the inverter.
An inverter turns DC power, into AC power, allowing you to charge and power all the normal stuff you own. Inverters come in all shapes and sizes and you can hook up a huge inverter that can power a freezer, or a small one with just one plug. Either way that will depend on what you need. If you want to use a laptop as a server and a regular router, then you will need an inverter that can supply enough power to charge and power those things. This will add extra cost to building the main server setup or supply energy to nodes that propagate the network so there is a balance in sticking with low power USB devices with low range, and high power devices that need more infrastructure to charge, but have much better range.
Biomimicry: DIY solar-powered mycelium like network using nodes to spread the network
At the moment we have a small network of nearby neighbors who are connecting to the off-grid server network and enjoying the services.
But the goal isn’t to just give our immediate neighbors access to the network, it has to grow. We can take notes from mycelium, the network of fungal threads that grows in decay. Mycelium spreads by using mushrooms or nodes that come up, spread their spores and more mycelium grows. Our network is like mycelium, it comes from the decay of old systems and interconnects to share resources just like mycelium connects plants together to help them message for resources. The nodes come up and help spread the network out, sharing more information with the rest of the beings around them.
So how do we grow our network? By making nodes, or beacons that can connect to our router and basically act as a copy. This allows other clients who may be farther away to have access to the same network and the same services. The nodes will give off their own WiFi signal and they help the network reach more people than just one router.
How to make nodes/beacons
Most modern routers have the ability to use WDS to basically copy another router wirelessly. Different routers call it different things, some routers if you go into the admin console and change the mode - call it repeater mode. Others have a specific mode you can set the router to called WDS. Either way if the router is capable of doing it, there should be an option in the admin panel of the router to change the function to act either as a repeater or to use WDS to connect to another router.
When you turn WDS or repeating on, you will select your main router network as the source, then the new node router will reboot and basically clone our main router. With the new nodes online, more clients can join in and have access to the server or even start running their own servers on the network. Again you can use a generator or make basically mobile power stations to distribute through the area that charge off solar and have inverters to power AC items. I will go into more detail in the section about the network in action when it comes to communities. But as an example:
The most important thing here is getting power to the beacons. We are under the assumtion here that regular internet access is gone. You might still have power, which in that case whatever. But if your area loses power then you have to figure out how to get things powered. For DC things, battery banks and small electronics can power the new nodes, and the batteries recharged by someone with off grid solar or a generator. For AC things you need a battery and an inverter or a generator to run things.
WiFi range depends on a lot, the transmit strength of the router, the location, obstacle densities, the client’s network card, the list goes on. There is a lot that goes into it and it’s hard to say real range values because every person's circumstances are different. But in general, the more power your router draws, the more transmit capabilities it has. The bigger your antenna, the better coverage you can get.
In this example, I am using travel routers to show the absolute bare minimum coverage you can get from a router that runs off USB and with small antennas.
So with the default antennas you can get about 60 feet from node to node before the signal starts dropping. Adding a 3 inch antenna to the beacon allowed for them to be spaced 100 feet apart. Both the router and the beacon with antennas scrapped from another router I found in the trash can get like 150 feet of range. And just setting the router in front of an old satellite dish, literally just sitting in front of the metal parabola boosted the range to 170 feet.
So about half a city block from node to node can propagate the network. But these are just for node to node. Let’s assume we left the default antennas on and connected a node to a router.
So we actually have 120 feet of coverage, the router and the node just have to be within range of each other, so the node then spreads the signal another 60 feet. Ok wow 120 feet isn’t a crazy distance. But keep in mind that with a router that is 1 inch x 1 inch big that runs off USB power, you can now connect people to the network in an almost four home diameter. Now imagine if you used a real router, even just a basic one, the amount of signal coverage you could get?!
A regular off the shelf router has way more transmit power than this tiny little router, even with the default antennas I can pick up the signal from an incredible distance with no modifications. There also are bigger routers with two antennas for basically the same cost as the one I’m using ($35) that still run on USB power but has almost double the transmit capabilities.
The biggest thing I want to show is even with the absolute tiniest hardware, you can make a network.
Antennas and DIY weirdness
I won’t get too into this but you can make antennas that boost the signal of routers out of some pretty basic stuff like chicken wire. This chicken wire parabola beams wifi signals almost three miles! All it’s made out of is wood and chicken wire stapled to it.
You can also make pretty simple antennas with brass disks and a default antenna, this one got a couple miles of range too out of basic materials.
Pirate beacons: Every office building and tower as a node
If you look at buildings, office buildings, really any commercial building you might see antennas on their roofs.
Some of these might be cellular, but many times they can be used to blast WiFi signals from building to building. In an emergency situation you can plug these antennas into your network (power the antennas and then attach them to a node) you can increase your range to an insane degree. The legality of this is…more than likely illegal if you did it. But it’s something to keep in mind. Alternatively, you could just pay to install your own antenna on the building. No clue how much that would cost but that would be the best way without catching a felony. Either way, just saying pirate antennas sounds cool.
In terms of maximizing your range, elevation helps. Minimizing your obstructions also helps as well. The less stuff between your connections, the better off you will be. If you can’t get a good signal and are using a battery bank, and have no other options for elevation - just say fuck it and duct tape the bank, server and router together, tie it to a rope and on the other end tie a rock to it, then toss the rock around a tree branch and hoist the setup in the air. You might think I’m kidding but I’m serious, it will help the signal clear any ground obstacles. Obviously you dont need line of sight all the time, but it helps in a pinch if say you live in a brick house where the signal can’t get through.
Building on the foundation / Technical summary & steps
Summarizing the foundation we talked about the basic ingredients and necessary parts to understand the system, and from there tailor it to what you have or what you can get. Again, this is all open-ended and modular for you to build off of based on your circumstances. So we have our foundation:
Power storage (Optional / Depends)
Now let’s walk through how to put it all together and the steps it takes to get things working. This will act as an overview of what to do. More details are included in the full build. Even if you aren’t using the same hardware, the steps will be the same, and some of the tips will still apply.
Steps to get this running:
Skip whatever you don’t want installed. I recommend having a landing page/blog using Hugo so it makes it easier for users to interact with the server / quickly understand what the hell is going on.
Figure out how the system will be powered, and what hardware will be used.
Get your router powered on and up and running, connect it to a network with internet access.
Connect your Ubuntu device to the router with internet via Wifi.
Download books, create libraries, and organize them on the server.
Configure the Calibre content server to auto start at boot. (Scroll to the bottom)
Configure the paths to your libraries if you created multiple in the Calibre service configuration file.
Install your media server.
Set media server service to start at boot.
In the router: add static IP/IP reserve for the server, set the reserve to the MAC address of the wireless card of the server.
Create guest wifi (if needed sometimes routers force you to use a captive portal) and set a captive portal to redirect to the now static IP of your server.
Modify Hugo config to bind to the now static IP address.
Modify Hugo post to include links to your other servers.
Test with a client to see if everything routes correctly.
Find power source for node.
Power on the node and wait to fully boot.
Login to the admin portal on the node. You may have to change the SSID or the network name to something like “Emergency Server Node”.
Find where you can change the router function to either WDS mode or repeater mode, or cloning mode. Each router manufacturer is different.
Make WDS or repeater mode point to the main router for the emergency network.
Router will reboot, test the connection and see if you can reach the server services at the static IP of the server.
Repeat for more nodes, find power, change the SSID, set to WDS or repeating mode, connect back to either a beacon or the main router if in range, test.
In general, that is what you need to do to get this running. Remember that this is modular, so you can install Ubuntu on a laptop and your router can be a huge one that runs off AC power. Whatever you choose, at least you know a path to walk on.
Full step-by-step build guide with Ubuntu + Raspberry Pi
Installing Ubuntu on a Raspberry Pi
I am using Ubuntu to set all of this up, though alot of these commands will work for OSX. For windows, just download etcher and run the executable.
You can follow the official guide but I always have problems with using the rpi-imager that is mentioned in the docs. If you have to clear any data on an old SD card, the verification will fail and be all weird so your best bet is to use etcher.
First, download the package for Ubuntu, they have specific ones for the Raspberry Pi. Ubuntu Desktop is fine, and kinda preferable.
Next download etcher.
Unzip etcher and run the etcher appimage.
sudo chmod + x balenaEtcher-1.7.9-x64.AppImage ./balenaEtcher-1.7.9-x64.AppImage
Wait a while for that to flash, then when etcher says its ready put your SD card into your pi and boot it. Follow the prompts, it’s really self explanatory. If you want during setup you can choose to auto login to the account. We aren’t going for security here but an easy-to-use plug-and-play server. If you don’t choose that you can always change it later.
Once you get logged in launch a terminal and update your stuff.
sudo apt-get update sudo apt-get upgrade -y
That should get you updated with the latest packages and junk.
If you get an error about ‘waiting for the unattended-upgr’ or something, just wait, there are updates already being installed in the background.
Install RocketChat via snap
sudo snap install rocketchat-server
You can find the list of services by changing directories to /etc/systemd/system. These services are auto configured by snap so don’t create your own.
Check if the server is properly running.
sudo systemctl status snap.rocketchat-server.rocketchat-server.service
Set the service to auto boot when your server turns on.
sudo systemctl enable snap.rocketchat-server.rocketchat-server.service
Navigate to http://localhost:3000 and register for an account. Registration works offline too, this is a local install. Make new rooms and whatever.
The Calibre client also includes the server but we will have to make a custom service in order to have the content server autostart on boot and serve up our libraries.
Run this to download and install Calibre.
sudo -v && wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sudo sh /dev/stdin
Then just type calibre to start it.
Go through the wizard and select where your default library will go. We can add new ones so it’s ok to put it wherever, but the default works. On the next screen for devices choose smartphone. Then finish.
Libraries and organizing large amounts of books
I made a giant zip of books if you want to import them, or pick and choose what domains you want. Look at the top of the article for all the info in what’s in there.
Calibre has a hard time organizing books when it comes to the content server. You can’t easily set them into categories or just import them into folders. What you can do is make separate libraries for each “category”, just copy your general folder structure as separate libraries.
You can see that inside the “Food” folder of the books, there are other categories, if you just added them into a new library called food, you would have a shit ton of books that are from different parts of the food category. To make it easier for end users to find specific books you can make separate libraries for each. For example ‘Food - Animals & Farming’ ‘Food - Food Production’ excetera. That way when a user visits your book server it looks organized like this:
You can break out the domains if you want and add tags so if you are in “Infrastructure & Construction” and want to find info on super adobe, you can search that and adding tags to books that include super adobe info will help narrow things down. So for each folder or category or type of book you have, break them into separate libraries.
Click the carrot next to Calibre Library and select Switch/create library
Choose to make a new library and select your directory of where it will be. Name it the category you want. It’s easier to place all of your libraries together in a central folder to make it easier, but you do you.
Then add your books for that category, click Add books then from folders and sub folders.
Press no when Multi file books comes up.
Keep doing this for each folder or category that you want separated out. I say this for my own library and the book repo I’ve included, but again, do whatever you want. Your library might only have a few categories or groups so this might not be needed, it’s way easier to just drop them into one folder and call it a day.
Setting up the Calibre Content Server to auto start at boot.
Calibre has a content server that you can start manually in the GUI by pressing the “Connect/Share” button, but we want the server to start automatically and start serving our library without having to interact with it.
sudo nano /etc/systemd/system/calibre-server.service
A text editor will open, copy and paste this in.
[Unit] Description=calibre Content server After=network.target [Service] Type=simple User=mylinuxuser Group=mylinuxgroup ExecStart=/usr/bin/calibre-server "/home/USER/Documents/Library/Food" "/home/USER/Documents/Library/Food - Technical Guides" [Install] WantedBy=multi-user.target
Change the user from “mylinuxuser” to whatever your username is when you set up your server. The group should be the same thing.
Your execstart should be the same unless you installed Calibre in /opt, change it if you did a custom install.
Manually add the path to each library separated by a space and quotes. This will allow Calibre to read that it’s a separate library and include it in your server. Do that for each one. If you dont know the path, change directories to your library folder (typically /home/youruser/) and then type “pwd” and that will print the working directory.
Press control + x to exit nano and press y to save your new file.
When you make changes to configuration files, you need to run a daemon reload to tell the machine to reload your configs.
sudo systemctl daemon-reload
sudo systemctl start calibre-server
You might have to stop the calibre server service if it throws an error. Just replace start up there with stop. Then re-run the start command.
sudo systemctl status calibre-server
Will show the server is running.
sudo systemctl enable calibre-server
Makes the service start at boot.
Making a landing webpage with Hugo
I hate web development and don’t have the time to fuck around and make something look nice. You might not have any experience with web development either, but Hugo makes it super easy to have a kinda polished looking webpage without dealing with some of the headaches of making web servers. Keep in mind that this is wildly insecure, but this is just a landing page for people to see when they first login.
sudo apt-get install hugo
Navigate to a directory you want the server info to live in, I just put it in /home/yourusernamehere.
hugo new site offgridserver
Change that last part to whatever you want, that is what the directory will be called and it will auto populate all the server info into there.
cd offgridserver git init git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke
So here you will choose a theme, you can use the one above or find more here:
https://themes.gohugo.io/ from there you cana replace the git location URL and use the theme. From experience, some themes have dependencies that don’t work well on ARM architectures like the Raspberry pi, so some might not work. Find what does and one you like.
Next you will edit your main config file. That should be in your hugo server directory called config.toml.
baseURL = 'http://example.org/' languageCode = 'en-us' title = 'Community Emergency Server' theme = 'ananke'
Change the title of the server, this will be displayed so change it to something legit. Then add the name of your theme. If you don’t know the proper name look in your hugo directory. /home/youruser/offgridserver/themes obviously change that info to how your directories are.
Next make a post!
hugo new posts/welcome.md
That will create a markdown file in /home/youruser/offgridserver/content/posts
--- title: "About This Server" date: 2019-03-26T08:47:11+01:00 draft: false --- This server was created to help people connect with eachother, share books, information, chat, share videos and in general help eachother in a time of need. There are a ton of books to read and download: [Book Repository](http://192.168.8.147:8080) If you want to chat with your neighbors: [Neighborhood Chat](http://192.168.8.147:3000) Want to watch some videos? : [Video Streaming](http://192.168.8.147:8096) Look out for eachother, and remember that we get though this together! Not alone!
So this all works in markdown and requires no coding on your end, so most people can quickly start a basic webserver no problem and let hugo handle everything else.
Change the IP addresses in this to the IP address of your server. If you don’t know that you can use some commands to pull that information.
sudo apt-get install net-tools -y ifconfig
Your IP address will be different depending on if you used Wifi or an ethernet connection. But since we are sticking with Wifi your looking for the part that says wlp— that is your wireless card. Yours will look different but here is the gist.
wlp5s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.68.121
So add that IP into your about page. If you are using an Nginx reverse proxy (more on that later) then you can just put whatever proxy domain you want or the IP.
Next start the hugo server. It should run on http://localhost:1313
Making hugo start at boot and bind to an address
We are going to make a custom service for hugo as well.
sudo nano /etc/systemd/system/hugo.service
[Unit] Description=(Runs Hugo Server on Boot) [Service] WorkingDirectory=/home/youruser/offgridserver ExecStart=/usr/bin/hugo server --bind 0.0.0.0 --baseURL http://192.168.8.146/ [Install] WantedBy=multi-user.target
Change the working directory to the correct one and the IP to your correct IP address. Then exit and save the file.
sudo systemctl daemon-reload
When you make changes to configuration files, you need to run that to tell the machine to reload your configs.
sudo systemctl start hugo.service
Make the server start at boot
sudo systemctl enable hugo.service
Hugo throws errors with actual descriptions, so if you have problems you will know about it. If your server has errors it won’t run so see what the error says by running this command to show the output of the tool.
sudo systemctl status hugo.service
A big gotcha: be aware of this!
When you plug in your server and power it on, it will try to bind to an IP address. If your router isn’t fully running and able to supply an IP address your server will bind to nothing and won’t start correctly. So wait for your router to fully come up, then turn on your server. Or you can just wait for your router to come up, and restart the server, and when it comes back it will be able to bind to an IP address.
Installing Emby as a media server
cd ~/Downloads sudo pkg -i emby-server-deb < whatever version>arm64.deb
Emby will start on port 8096, go there and go through the setup wizard, and point to the folder you want the server to pull your music, movies, whatever.
Then set it to run at boot.
sudo systemctl enable emby-server.service
So from here you now have a chat server, a calibre server to host books and other files, a home page for your users to navigate to and go to your different sites, and a media server. Now we have to add the networking part of things to get the server connected to a router, then modify our configs with our static IP, then add our clients and eventually our nodes and their clients.
Enable SSH for remote Access
sudo apt install openssh-server sudo ufw allow ssh
Getting our main router running
This part will depend on your router. This is less so an exact guide, than an overall guide. All of this will be in different places and look totally different. But almost every router will have the ability to do the actions, the specifics don’t matter when it comes to where exactly static IP addressing is, it’s more so knowing that you need to do it, and finding where that is in your router.
First thing we want to do is log into our router, change the SSID for the wifi, and set a static IP for our server so every time it boots, it’s at the same place.
Typically the IP address of your router will be 192.168.1.1, my router is sett to 192.168.8.1 by default. There is a sticker under the router that will have all the info to log into the admin console.
You need to have the MAC address of the Wifi card to set your static IP.
To do that run ifconfig and take note of the MAC address.
Where you see ether and some data after that, that is the MAC address. If you are going to hardwire the server and the router together (I don’t really recommend it unless you have latency or speed issues with Wifi) use the mac from the lo category instead of wlan. In this case we want the server to automatically connect to our network over wifi, so we use the MAC address of the wifi card on wlan0.
Disconnect your server from the main network and connect to the guest network so you can see the proper IP address that the router assigns it on the guest network (It might be different)
Ok this is a weird quirk with my router here, in order to do a captive portal you have to have it on a guest wifi. Most routers will let you just do a captive portal on any network but whatever. Because of this, I am going to add my server to the guest wifi network.
Next because my router requires it I will add my guest wifi information and change the SSID of that. I’m setting the security to open so anyone can access the network without a password. I don’t want people knocking on my door asking for the password to access the network, or stopping people who need access from getting it because they can’t login. So leave it open.
Next we will set the captive portal, so when anyone connects to the wifi network, they will be redirected to our hugo server and the landing page we made.
By default with hugo your posts will be accessed by navigating to the /posts/whateveryounamedyouraticle directory.
A tip about having a guest wifi network
If you noticed our router is at 192.168.8.1 but we are setting our IP to the server to 192.168.9.147. Why is that? Because we now have two different networks, a LAN network that requires authentication, and another that is open so we can have the captive portal. It’s easier to have the server connect to the guest wifi, mostly because we are forced to by this router, but mostly because it makes it easier to manage and easier to access.
By putting the server on the guest network, where clients will connect, you save yourself from having to modify firewall rules to make the .8 network talk to the .9 network and it’s a huge pain in the ass. Yes this is less secure. But we want anyone to be able to access the server and not have to play with firewall rules when there is an emergency or the power is out.
If your router doesn’t require the use of a guest network to do captive portals, ignore this.
But wait, with changes to static IP addresses, come changes to config files.
So now we set our server with a static IP address, but now our config for hugo had a different IP address! So now we have to edit the hugo config to point to the right IP!
sudo nano /etc/systemd/system/hugo.service
[Unit] Description=(Runs Hugo Server on Boot) [Service] WorkingDirectory=/home/youruser/offgridserver ExecStart=/usr/bin/hugo server --bind 0.0.0.0 --baseURL http://192.168.9.147/ [Install] WantedBy=multi-user.target
sudo systemctl stop hugo.service sudo systemctl daemon-reload
sudo systemctl start hugo.service
Ok, now we need to change our post in hugo because we have the wrong IP there!
cd /home/where you put your hugo info/content/posts
--- title: "About This Server" date: 2019-03-26T08:47:11+01:00 draft: false --- This server was created to help people connect with eachother, share books, information, chat, share videos and in general help eachother in a time of need. There are a ton of books to read and download: [Book Repository](http://192.168.9.147:8080) If you want to chat with your neighbors: [Neighborhood Chat](http://192.168.9.147:3000) Want to watch some videos? : [Video Streaming](http://192.168.9.147:8096) Look out for eachother, and remember that we get though this together! Not alone!
Save the file, hugo should autorefresh but if it doesn’t just stop and start the service again.
sudo systemctl stop hugo.service
sudo systemctl start hugo.service
Restart your server after confirming a few things:
Your server is set to automatically connect to the correct wifi, all other wifi networks are disabled from automatically connecting or forgotten.
Your services are all set to automatically start, reboot your server and navigate to them to see if they work automatically. If not go back and check if you enabled them.
Then you can reboot the server, then use another computer or your phone to connect to your new guest wifi and see if the captive portal brings you to your hugo landing page, then to all of your new services.
Congrats! You now have a server running services that anyone can see by joining your wifi network. They are greeted with a landing page with whatever information you want to add and can navigate to your sites.
Creating and connecting nodes
To connect a node to your network and expand it you will need to connect your other router to your main router using either WDS or by putting the router into repeater or extender mode. I want to stress this: every router manufacturer will use different terms. Best thing is to play with it until things work.
Some routers will use WDS as a completely separate mode, others will have extender modes that use WDS or call it mesh networking, it’s annoying but you have to figure out what the router will do by connecting it, and if it doesn’t work, factory resetting it. In this example, the router has a separate WDS setting.
Some routers also can work in WDS mode with different settings, so you can name the SSID something else and have it work as a clone of your main router, just under a different name. It might be worth it to change the SSID and set the captive portal for the router beforehand. So if you put it into WDS/Repeater/Extender mode, it has the settings you want. I changed mine to say Emergency Beacon 1.
After setting the SSID and the captive portal settings, set it into WDS/Repeater/Extender mode, again depending on the router.
Typically this will ask for the network of your main router, find it and connect it. Your second router will reboot and if you changed the SSID it will look like a separate network. But keep in mind this will act as if you had connected to the main router, even if you are out of range from the main router, but in range of the beacon. Pretty cool.
Connect your client to the beacon and double check if your captive portal works, redirects you to your hugo landing page and that you can access all the services you are running on your server.
If it all works, from here you can expand, add more routers, add more servers, give access to more clients and like mycelium spread the communication and information network.
Expanding the Network
So we have now made a network with nodes that connect wirelessly and added more nodes to that network. Or we just have a simple off grid network either way there are other things you can add to it to make things better from here. More than likely I will implement some of these in version two of this, but for now I leave these as ideas and possibilities to add onto the network and some more uses that you might find interesting or useful.
Adding wireless security cameras
Wyze makes pretty cheap IoT devices, which I have mixed feelings about the internet of shit, but I digress. There are really amazing things out that are legit useful. One of them is Wyze outdoor cameras. They are wireless, rechargeable cameras that can work offline and also have a basestation. They are waterproof and have night vision built in. You can record motion even offline to an SD card. All you do is set them up, put them into travel mode and connect your base station to your network. You can add four per base station.
You can use these when you have internet and also when you don’t have it.
LoRa for long-range communication backbones
To add more resiliency to the network you can use LoRa devices that use radio frequencies to communicate. CellSol is a cool project that works like the same idea here, only on a different communication protocol. They are usually super small and require very little electricity to run. They are great for bridging the gap when it comes to long distances.
Internet in a box project
Another cool concept is the internet in a box project. It includes videos, maps, educational platforms, a bunch of information. Not sure how it would work when it comes to our network here because it makes it’s own Wifi signal and network, which might mess things up but it’s worth investigating. Maybe you find something from that project and just install it on your server your own way so you have control of how it works.
Who the hell knows, only you do
I really can’t think of every single thing you can do with this. But you might have an idea of something cool. Build it! Share it! Iterate on this as a starting point. Share what you have done with everyone you can in the commons of the internet. Individually we can only imagine our own horizons, collectively, our horizons combine into the infinite.
Datarunners, closing the gap & seeing it in action.
While imagining the uses for this network and thinking about connecting communities, this got me thinking about bridging longer distances. Not every community will have someone who knows how to use RF to send digital data, or it might not be working for whatever reason.
Let’s say there are two communities with their own autonomous networks, but for whatever reason, say for instance a mountain between them, it’s really hard to relay nodes to connect the two networks. I imagined data runners, people who travel between places with servers to share data. Basically a sneakernet. Nothing new. But it’s interesting to think about now. Datarunners can have these servers and routers strapped to an ebike, ride between communities and share information. In the communities there can be something like a torrent server that is seeking files. Once a data runner comes within range of the community network, the seeker starts to download the files and then that is shared with the larger network. One community might use it to share news or important information in an encrypted format, datarunners can move that information physically, either because there isn’t internet access, or to circumvent surveillance, whatever. I guess they would be like digital encrypted mailmen, only that they don’t have to deliver the data, it just connects and does it for them.
This also segways into creating mutual aid networks even in areas that have no communication methods. Communities sharing food with eachother, sharing information, datarunners aren’t just traveling to move data, but are working with mutual aid groups in areas to move supplies and information. That might be news, or updates to the regional database of supplies for the community confederation to see what each place has and to move resources efficiently.
This got me thinking about the ways that I can do this right now. I posted recently about an ebike that I charge on my offgrid solar system. I can put the router and server in the side bags, and use a solarpanel strapped to the back to charge battery banks. I could make my cargo trailer into a mobile solar power station, and charge my bike when it needs to recharge. All without the need for an outside resource. There could be a blackout and I could still move goods and information around at 25 miles per hour. Moving between areas that might be hard to bridge and syncing our files with their networks. Sounds pretty out there, and pretty futuristic in a way, but the future is here, a better future is possible, we just have to build it!
Towards a slow internet: a symbiosis of technology and nature
Directly powering a server, a router and a node with solar power means that when the sun isn’t around, neither is the network. It’s a reminder of nature, and the fact that everything we do relies on nature to work. We live in a truly unsustainable time where everything is available 24/7 because we extract fossil fuels and burn them to keep things running. The internet is infinite but the resources to run the internet is not. Running things on solar really points out how interdependent we are with the sun, with our methods of harnessing and dispersing energy.
https://solar.lowtechmagazine.com/about.html is a great showcase of this. A website that runs entirely off solar power, it occasionally goes offline. When the energy required to run things runs out, it goes down. This is to say that sometimes we need to work with natural processes, learn that we come from the earth, we are part of the earth’s systems.
That is also to say that solar generation requires exploitation. The rare earth metals and materials needed are mined from the global south and used to make these panels to generate electricity. Degrowth means putting an end to extractive processes, and moving towards truly sustainable means. How do we make solar power without rare and finite materials? How do we move from supply chains based in capitalist exploitation and instead move to passive means of generation? Ways that we can reuse ewaste and other items thrown into scrapyards and forgotten instead of mining and manufacturing new things. How do we mine our waste to find the materiels to make new things, instead of destroying the earth for the things we already have lying around in giant piles? These are things to think about. Solar power (PV solar power) is great, but we can’t ignore where it comes from, the people and countries their production impact, and the reality of our situation.
We know the issues, we know shits fucked. What are some of the solutions?
Moving into a place of symbiosis with nature, and learning from the natural environment. Mimicking what we see in this complex system. But wait, we need electricity for the important stuff. Medical equipment, mobility aids, safety systems. Yes, but let’s try to imagine other ways of generating electricity that don’t require extraction. What if we tool boilers from scrap yards and filled them with metal heat conductive piping with an inlet and an outlet and filled them with sand to make a sand battery. Passive solar uses no extractive minerals, just the power of the sun to boil collected rain water in a chamber. This steam drives a turbine to generate electricity, the steam is collected into sand batteries that radiate heat and capture heat naturally, another boiler is run from the excess heat left from the sand batteries. The remnant steam is then collected and then used as drinking water from going through the distillation process or recirculated through the system to cut down on water usage.
We can make passive generation systems out of scrap, we can cut e-waste streams with circular economies and economies of reuse, instead of destruction. There are other paths.
Expanding Horizons, Use cases, Ideas, Prefiguration, and Dual Power
So far this network has been about emergency situations, where we want to share information with each other without the hassle of having to develop things in the field, and without relying on the capitalist infrastructure that underpins our society today. But this really isn’t only about emergency times, because with these ingredients you can create so many different configurations and types of networks. We can move from different uses, imagine new ways that autonomous, off grid networks can bring to our communities and to our daily lives. There are ways to use this technology in highly beneficial ways. The goal in this section is to offer up ideas and ways of using this, along with other tech, in situations and areas that we normally don’t think about when it comes to autonomous networks. Parts of this will be speculative, a play on what if scenarios, but most of it will be for the real world.
The backbone of the community
You’ve been talking to your neighbors, maybe sharing food and supplies with each other. Other people in your apartment building are thinking about forming a tenant union. You and a group of friends want to turn the barren turf grass curbed areas and empty lots near you into a food forest by doing some guerilla gardening. Sure we can all share information on twitter, discord, facebook for the boomers. For more secure things we can use signal and protonmail. But what if there was a way to foster even more autonomy when it came to local organizing? So you decide to make a backbone network, one that will connect everyone in emergencies. But during normal times it becomes the community second, secure internet. Instead of getting together on discord to talk about what we are planting in the community garden, we use an Element server, with end-to-end encryption. We host videos on a media server that normally would get taken down if posted to social media. We switch people over to federated social media platforms and away from social media corporations that use surveillance capitalism to sell our personal data. We share books on the network, music, movies, help organize the tenant union on encrypted chats. We start pooling our money to source small solar power generation stations to put on our rooftop and around the block. We know things are changing, we are trying to make them good changes, but the world feels like it’s going to hell. Well. It kinda always had been.
It starts happening. You see more and more armed right wing groups in the streets and at protests. Your trans friends have to walk with someone home from fear of being attacked. Your state starts banning certain books in schools and eventually libraries. The election so many were hoping for goes the other way. The new government puts in draconian laws to monitor people for a list of crimes, sodomy, homosexuality, for reading banned books, for sharing the realities of the violence you see in the streets. The videos you upload of police beatings get taken down. The internet we thought was open, slowly becomes censored, keywords stopped. The new government uses the big data of tech corps to track people. Keyword warrants go out for anyone searching online for banned topics. “How to get an abortion”, “How do I know I’m trans”, “The history of slavery in the US”. Now all a crime to look into.
Your network becomes the only way to escape the grasp of the state. You airgap the network from the greater internet, keeping your communications safe between everyone. Everything is encrypted by default, and no intelligence agency can see what you are typing and sending. The videos that once were banned are played freely from projectors into the street. Showing people the reality of things. You spread your network more. Rolling blackouts happen from climate change ravaging the power grid. But your community has solar generator stations, now a lot after pooling your resources together. Your power stations help people power their medical devices, charge their wheelchairs, power the network, charge people’s devices to stay connected. You go from block to block talking to people, offering food, security and community. They ask if there is a way to help. There are a ton of ways, helping in the community gardens that have taken over every space of soil and rooftop. Helping with the community defense circle to keep the cops and right wing militias away from the community. They have computers, phones, routers that were sitting in the dark, now with power from a micro power station. Their routers aren’t special, but they don’t have to be. You connect them as nodes back to the network. More people add their own servers and information. Things spread, more blocks are taken back by the people. The chatrooms are full of people organizing supply runs, working with other communities, forming a federation of communities. Your book server gave people the info they need to make water filters, to make wind generators, to fix roads, whatever needs to be done gets done. People can talk freely, and live freely. You carve out the freedom you have been needing together. As a collective.
Spaces and Places
What if your local park had it’s own little server that had information about the plants you planted, the wildflower seeds you spread around a couple months back, and information on how others could help?
What if your local coffee shop looked like a normal one. But at any moment you had access to thousands of revolutionary texts. The once normal and quiet coffee shop becomes a hub of activists and revolutionaries.
A music venue has free music, when you come inside you are able to download albums for free. Musicians can release special tracks for the network, stuff you can’t get anywhere else. You are the first person to hear your favorite band’s new song after seeing them live.
It’s an interesting thing to think of sharing information in specific times and places. With the internet we are so used to the pervasive roar of data all around us all the time. Places are unique and some of the experiences you can have there are unique. It isn’t the same to look at pictures of a place, when you could go there and get a unique experience. A blend of the digital world and reality but also kept in check. This little digital world only exists in your local park, at the coffee shop, at this specific music venue. Picrust is an interesting example of this, websites in a point of space.
Protests and demonstrations
Most police departments have cell site simulators, AKA stingrays, that basically trick your phone into thinking there is a cell phone tower nearby with a strong signal. Once connected, the police harvest the data that any cell phone in the area is sending out. Unencrypted communications, text messages, phone calls, what websites your visiting or have open that are calling out to a server somewhere.
With autonomous and encrypted local servers protesters can create their own networks to stay connected while also not being connected to cellular service. With travel routers being powered by battery banks in backpacks. Multiple people in the crowd with a node, so if one person gets separated, the network stays connected. Encrypted messaging that never hits a cell phone tower, sharing pictures, data and map information.
Tiny Banned Book Library
As more states and school districts work to stifle access to information and censor what the youth can have access to, the more ways we have to find to circumvent these bans. Bring a router and a server to school, keep it in a bag. Plug them into a spot that’s hidden between a folding room divider. In the back of filing cabinets. Boot your chromebook into an OS off a USB and run Calibre. Broadcast all the books that they ban. Broadcast information about youth liberation, about the destructiveness of an educational system based in white supremacy. Give everyone access to books about deschooling, zines about where to get hormones, find healthcare, or get access to birth control. They won’t know how to stop it. They won’t know who is doing it. Never tell anyone where the servers are. Show up every day and broadcast the information they don’t want you to see. Make a walking tiny library of banned books and banned information.