feat: add update, reinstall, uninstall, logs-<svc>, shell-<svc> targets

- update: git pull + rebuild + restart
- reinstall: full wipe (config/data) + setup + start
- uninstall: stop, remove images, wipe config/data
- logs-<svc>: follow logs for any single service
- shell-<svc>: exec into any container (bash with sh fallback)
- backup: use sudo tar to read container-owned files
- help: restructured with all commands documented
- README: updated Quick Start + added Management Commands reference

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-22 09:38:30 -04:00
parent a1a6b65e48
commit 78310a70ba
2 changed files with 297 additions and 215 deletions
+48 -8
View File
@@ -61,8 +61,7 @@ The Personal Internet Cell is a **production-grade, self-hosted, decentralized d
### Prerequisites
- **Docker** with Compose plugin (`docker compose`) or standalone `docker-compose`
- **WireGuard tools** (`wg` binary, for key generation during install)
- **Debian/Ubuntu** host (apt-based). All other dependencies are installed automatically.
- **2 GB+ RAM, 10 GB+ disk space**
- **Open ports**: 53 (DNS), 80/443 (HTTP/S), 3000 (API), 8081 (Web UI), 51820/udp (WireGuard)
@@ -72,16 +71,22 @@ The Personal Internet Cell is a **production-grade, self-hosted, decentralized d
git clone <repo-url> pic
cd pic
# Default cell (name=mycell, domain=cell, VPN=10.0.0.1/24, port=51820)
make setup && make start
# Install all system dependencies (docker, python3, python3-cryptography, etc.)
make check-deps
# Custom cell — required when installing a second cell on a different host
# Default cell (name=mycell, domain=cell, VPN=10.0.0.1/24, port=51820)
make setup
make start
# Custom cell — use when installing a second cell on a different host
CELL_NAME=pic1 VPN_ADDRESS=10.1.0.1/24 make setup && make start
```
`make setup` generates WireGuard keys, writes `config/wireguard/wg0.conf` and
`config/api/cell_config.json`, and creates all data directories.
`make start` brings up all 13 Docker containers.
`make check-deps` installs python3, python3-cryptography, docker, docker-compose, curl, openssl, git via apt and adds the current user to the docker group.
`make setup` generates WireGuard keys, writes configs, and creates all data directories.
`make start` builds and brings up all 12 Docker containers.
### 2. Access
@@ -104,6 +109,41 @@ cd webui && npm install && npm run dev # React UI on :5173 (proxies API to :
---
## 🛠️ Management Commands
```bash
# First install
make check-deps # install all system packages via apt
make setup # generate keys, write configs
make start # start all 12 containers
# Daily operations
make status # container status + API health
make logs # follow all logs
make logs-api # follow logs for one service (api, dns, wg, mail, caddy, ...)
make shell-api # open a shell inside a container
# Deploy latest code
make update # git pull + rebuild + restart
# Full wipe and reinstall (useful on test machine)
make reinstall # stop, wipe config/data, setup, start fresh
# Remove everything
make uninstall # stop containers, remove images and all data
# Maintenance
make backup # tar config/ + data/ into backups/
make restore # list available backups
make clean # remove containers/volumes, keep config/data
# Tests
make test # run all tests
make test-coverage # tests + HTML coverage report
```
---
## 🔗 Connecting Two Cells (PIC Mesh)
Two PIC instances can form a mesh — full site-to-site WireGuard tunnels with