Skip to content

Commit 6cf1eb9

Browse files
committed
docs: update all documentation for Tailscale Serve architecture
Update docs 04, 05-CADDY, 05-NEXTCLOUD, 08, 09, scripts/README and terraform/README to reflect current security model: AIO admin ports 8080/8443 closed to internet, accessible only via Tailscale Serve or SSH tunnel. Grafana via Tailscale instead of public subdomain. Fix markdown lint issues.
1 parent 3f6a0c3 commit 6cf1eb9

7 files changed

Lines changed: 48 additions & 42 deletions

File tree

docs/04-FIREWALL-SECURITY.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,12 @@ sudo ufw allow 80/tcp comment 'HTTP'
6464
# HTTPS (Nextcloud web interface)
6565
sudo ufw allow 443/tcp comment 'HTTPS'
6666

67-
# Nextcloud AIO Apache port (se necessario)
68-
sudo ufw allow 8080/tcp comment 'Nextcloud AIO'
67+
# NOTA: La porta 8080/8443 (AIO admin) NON va aperta nel firewall.
68+
# L'interfaccia AIO è in ascolto solo su 127.0.0.1 e si accede via
69+
# Tailscale Serve (https://tailscale-hostname:8443) oppure SSH tunnel:
70+
# ssh -L 8080:localhost:8080 ubuntu@YOUR_IP
6971

70-
# Nextcloud AIO Talk (WebRTC - opzionale)
72+
# Nextcloud AIO Talk (WebRTC - opzionale, solo se si usa Talk)
7173
sudo ufw allow 3478/tcp comment 'Nextcloud Talk TURN'
7274
sudo ufw allow 3478/udp comment 'Nextcloud Talk TURN'
7375
```

docs/05-CADDY-REVERSE-PROXY.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ services:
3939
container_name: nextcloud-aio-mastercontainer
4040
restart: always
4141
ports:
42-
- "8080:8080" # AIO admin interface
43-
- "8443:8443" # AIO admin HTTPS
42+
- "127.0.0.1:8080:8080" # AIO admin (solo localhost)
43+
- "127.0.0.1:8443:8443" # AIO admin HTTPS (solo localhost)
4444
environment:
4545
- APACHE_PORT=11000
4646
- APACHE_IP_BINDING=0.0.0.0
@@ -142,7 +142,8 @@ certificate obtained successfully for your-domain.example.com
142142

143143
### 3. Configurazione AIO
144144

145-
1. Accedi a: `https://YOUR_IP:8080`
145+
1. Accedi all'interfaccia AIO admin via Tailscale Serve (`https://tailscale-hostname:8443`)
146+
oppure SSH tunnel (`ssh -L 8080:localhost:8080 ubuntu@YOUR_IP`, poi apri `http://localhost:8080`)
146147
2. Login con password generata
147148
3. Configura dominio: `your-domain.example.com`
148149
4. Seleziona componenti opzionali

docs/05-NEXTCLOUD-DEPLOYMENT.md

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Deployment di Nextcloud All-in-One (AIO) su OCI con dominio personalizzato e Let
55
## Prerequisites
66

77
- ✅ Docker e Docker Compose installati
8-
- ✅ Firewall UFW configurato (porte 80, 443, 8080 aperte)
8+
- ✅ Firewall UFW configurato (porte 80, 443 aperte)
99
- ✅ Dominio configurato e funzionante
1010
- ✅ Dominio che punta all'IP dell'istanza
1111

@@ -84,10 +84,10 @@ cd ~/nextcloud
8484
| ----------- | -------- | ---------- | ---------------- |
8585
| 0.0.0.0/0 | TCP | 80 | HTTP |
8686
| 0.0.0.0/0 | TCP | 443 | HTTPS |
87-
| 0.0.0.0/0 | TCP | 8080 | Nextcloud AIO |
8887
| 0.0.0.0/0 | TCP | 3478 | Talk (opzionale) |
8988

90-
**NOTA**: Senza queste regole, anche con UFW configurato, il traffico non arriverà all'istanza!
89+
**NOTA**: La porta 8080/8443 (AIO admin) NON va esposta nelle Security Lists.
90+
L'interfaccia AIO è accessibile solo via Tailscale Serve o SSH tunnel.
9191

9292
## Step 3: Avvio Nextcloud AIO
9393

@@ -135,13 +135,18 @@ docker exec nextcloud-aio-mastercontainer grep password /mnt/docker-aio-config/d
135135

136136
### 4.1 Accedi all'interfaccia AIO
137137

138-
Apri il browser e vai a:
138+
Accedi via Tailscale Serve o SSH tunnel:
139139

140-
```
141-
https://your-domain.example.com:8443
140+
```bash
141+
# Via Tailscale Serve (se configurato)
142+
https://tailscale-hostname:8443
143+
144+
# Via SSH tunnel
145+
ssh -L 8080:localhost:8080 ubuntu@YOUR_IP
146+
# Poi apri http://localhost:8080 nel browser
142147
```
143148

144-
**NOTA**: Usa **HTTPS** (porta 8443), non HTTP!
149+
**NOTA**: L'interfaccia AIO non è esposta su internet. Richiede Tailscale o SSH tunnel.
145150

146151
### 4.2 Accetta certificato self-signed
147152

@@ -298,20 +303,19 @@ Per usare lo storage OCI:
298303
2. Verifica UFW sull'istanza: `sudo ufw status`
299304
3. Testa connettività: `curl -I http://your-domain.example.com`
300305

301-
### Errore: Cannot access port 8443
306+
### Errore: Cannot access AIO admin interface
302307

303-
**Causa**: Firewall blocca porta 8080/8443
308+
**Causa**: Le porte 8080/8443 sono in ascolto solo su localhost (127.0.0.1)
304309

305-
**Soluzione**:
310+
**Soluzione**: Accedi via Tailscale Serve o SSH tunnel:
306311

307312
```bash
308-
# Verifica UFW
309-
sudo ufw status | grep 8080
313+
# Via SSH tunnel
314+
ssh -L 8080:localhost:8080 ubuntu@YOUR_IP
315+
# Poi apri http://localhost:8080 nel browser
310316

311-
# Se necessario
312-
sudo ufw allow 8080/tcp
313-
sudo ufw allow 8443/tcp
314-
sudo ufw reload
317+
# Via Tailscale Serve (se configurato)
318+
# https://tailscale-hostname:8443
315319
```
316320

317321
### Container crashano continuamente

docs/08-TERRAFORM-STRATEGY.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ terraform destroy -target=oci_core_instance.nextcloud_old
451451
terraform apply -var="instance_name=nextcloud-green"
452452

453453
# 2. Test GREEN in parallelo (BLUE continua a funzionare)
454-
# Accedi a GREEN-IP:8080, verifica tutto OK
454+
# Accedi a GREEN AIO via SSH tunnel o Tailscale, verifica tutto OK
455455

456456
# 3. Switch DNS da BLUE a GREEN
457457
# Update DNS A record to point to GREEN_IP
@@ -1020,31 +1020,30 @@ curl -s http://localhost:3000/api/health | jq
10201020
dig your-domain.example.com +short
10211021
# Deve mostrare IP pubblico del server
10221022

1023-
dig monitoring.your-domain.example.com +short
1024-
# Deve mostrare stesso IP (wildcard)
1023+
# NOTA: monitoring non ha più un sottodominio pubblico,
1024+
# si accede via Tailscale Serve (https://tailscale-hostname:3000)
10251025

10261026
# 2. Verifica porte aperte (UFW)
10271027
sudo ufw status
10281028
# Deve mostrare:
10291029
# 22/tcp ALLOW (SSH)
10301030
# 80/tcp ALLOW (HTTP)
10311031
# 443/tcp ALLOW (HTTPS)
1032-
# 8080/tcp ALLOW (Nextcloud AIO)
1032+
# NOTA: 8080/8443 NON devono essere presenti (AIO solo localhost)
10331033

10341034
# 3. Verifica container networks
10351035
docker network ls
10361036
# Deve mostrare:
10371037
# nextcloud-aio
10381038
# monitoring
10391039

1040-
# 4. Verifica Caddy può raggiungere Grafana
1041-
docker exec caddy-reverse-proxy wget -qO- http://grafana:3000/api/health
1040+
# 4. Verifica Grafana funziona
1041+
curl -s http://localhost:3000/api/health
10421042
# Output: {"database":"ok",...}
10431043

1044-
# 5. Test connessione HTTPS (da locale)
1045-
# Sul tuo PC:
1046-
curl -I https://monitoring.your-domain.example.com
1047-
# Deve mostrare: HTTP/2 200 (o HTTP/2 302 redirect to login)
1044+
# 5. Test connessione Grafana (via Tailscale Serve)
1045+
# https://tailscale-hostname:3000
1046+
# Deve mostrare pagina login Grafana
10481047

10491048
# 6. Verifica SSL certificate
10501049
openssl s_client -connect your-domain.example.com:443 -servername your-domain.example.com < /dev/null 2>/dev/null | grep "subject="
@@ -1080,14 +1079,14 @@ du -sh /mnt/nextcloud-data/*
10801079

10811080
```bash
10821081
# Nextcloud AIO (setup wizard se prima volta)
1083-
https://<ip>:8080
1084-
# Accetta certificato self-signed
1082+
# Via Tailscale: https://tailscale-hostname:8443
1083+
# Via SSH tunnel: ssh -L 8080:localhost:8080 ubuntu@<ip>
10851084

10861085
# Nextcloud (dopo setup AIO)
10871086
https://your-domain.example.com
10881087

1089-
# Grafana Monitoring
1090-
https://monitoring.your-domain.example.com
1088+
# Grafana Monitoring (via Tailscale Serve)
1089+
# https://tailscale-hostname:3000
10911090
# Username: admin
10921091
# Password: da step 3
10931092
```

docs/09-CICD-MONITORING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ The monitoring stack uses **Prometheus + Grafana** with exporters for comprehens
290290
│ │ │
291291
└───────────────────────────────┼───────────────────┘
292292
293-
https://monitoring.your-domain.example.com
293+
https://tailscale-hostname:3000 (via Tailscale Serve)
294294
```
295295

296296
### Components
@@ -304,8 +304,8 @@ The monitoring stack uses **Prometheus + Grafana** with exporters for comprehens
304304

305305
2. **Grafana** - Visualization and dashboards
306306
- Pre-configured Prometheus datasource
307-
- HTTPS access via Caddy
308-
- URL: `https://monitoring.your-domain.example.com`
307+
- HTTPS access via Tailscale Serve
308+
- URL: `https://tailscale-hostname:3000 (via Tailscale Serve)`
309309

310310
**Exporters:**
311311

@@ -366,7 +366,7 @@ docker compose logs -f prometheus grafana
366366
#### 4. Access Grafana
367367

368368
```
369-
URL: https://monitoring.your-domain.example.com
369+
URL: https://tailscale-hostname:3000 (via Tailscale Serve)
370370
Username: admin
371371
Password: (from GRAFANA_ADMIN_PASSWORD in .env)
372372
```

scripts/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ Genera il Caddyfile da template .env per reverse proxy.
338338
**⚠️ Importante:**
339339

340340
- Richiede `DOMAIN` configurato in `.env`
341-
- Aggiungere record DNS A per `monitoring.TUODOMINIO`
341+
- Grafana accessibile via Tailscale Serve (`https://tailscale-hostname:3000`)
342342
- Configurare `GRAFANA_ADMIN_PASSWORD` prima del deployment
343343

344344
---

terraform/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ docker exec nextcloud-aio-mastercontainer \
180180

181181
### Access Nextcloud
182182

183-
1. **AIO Admin:** `https://<public-ip>:8080`
183+
1. **AIO Admin:** via Tailscale Serve (`https://tailscale-hostname:8443`) o SSH tunnel (`ssh -L 8080:localhost:8080 ubuntu@<public-ip>`)
184184
2. **Nextcloud:** `https://your-domain.example.com`
185185

186186
---

0 commit comments

Comments
 (0)