1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
-
-
+
+
+
+
-
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
|
# infra
Infrastructure-as-code for `vps-nbg1` (Hetzner, Ubuntu 24.04 LTS, arm64).
This repo contains install scripts, config templates, and documentation for all
services running on the VPS. Each service is self-contained under its own directory
with idempotent install scripts.
---
## Services
```pikchr
scale = 0.85
``` pikchr
# Top band: Internet / Cloudflare
right
CF: box "Cloudflare" color white fill 0x2a4a6b width 5.8 height 0.45 rad 4px
# VPS box
# VPS outline
box wid 6.5 ht 5.2 rad 8px at (3.25, 2.0) "vps-nbg1 (91.99.202.69, arm64)" big bold fill lightyellow
VPS: box width 5.8 height 3.8 rad 8px at CF.s + (0, -2.35) fill 0xfafaf0
# Internet / Cloudflare band
box wid 6.5 ht 0.6 rad 4px at (3.25, 5.0) "Cloudflare" fill lightcyan bold
arrow from (1.2, 4.7) down 0.4; "fossil.craftdesign.group" above small
arrow from (5.3, 4.7) down 0.4; "sync.craftdesign.group :4222" above small
# Fossil stack
box "cloudflared" fit rad 4px at (1.2, 3.9) fill lavender
arrow from (1.2, 3.7) down 0.3
box "Caddy :8090" fit rad 4px at (1.2, 3.2) fill lavender
arrow from (1.2, 3.0) down 0.3
box "Fossil :8081" fit rad 4px at (1.2, 2.5) fill lightgreen
text "edgesync, go-libfossil," at (1.2, 2.15) small
text "infra, fossil-skin" at (1.2, 1.95) small
# Fossil stack (left third)
down
CFD: box "cloudflared" color white fill 0x5b4a8a width 1.4 height 0.4 rad 4px \
at VPS.nw + (0.9, -0.5)
arrow from CFD.s down 0.15 color 0x888888
CDY: box "Caddy :8090" color white fill 0x5b4a8a width 1.4 height 0.4 rad 4px
arrow from CDY.s down 0.15 color 0x888888
FSL: box "Fossil :8081" color white fill 0x3a6b3a width 1.4 height 0.4 rad 4px
text "edgesync" at FSL.s + (0, -0.18) small
text "go-libfossil, infra" at FSL.s + (0, -0.35) small
# NATS stack
box "nats-server :4222" fit rad 4px at (5.3, 3.9) fill lightblue bold
arrow from (5.3, 3.7) down 0.3
box "JetStream" fit rad 4px at (5.3, 3.2) fill lightblue
arrow from (5.3, 3.0) down 0.3
box "EDGESYNC" wid 1.6 ht 0.35 rad 4px at (4.7, 2.5) fill aliceblue
box "GO_LIBFOSSIL" wid 1.6 ht 0.35 rad 4px at (4.7, 2.05) fill aliceblue
# NATS stack (right third)
NT: box "nats-server :4222" color white fill 0x2a4a8a width 1.7 height 0.4 rad 4px \
at VPS.ne + (-1.0, -0.5)
arrow from NT.s down 0.15 color 0x888888
JS: box "JetStream" color white fill 0x2a4a8a width 1.7 height 0.4 rad 4px
arrow from JS.s down 0.15 color 0x888888
ES: box "EDGESYNC" fill 0xddeeff width 1.5 height 0.35 rad 4px at JS.s + (0, -0.38)
box "GO_LIBFOSSIL" fill 0xddeeff width 1.5 height 0.35 rad 4px at ES.s + (0, -0.45)
# Other services
box "Coolify :8000" fit rad 4px at (3.25, 3.9) fill lightyellow
box "excalidraw" fit rad 4px at (3.25, 3.2) fill lightyellow
# Coolify (centre)
box "Coolify :8000" fill 0xfff0cc width 1.4 height 0.4 rad 4px at VPS.n + (0, -0.7)
box "excalidraw" fill 0xfff0cc width 1.4 height 0.4 rad 4px at VPS.n + (0, -1.25)
# Arrows from Cloudflare down
arrow from CF.s + (-1.9, 0) down 0.1 color white thick
text "fossil." small at CF.s + (-1.9, -0.2)
arrow from CF.s + (1.9, 0) down 0.1 color white thick
text "sync. :4222" small at CF.s + (1.9, -0.2)
```
| Service | Directory | Endpoint |
|---------|-----------|---------|
| **NATS Server** | `nats/` | `tls://sync.craftdesign.group:4222` |
| Fossil SCM | *(managed separately)* | `https://fossil.craftdesign.group/` |
| Coolify | *(managed separately)* | `http://localhost:8000` |
|