mathias / projects

2 stars 0 forks source link

Neighborhood server, solar-powered #3

Open mathias opened 11 months ago

mathias commented 11 months ago

Based on https://anarchosolarpunk.substack.com/p/offgridinternet and https://homebrewserver.club/low-tech-website-howto.html

Running on my solar-powered webserver project.

Would include:

All of this needs a setup script like Ansible or something like https://github.com/calliecameron/pi-server so it can be repeatable and reliably be set up.

mathias commented 11 months ago

Maybe consider alternatives to RocketChat. It is what was used in the original, but I don’t know if we need it?

mathias commented 11 months ago

Setup steps so far -- I hope to turn this into a script

  1. Download Rpi 3 (or whichever model you have) Debian image from https://raspi.debian.net/tested-images/

  2. Unzip and flash the image onto a MicroSD card.

  3. Boot or the first time.

  4. Set root password (attaching keyboard+monitor because it is convenient)

  5. adduser mathias and follow prompts

    • Add to sudo group: usermod -aG sudo mathias
      1. Update system packages
        sudo apt-get update && sudo apt-get install -y sudo
  6. Set up SSH settings:

    • Ensure openssh server is installed: apt-get install openssh-server
  7. Connect ethernet to main house network and ensure DHCP networking to router is working:

    ip address # read what eth1 says, to connect to
    ping google.com
  8. SSH back in as mathias user (IP address from above)

  9. Ensure that sudo works: sudo whoami should say root

  10. ssh-keygen

  11. sudo apt install curl

  12. curl https://github.com/mathias.keys > .ssh/authorized_keys

  13. Preserve my sanity: sudo apt install vim

TODO: Turn this into a setup script or Ansible config or whatever.

Other notes: raspi-config doesn't exist on vanilla Debian for Rpis. Maybe consider Raspbian headless again in the future?

mathias commented 11 months ago

Travel router: GL.iNet GL-AR300M16-Ext travel router OpenWRT flash and configuration instructions:

  1. Follow https://openwrt.org/toh/gl.inet/gl-ar300m instructions
  2. Set a root password as instructed (We will also later need to turn on SSH access.)
  3. ??? -- need to figure out setup so that the Rpi becomes the source of DNS and captive portal works.
  4. Go to “More Settings” -> “Network Mode” ~and make sure they’re all checked, including WDS.~ -- don't enable WDS, it turns off the admin UI.
  5. Turn on the Guest Network and enable "Applications" -> "Captive Portal" with maximum timeout.

In the end, I couldn't get the OpenWRT instructions to work (it flashed the uboot firmware, but it didn't ever install vanilla OpenWRT) so I am continuing with the GLinet-branded version of OpenWRT, which has been upgraded to the newest version. It should be fine and still provide us the options we need to configure later.

mathias commented 11 months ago

Progress on this: I’ve acquired a Raspberry Pi Zero 2W in the hopes that it will use less power. The only downside is its lack of Ethernet port — it’ll either have to connect to the router via wifi or need a USB ethernet dongle.

I printed a little case out of PLA to make it easier to mount to the inside of the enclosure.

I will begin work on figuring out the steps / script to configure the Pi again this week. I’m hoping fall doesn’t mean I soon run out of sunlight to power this with, as I’m quite far north.

mathias commented 11 months ago

Documenting this project has moved to https://github.com/mathias/projects/pull/4 for now, and will be in the docs folder when merged.

mathias commented 10 months ago

Server should include a copy of its own source code and setup guide that it serves, in line with the way RNode works:

Every RNode contains the seeds necessary to reproduce the system, the RNode Bootstrap Console, which is hosted locally on every RNode, and can be activated and accesses at any time - no Internet required.

The designs, guides and software stored within allows users to create more RNodes, and even to bootstrap entire communications networks, completely independently of existing infrastructure

https://www.printables.com/model/370907-handheld-rnode