Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Neighborhood server, solar-powered #3

Open
7 tasks
mathias opened this issue Sep 30, 2023 · 8 comments
Open
7 tasks

Neighborhood server, solar-powered #3

mathias opened this issue Sep 30, 2023 · 8 comments

Comments

@mathias
Copy link
Owner

mathias commented Sep 30, 2023

Brief intro:

Rather than use corporate social networks to communicate with your neighbors, each neighborhood should have its own network and communications tool. Such a network could be completely off-grid, and use the kind of captive-portal DNS tricks that commercial wifi portals use. This is a combination of hardware to enable a solar-powered Pi-based server to broadcast its own wifi network, and software to provide the central point for a local community to talk and coordinate. (In essence, a wiki.)

The off-grid features are not the main point, but having a solar-powered server that does not rely on an Internet connection means that we can plan to use the server to coordinate if the internet or electricity is out in the area. Further, local-only usage means that we can shield the network from the open web. We can try and ensure privacy to our users and not require creating accounts. Users should not need to be technical to use the wiki -- the software should all be basic, usable web technology.

Tasks / Sub-Issues


Running on my solar-powered webserver project.

Would include:

  • Static site portal with explanation and links to all tools/apps
  • RocketChat as simple real time chat
  • Wiki engine for most coordination/communication needs
  • Gancio as a neighborhood calendar -- or something else that doesn't require registration?
  • calibre-web for ebooks and sharing documents
  • a tool lending library app (or editable site like putting the tool lending library on a neighborhood wiki)

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.

Prior art:

@mathias mathias changed the title Neighborhood secret Neighborhood server Sep 30, 2023
@mathias
Copy link
Owner Author

mathias commented Sep 30, 2023

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

@mathias
Copy link
Owner Author

mathias commented Oct 1, 2023

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

edit: Setup moved to doc in #4.

@mathias mathias self-assigned this Oct 1, 2023
@mathias
Copy link
Owner Author

mathias commented Oct 1, 2023

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 mathias changed the title Neighborhood server Neighborhood server, solar-powered Oct 3, 2023
@mathias
Copy link
Owner Author

mathias commented Oct 10, 2023

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
Copy link
Owner Author

mathias commented Oct 18, 2023

Documenting this project has moved to #4 for now, and will be in the docs folder when merged.

@mathias
Copy link
Owner Author

mathias commented Nov 8, 2023

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

@grimmy
Copy link

grimmy commented Nov 26, 2024

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`
   * 11. 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?

Most of this can be done by using rpi-imager now

@mathias
Copy link
Owner Author

mathias commented Nov 30, 2024

@grimmy I'll give that a try -- the actual instructions have moved to the doc in #4, and I didn't bother to delete the comments here ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants