Skip to content

Commit 7653d6a

Browse files
Initialize Starlight project (source files only)
1 parent ab30d56 commit 7653d6a

15 files changed

Lines changed: 6555 additions & 997 deletions

File tree

.gitignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# build output
2+
dist/
3+
# generated types
4+
.astro/
5+
6+
# dependencies
7+
node_modules/
8+
9+
# logs
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
pnpm-debug.log*
14+
15+
16+
# environment variables
17+
.env
18+
.env.production
19+
20+
# macOS-specific files
21+
.DS_Store
22+
23+
# Build output
24+
dist/
25+
.astro/
26+
27+
# Dependencies
28+
node_modules/
29+
30+
# Environment files
31+
.env
32+
.env.production
33+
34+
# macOS
35+
.DS_Store

.vscode/extensions.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"recommendations": ["astro-build.astro-vscode"],
3+
"unwantedRecommendations": []
4+
}

.vscode/launch.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"command": "./node_modules/.bin/astro dev",
6+
"name": "Development server",
7+
"request": "launch",
8+
"type": "node-terminal"
9+
}
10+
]
11+
}

README.md

Lines changed: 35 additions & 133 deletions
Original file line numberDiff line numberDiff line change
@@ -1,147 +1,49 @@
1-
# lan
2-
Home network and self-hosted service documentation
1+
# Starlight Starter Kit: Basics
32

4-
## High-Level Architecture
3+
[![Built with Starlight](https://astro.badg.es/v2/built-with-starlight/tiny.svg)](https://starlight.astro.build)
54

6-
The network utilizes a **Split-Horizon DNS** strategy hosted on a virtualized microserver. This architecture ensures high-speed, direct local access for LAN clients while securely routing external traffic via a Cloudflare Application Tunnel, effectively bypassing ISP inbound port blocks (80/443) and throttling on specific ports (32400).
5+
```
6+
npm create astro@latest -- --template starlight
7+
```
78

8-
- **WAN Ingress:** Cloudflare Tunnel (No inbound ports open).
9-
- **LAN Routing:** Direct IP resolution via local authoritative DNS.
10-
- **Virtualization:** Proxmox VE
11-
- Privileged LXC for OpenWRT.
12-
- VM (using all 4 A76 cores) for a docker host to run a monolithic compose with all services.
9+
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
1310
14-
## Hardware Inventory
11+
## 🚀 Project Structure
1512

16-
### Core Compute & Routing
13+
Inside of your Astro + Starlight project, you'll see the following folders and files:
1714

18-
- **Host Device:** FriendlyARM NanoPC T6
19-
- **SoC:** Rockchip RK3588
20-
- **Interfaces:** 2x 2.5Gbps RJ45, NVMe, m.2 WiFi/BT slots
21-
- Internal Storage
22-
- 256GB eMMC (/dev/mmcblk0)
23-
- 256GB Samsung PM961 - PCIe 3.0 x4 m.2 NVME (/dev/nvme0)
24-
- Exernal/Attached Storage
25-
- USB 3.0 12TB WD MyBook (/dev/sda1)
26-
- **OS:** Debian 12 with Pxvirt (Proxmox) 8.4.10
27-
- **Modem:** Motorola MB8611 (DOCSIS 3.1)
15+
```
16+
.
17+
├── public/
18+
├── src/
19+
│ ├── assets/
20+
│ ├── content/
21+
│ │ └── docs/
22+
│ └── content.config.ts
23+
├── astro.config.mjs
24+
├── package.json
25+
└── tsconfig.json
26+
```
2827

29-
### Network Switching Fabric
28+
Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name.
3029

31-
- **Switch 1 (Living Room):** Mokerlink 8-Port 2.5Gbps Unmanaged (Model: 2G080210GS) with 2x 10Gbps SFP+ Uplinks.
32-
- **Switch 2 (Entertainment Center):** Mokerlink 16-Port 2.5Gbps Unmanaged (Model: 2G16210GS) with 2x 10Gbps SFP+ Uplinks.
33-
- **Switch 3 (Office):** Mokerlink 8-Port 2.5Gbps Unmanaged (Model: 2G080210GS) with 2x 10Gbps SFP+ Uplinks.
34-
- **Switch 4 (Attic):** Mokerlink 5-Port 2.5Gbps Unmanaged (Model: 2G050210GS) with 2x 10Gbps SFP+ Uplinks.
35-
- **Wireless APs:** 2x Ubiquiti Unifi 7 Pro
36-
- Living Room
37-
- Office
30+
Images can be added to `src/assets/` and embedded in Markdown with a relative link.
3831

39-
### Smart Home
32+
Static assets, like favicons, can be placed in the `public/` directory.
4033

41-
- **Controller:** Home Assistant Blue (Odroid N2+)
42-
- **Zigbee Radio:** Sonoff ZBDongle-E (Plus V2)
43-
- **Z-Wave Radio:** Zooz S2 Stick 700 (ZST10 700)
34+
## 🧞 Commands
4435

45-
## Virtualization Topology
36+
All commands are run from the root of the project, from a terminal:
4637

47-
The NanoPC-T6 (`pmx-t6`) serves as the hypervisor host using two physical interfaces bridged to virtual networks.
38+
| Command | Action |
39+
| :------------------------ | :----------------------------------------------- |
40+
| `npm install` | Installs dependencies |
41+
| `npm run dev` | Starts local dev server at `localhost:4321` |
42+
| `npm run build` | Build your production site to `./dist/` |
43+
| `npm run preview` | Preview your build locally, before deploying |
44+
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
45+
| `npm run astro -- --help` | Get help using the Astro CLI |
4846

49-
| ID | Hostname | OS | Role | Network Configuration |
50-
| --- | --- | --- | --- | --- |
51-
| **Metal** | `pmx-t6` | Debian 12 | **Hypervisor** | `eth0` -> `vmbr0` (WAN Bridge)`eth1` -> `vmbr1` (LAN Bridge) |
52-
| **100** | `openwrt` | OpenWRT 24.10 | **Router / Gateway** | **Privileged LXC** `eth0` (WAN) mapped to `vmbr0` `eth1` (LAN) mapped to `vmbr1` **IP:** `192.168.1.1` |
53-
| **101** | `ubuntu-docker` | Ubuntu 24.04.3 | **Application Host** | **VM** `eth0` mapped to `vmbr1`**IP:** `192.168.1.3` |
47+
## 👀 Want to learn more?
5448

55-
## Network Topology & Interconnects
56-
57-
### WAN/ISP Constraints
58-
59-
- **Restrictions:** Inbound ports 21, 80, 143, 443 blocked; Port 32400 throttled.
60-
- **Connection:** Cable Modem -> NanoPC-T6 `eth0` (Passthrough to OpenWRT via `vmbr0`).
61-
62-
### LAN Backbone (2.5G / 10G)
63-
64-
1. **Router Downlink:** NanoPC-T6 `eth1` -> Primary Switch `Port 1` (2.5Gbps).
65-
2. **Switch Interconnects:**
66-
- **Switch 1 (Living Room)** `Port 2` **↔ Switch 2 (Entertainment Center)** `Port 1` (CAT6)
67-
- **Switch 1 (Living Room)** `SFP 1` **** **Switch 3 (Office)** `SFP 1` (LC/LC OM4).
68-
- **Switch 1 (Living Room)** `SFP 2` **** **Switch 4 (Attic)** `SFP 1` (LC/LC OM4).
69-
70-
### Port Allocations
71-
72-
- **Switch 1:** Uplink, HA Blue, Interconnects.
73-
- **Switch 2:** Entertainment Consoles (Xbox Series X, PS5 Pro, Nintendo Switch, etc.).
74-
- **Switch 3:** Workstations (Mac Mini, Desktops), Lab Equipment (Siglent PSU/Scope).
75-
- **Switch 4:** Cameras (2x Reolink Duo 3v), APs.
76-
77-
## DNS & Routing Architecture
78-
79-
### Split-Horizon Strategy
80-
81-
To prevent hairpin NAT issues and ensure valid SSL termination locally, specific DNS records allow local clients to resolve services directly while external clients use the Cloudflare Tunnel.
82-
83-
### Internal DNS (LAN)
84-
85-
- **Primary:** Pi-hole (Docker on `192.168.1.3`)
86-
- **Configuration:** Both resolvers enforce the local IP for the domain and strip HTTPS/ECH records to prevent SSL handshake failures with Cloudflare keys.
87-
- **Pi-hole Env:** `FTLCONF_misc_dnsmasq_lines="address=/[FQDN]/192.168.1.3;server=/[FQDN]/"`
88-
- **OpenWRT Config:** `list address '/[FQDN]/192.168.1.3'`, `list server '/[FQDN]/'`
89-
90-
### External DNS (Cloudflare)
91-
92-
- **Record:** `[FQDN]` (CNAME) → `[Tunnel UUID].cfargotunnel.com`.
93-
- *Note: Cannot use A record for a tunnel, must be IPv4.*
94-
- **Record:** `*.[FQDN]` (CNAME) → `[Tunnel UUID].cfargotunnel.com`.
95-
- **Record:** `plex.[FQDN]` (A) → `Public IPv4 address of Oracle Cloud Infra VM` (Tailscale tunnel endpoint and Traefik reverse proxy).
96-
- **Proxy Status:** Proxied (Orange Cloud).
97-
98-
## Service Implementation (Docker on `ubuntu-docker`)
99-
100-
### Network Stack
101-
102-
- **Traefik:** Reverse Proxy & Ingress Controller.
103-
- **Network:** `proxy` bridge (`172.20.0.0/16`).
104-
- **SSL:** Wildcard `.[FQDN]` via Let’s Encrypt DNS Challenge.
105-
- **Cloudflared:** Tunnel Connector.
106-
- **Route:** `.[FQDN]` -> `https://traefik:443` (No TLS Verify).
107-
- **Pi-hole:** Network-wide Ad-blocking & DNS.
108-
- **Network:** Fixed IP `172.20.0.10` on `proxy` net; Host ports `53:53` mapped.
109-
110-
### Media Stack (Plex)
111-
112-
- **Container Network:** `macvlan` (Essential for DLNA/L2 Discovery) and `proxy` (for other services to be able to access by docker internal DNS).
113-
- **ISP Bypass:**
114-
- **Remote Access:** Disabled in GUI to prevent UPnP/Port 32400 mapping.
115-
- **Custom Server URL:** Set to `https://plex.[FQDN]:443`.
116-
- **Routing:** Traefik labels on `ubuntu-docker` configured to proxy traffic to `http://192.168.1.5:32400`.
117-
- **Tunnel:** Tailscale VPN connection between 192.168.1.5 and public IPv4 of OCI VM (endpoint).
118-
- Restrictive to exposing **only** one IP using `TS_EXTRA_ARGS=--advertise-routes=192.168.1.5/32 --accept-routes`
119-
- External Traefik reverse proxy on OCI VM translates `http://192.168.1.5:32400` to `https://[OCI VM Public IPv4]:443/`
120-
- **DNS A Record:** `plex.[FQDN]` handles resolution to `[OCI VM Public IPv4]`
121-
- **Result:** External traffic routes via `https://plex.[FQDN]` (Tunnel), bypassing ISP throttling. Internal traffic routes to 192.168.1.5. Avoids breaking ToS of Cloudflare Application Tunnel (free tier).
122-
123-
### Authentication
124-
125-
**Authentik:** Identity Provider (IdP) and SSO.
126-
127-
- Rule in place to check for Cloudflare headers in request. If present, client is external and must authenticate.
128-
- No authentication required from LAN clients.
129-
130-
### Docker compose
131-
132-
Monolithic docker compose for all services.
133-
- See [docker-compose.yaml](docker-compose.yaml)
134-
135-
## Client-Side Specifics
136-
137-
### Browser VPN Extensions
138-
139-
- **Configuration:** “Split Tunneling” or “Bypass List” must be configured in the extension to avoid external resolution via Cloudflare Application Tunnel.
140-
- **Bypass Rule 1:** `192.168.1.0/24` (Local Subnet)
141-
- **Bypass Rule 2:** `.[FQDN]` (Local Domain)
142-
143-
### Home Assistant
144-
145-
- **Connectivity:** Hardwired via Primary Switch `Port 3`.
146-
- **Zigbee:** Sonoff ZBDongle-E (Plus V2) connected via USB extension.
147-
- **Z-Wave:** Zooz S2 Stick 700 (ZST10 700) connected via USB extension.
49+
Check out [Starlight’s docs](https://starlight.astro.build/), read [the Astro documentation](https://docs.astro.build), or jump into the [Astro Discord server](https://astro.build/chat).

astro.config.mjs

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,26 @@
1+
// @ts-check
12
import { defineConfig } from 'astro/config';
23
import starlight from '@astrojs/starlight';
34

5+
// https://astro.build/config
46
export default defineConfig({
5-
site: 'https://tamarindmonkey.github.io',
6-
base: '/lan',
7-
integrations: [
8-
starlight({
9-
title: 'LAN/Services'
10-
}),
11-
],
7+
integrations: [
8+
starlight({
9+
title: 'My Docs',
10+
social: [{ icon: 'github', label: 'GitHub', href: 'https://github.com/withastro/starlight' }],
11+
sidebar: [
12+
{
13+
label: 'Guides',
14+
items: [
15+
// Each item here is one entry in the navigation menu.
16+
{ label: 'Example Guide', slug: 'guides/example' },
17+
],
18+
},
19+
{
20+
label: 'Reference',
21+
autogenerate: { directory: 'reference' },
22+
},
23+
],
24+
}),
25+
],
1226
});

0 commit comments

Comments
 (0)