Latest code is hosted on https://git.woodbine.nyc/micro/woodbine.nyc
Latest code is hosted on https://git.woodbine.nyc/micro/woodbine.nyc
If you are new to running your own websites, welcome!
In general, everything is orchestrated by the compose files.
Note that a "service" is a fuzzy name for software that is expected to be always running.
Sometimes, you will see a -setup service in the compose file.
This usually runs a script that checks or generates secrets, and does initial configuration if needed.
A simple web server (`python3 -m http.server`) could be a service, as could something like Gmail.
## Goals
## Goals
Understandable
We hope this is understandable by a single individual, after learning a bit about docker compose and caddy.
- a person should be able to adapt this to their community while learning the least amount of new concepts and technology
- the person who set it up should not be needed to maintain the services
Resiliant
- services should work even when other parts of the web are not accessible
Lean
- we prefer lightweight software, which usually require less long-term maintenance
## Decisions
There are many other kinds of digital autonomy, but most people are used to the web.
We hope to share our decision making here, so you can follow our thought process.
### Decisions made for you
These needs are required for anyone who wants to deploy **web-based** services.
#### Auth
We need a way for people to either register an account or sign in with an external account to use the services.
After trying authelia, zitadel, authentik, and keycloak, got the furthest with zitadel.
#### Web
To host a webpage, you need some software that listens for http requests. We chose Caddy.
If you would like to edit the webpage, either change the files in `./data/web/site/` directly, or you can connect via WebDAV and edit the file remotely via https://web.localhost.
#### Backup
If you will be helping a community, its important to have backups and restore. We have two helper services, `backup-files` and `backup-database`.
These use duplicity to backup to a backblaze instance, so you will need to setup that beforehand.
#### Secrets
## setup
We have two helper services for making sure secrets exist (`check-secrets`), or generating unique secrets for other services that need them (`generate-secrets`).
---
## getting started
### setup
Make a backblaze B2 account for backups. Add the secrets to ./secrets/backup/.
Make a backblaze B2 account for backups. Add the secrets to ./secrets/backup/.
Fill out env.template and make sure to pass it in the next command
Fill out env.template and make sure to pass it in the next command
### running
## running
Helper scripts can be found in [the scripts directory](./scripts)
To start
We have two scripts in the `scripts/` directory - up and down
./scripts/up
./scripts/up
To stop, you can press ctrl+c, or in another terminal run
To stop all the containers, you can ctrl+c, or
./scripts/down
./scripts/down
To generate secrets for all services ahead-of-time
To generate secrets for all services
./scripts/generate-secrets
./scripts/secrets
### port forwarding
## port forwarding
The caddy service expects to be able to bind to ports 80 and 443
The caddy service expects to be able to bind to ports 80 and 443
One simple way is to allow unprivileged users access to these low ports
One simple way is to allow unprivileged users access to these low ports
If you are on linux, you can run
echo 'net.ipv4.ip_unprivileged_port_start=80' | sudo tee -a /etc/sysctl.conf
All the services are defined by docker compose files.
- [~] single sign-on (authelia)
- [ ] per-user webdav folders via authelia
We provide `backup-files`, `backup-database`, `check-secrets`, and `generate-secrets` helper services.
- [ ] any OIDC service setup
- [~] file backup (duplicity)
We have configured Caddy to import all files found in /etc/caddy.d/, so if you want to add a new service, you will need to make a small `Proxyfile` to tell caddy what subdomain to forward to what port.
See [the services readme](./services/readme.md) for a guide on adding a new service.
---
## roadmap
### alpha
- [ ] decide on single postgres instance or multiple
- [ ] postgres backup (duplicity)
- [ ] postgres backup (duplicity)
- [ ] single sign-on for webdav (one user per folder)
- [ ] decide on single postgres instance or multiple
- [ ] single sign-on for one more service
- [x] identity provider (zitadel)
- [x] file backup (duplicity)
- [x] reverse proxy (caddy)
- [x] reverse proxy (caddy)
- [x] personal home pages (caddy-webdav)
- [x] personal home pages (caddy-webdav)
- [x] migrate from yaml to env for authelia config
- [x] setup notifications via smtp
- [x] setup notifications via smtp
### beta
## beta
- [ ] file restore
- [ ] file restore
- [ ] postgres restore
- [ ] postgres restore
@ -140,10 +65,10 @@ See [the services readme](./services/readme.md) for a guide on adding a new serv