diff --git a/README.md b/README.md index 19881d5..8c12b2f 100644 --- a/README.md +++ b/README.md @@ -28,12 +28,10 @@ This system implements a hub-and-spoke model where: tinyboard/ ├── hubspoke-helper.sh # Main management script ├── hub/ -│ ├── rclone-mount@.service # Systemd user service template │ └── rclone.conf # Rclone SFTP configuration ├── spoke/ │ ├── compose.yaml # Docker Compose for autossh tunnel │ ├── Dockerfile # autossh container image -│ ├── autossh-tunnel.service # Legacy systemd service (deprecated) │ ├── autohostname.sh # Hostname assignment by MAC address │ ├── aptprimary.sh # Initial package installation │ ├── clean_sensitive.sh # Clean WiFi/password from configs @@ -62,9 +60,9 @@ tinyboard/ ### Initial Setup 1. Write Armbian minimal image to SD card -2. Copy `spoke/armb-not_logged_in_yet` to SD card root (contains WiFi credentials) +2. Copy `spoke/armb-not_logged_in_yet` to SD card root `/root/.not_logged_in_yet` (contains WiFi credentials) 3. Boot device, SSH in as root with password "1234" -4. After first login, `armb-not_logged_in_yet` will be processed for root and armbian user credentials +4. After first login and setup tasks, `.not_logged_in_yet` will be processed for root and armbian user credentials 5. Clone this repository: `git clone ` 6. Run `spoke/aptprimary.sh` to install required packages 7. Run `spoke/autohostname.sh` to assign hostname based on MAC address @@ -99,12 +97,6 @@ tinyboard/ 3. Copy and customize `hub/rclone.conf` to `~/.config/rclone/rclone.conf` 4. Update key_file path to point to your SSH private key -### Systemd Service Setup -1. Create user systemd directory: `mkdir -p ~/.config/systemd/user` -2. Copy `hub/rclone-mount@.service` to `~/.config/systemd/user/` -3. Enable lingering for user services: `sudo loginctl enable-linger $USER` -4. Reload systemd: `systemctl --user daemon-reload` - ### FUSE Configuration ```bash # Allow other users to access mounts (if needed) @@ -118,6 +110,10 @@ sudo usermod -aG fuse $USER ## Usage ### Managing Spoke Tunnels +- Docker on spoke should handle autostart of spoke tunnel +- Syncthing can be combined in this image +- Rename syncthing image and host names per-device in the compose file. + ```bash # Build autossh container ./hubspoke-helper.sh spoke build @@ -136,6 +132,13 @@ sudo usermod -aG fuse $USER ``` ### Managing Hub Mounts + +#### Crontab entry: +``` +@reboot /home/armbian/tinyboard/hubspoke-helper.sh hub start-background +``` + +#### Deprecated: systemd ```bash # Install systemd service (after manual file placement) ./hubspoke-helper.sh hub install diff --git a/spoke/compose.yaml b/spoke/compose.yaml index f508aa3..55be217 100644 --- a/spoke/compose.yaml +++ b/spoke/compose.yaml @@ -17,7 +17,7 @@ services: volumes: - /home/armbian/.ssh/oilykey2026:/home/armbian/.ssh/oilykey2026:ro - /home/armbian/.ssh/known_hosts:/home/armbian/.ssh/known_hosts:ro - - /home/armbian/share:/home/armbian/ + # - /home/armbian/share:/home/armbian/ syncthing: image: syncthing/syncthing container_name: spoke-syncthing @@ -28,4 +28,4 @@ services: - PUID=1000 - PGID=1000 volumes: - - /home/armbian/share:/var/syncthing + - /home/armbian/st:/var/syncthing