1
0
forked from finn/tinyboard

Compare commits

..

11 Commits

Author SHA1 Message Date
Justin Oros
8ee67739f7 Update readme 2026-04-16 16:04:43 -07:00
Justin Oros
39f8f64351 clean up readme setup.sh option comments 2026-04-16 16:03:32 -07:00
Justin Oros
e924579b2e clean up readme setup.sh option comments 2026-04-16 16:02:37 -07:00
Justin Oros
912e553e06 add option 0 to reconfigure network via setup.sh 2026-04-16 15:59:35 -07:00
Justin Oros
98986e615b remove spoke/README.md 2026-04-16 15:03:47 -07:00
Justin Oros
0e792be751 add troubleshooting section for beta.armbian.com apt repo issue 2026-04-16 14:46:25 -07:00
Justin Oros
835793d396 add Armbian autoconfig docs link to README 2026-04-16 14:42:10 -07:00
Justin Oros
11f9586c5e fix directory tree in README for setup-network.sh move 2026-04-16 14:37:06 -07:00
Justin Oros
3e351f925d move setup-network.sh to spoke/ directory 2026-04-16 14:35:59 -07:00
Justin Oros
a197b7881b move setup-network.sh to spoke/ directory 2026-04-16 14:35:42 -07:00
Justin Oros
60feeca65e move setup-network.sh to spoke/ directory 2026-04-16 14:35:31 -07:00
3 changed files with 31 additions and 10 deletions

View File

@@ -16,14 +16,14 @@ On a fresh Debian/Ubuntu VPS or server:
apt install git
git clone https://gut.oily.dad/justin/tinyboard
cd tinyboard
./setup.sh # choose option 4
./setup.sh # option 4 (setup new hub)
```
### Setting up a new Spoke
On a fresh Armbian device:
1. Modify `spoke/armbian.not_logged_in_yet` accordingly, then drop it onto the SD card as `/root/.not_logged_in_yet` before first boot (WiFi credentials)
1. Modify `spoke/armbian.not_logged_in_yet` accordingly, then drop it onto the SD card as `/root/.not_logged_in_yet` before first boot (WiFi credentials) — see [Armbian Autoconfig docs](https://docs.armbian.com/User-Guide_Autoconfig/)
2. Boot, SSH in as root
3. Run:
@@ -31,8 +31,8 @@ On a fresh Armbian device:
apt install git
git clone https://gut.oily.dad/justin/tinyboard
cd tinyboard
./setup-network.sh # configure static IP — SSH session will drop, reconnect
./setup.sh # choose option 1
./setup.sh # option 0 (configure network)
./setup.sh # option 1 (configure new spoke)
```
### Onboarding a Spoke from the Hub
@@ -41,14 +41,14 @@ Once the spoke tunnel is up, run on the hub:
```bash
cd tinyboard
./setup.sh # choose option 2
./setup.sh # option 2 (onboard spoke)
```
### Offboarding a Spoke from the Hub
```bash
cd tinyboard
./setup.sh # choose option 3
./setup.sh # option 3 (offboard spoke)
```
---
@@ -76,8 +76,8 @@ Spokes initiate outbound SSH connections to the hub, creating reverse tunnels. T
```
tinyboard/
├── setup.sh ← entry point
├── setup-network.sh ← configure static IP on spoke before setup
├── spoke/
│ ├── setup-network.sh ← configure static IP before setup
│ ├── setup-spoke.sh ← automated spoke setup
│ ├── compose.yaml ← Docker Compose for autossh + syncthing
│ ├── Dockerfile ← autossh container
@@ -94,12 +94,13 @@ tinyboard/
### `setup.sh`
Entry point. Presents a menu:
0. Reconfigure network (static IP via netplan — SSH session will drop, reconnect)
1. Set up this device as a new spoke
2. Onboard a new spoke from the hub
3. Offboard a spoke from the hub
4. Set up this device as a new hub
### `setup-network.sh`
### `spoke/setup-network.sh`
Run as root on a new spoke before `setup.sh`. Configures a static IP via netplan. Supports both WiFi and wired interfaces. Automatically reverts if network connectivity is lost after applying the new config.
### `spoke/setup-spoke.sh`
@@ -172,6 +173,20 @@ Before committing, ensure the following do not contain real credentials:
---
## Troubleshooting
### `apt update` fails with beta.armbian.com error
On some Armbian images, a beta apt repository is enabled by default and may cause `apt update` to fail. Comment it out:
```bash
grep -r "beta.armbian" /etc/apt/sources.list /etc/apt/sources.list.d/
```
Open the file that contains it (usually `/etc/apt/sources.list.d/armbian.sources`) and comment out or remove the line referencing `beta.armbian.com`, then run `apt update` again.
---
## Requirements
**Spoke:** Armbian (Debian-based), ARM device, Docker, autossh, git

View File

@@ -15,14 +15,20 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
header "TinyBoard Setup"
echo ""
echo " 0) Reconfigure network"
echo " 1) Set up this device as a new spoke"
echo " 2) Onboard a new spoke from the hub"
echo " 3) Offboard a spoke from the hub"
echo " 4) Set up this device as a new hub"
echo ""
read -rp "Choose [1/2/3/4]: " CHOICE
read -rp "Choose [0/1/2/3/4]: " CHOICE
case "$CHOICE" in
0)
[ "$(id -u)" -eq 0 ] || die "Network reconfiguration must be run as root"
info "Starting network reconfiguration..."
exec "$SCRIPT_DIR/spoke/setup-network.sh"
;;
1)
[ "$(id -u)" -eq 0 ] || die "Spoke setup must be run as root"
info "Starting spoke setup..."

View File

@@ -197,6 +197,6 @@ echo -e "${YELLOW}════════════════════
echo -e "${YELLOW} Network reconfigured.${NC}"
echo -e "${YELLOW} If you are connected via SSH, your session${NC}"
echo -e "${YELLOW} may drop. Reconnect to: ${STATIC_ADDR}${NC}"
echo -e "${YELLOW} Then run: ./setup.sh${NC}"
echo -e "${YELLOW} Then run: cd .. && ./setup.sh${NC}"
echo -e "${YELLOW}══════════════════════════════════════════${NC}"
echo ""