vault backup: 2026-03-15 20:37:34
This commit is contained in:
@@ -0,0 +1,91 @@
|
||||
---
|
||||
created: 2026-03-15
|
||||
updated: 2026-03-15
|
||||
status: planned
|
||||
---
|
||||
# Migration: TrueNAS to Ubuntu + Coolify
|
||||
|
||||
## Motivation
|
||||
|
||||
- TrueNAS is storage-first OS; not ideal for general-purpose app hosting and experimentation
|
||||
- Server idles 99% of the time — underutilized capacity
|
||||
- Coolify provides one-click app installs and git-push deploys (useful as a Laravel developer)
|
||||
- Current setup makes experimenting with new apps slow (e.g., OpenClaw took 3-4 hours)
|
||||
|
||||
## Current Setup
|
||||
|
||||
- **OS:** TrueNAS Scale (Debian-based) on NVMe SSD (`nvme0n1`)
|
||||
- **Storage:** ZFS stripe pool `tank` on two separate disks (~29T total, ~14.8T used)
|
||||
- **Services:** Traefik, Gitea, Servarr stack (Gluetun/ProtonVPN, qBittorrent, Sonarr, Radarr, Lidarr, Prowlarr, Bazarr, Recyclarr), CrowdSec, Dozzle, Watchtower
|
||||
- **Paths:** Stacks at `/mnt/tank/stacks/`, configs at `/mnt/tank/configs/`, media at `/mnt/tank/media/`
|
||||
|
||||
## Target Setup
|
||||
|
||||
- **OS:** Ubuntu Server on NVMe SSD
|
||||
- **Storage:** Same ZFS stripe pool `tank`, imported as-is
|
||||
- **Management:** Coolify for app deployment and management
|
||||
- **Services:** Same as before, plus easy deployment of new apps and Laravel projects
|
||||
|
||||
## Migration Plan
|
||||
|
||||
### Before Wiping TrueNAS
|
||||
|
||||
1. **Document network config** — static IP, DNS settings, hostname, router port forwards
|
||||
2. **Back up compose files and configs** — copy `/mnt/tank/stacks/` and `/mnt/tank/configs/` to USB stick or laptop (they're on the ZFS pool and will survive, but be safe)
|
||||
3. **Export the ZFS pool cleanly:**
|
||||
```bash
|
||||
zpool export tank
|
||||
```
|
||||
4. **Note disk identifiers** for the pool (already known from `zpool status`)
|
||||
|
||||
### Install Ubuntu
|
||||
|
||||
5. **Install Ubuntu Server** on the NVMe SSD (wipes TrueNAS)
|
||||
6. **Set up networking** — replicate static IP, hostname, DNS
|
||||
|
||||
### Restore Storage
|
||||
|
||||
7. **Install ZFS support:**
|
||||
```bash
|
||||
sudo apt install zfsutils-linux
|
||||
```
|
||||
8. **Import the pool** at the same mount point:
|
||||
```bash
|
||||
sudo zpool import -d /dev/disk/by-id tank
|
||||
```
|
||||
Pool should appear at `/tank` — if paths need to match old config, set the mountpoint:
|
||||
```bash
|
||||
sudo zfs set mountpoint=/mnt/tank tank
|
||||
```
|
||||
9. **Verify data integrity:**
|
||||
```bash
|
||||
zpool status tank
|
||||
zpool scrub tank
|
||||
```
|
||||
|
||||
### Install Coolify
|
||||
|
||||
10. **Install Coolify** (one-liner from their docs)
|
||||
11. **Decide on reverse proxy strategy:**
|
||||
- Option A: Use Coolify's built-in Traefik — simplest, let Coolify manage SSL and routing
|
||||
- Option B: Keep existing Traefik + CrowdSec config — more control, but manage it outside Coolify
|
||||
- Do NOT run both on port 443 simultaneously
|
||||
12. **Re-deploy services** via Coolify using existing Docker Compose files from `/mnt/tank/stacks/`
|
||||
|
||||
### Post-Migration
|
||||
|
||||
13. **Verify Servarr stack** — confirm VPN routing through Gluetun works
|
||||
14. **Verify Gitea** — confirm repos are accessible
|
||||
15. **Set up disk monitoring:**
|
||||
```bash
|
||||
sudo apt install smartmontools
|
||||
```
|
||||
16. **Set up ZFS scrub cron** (Ubuntu may set this up automatically, verify)
|
||||
17. **Test deploying a Laravel project** via git push to confirm Coolify workflow
|
||||
|
||||
## Gotchas
|
||||
|
||||
- **Mount point must match** — Docker Compose files reference `/mnt/tank/...` paths
|
||||
- **Coolify has its own Traefik** — conflicts with existing Traefik if both claim port 443
|
||||
- **ZFS pool must be exported cleanly** before wiping TrueNAS, otherwise force-import is needed
|
||||
- **Servarr stack VPN routing** through Gluetun may need network config adjustments in Coolify's Docker environment
|
||||
Reference in New Issue
Block a user