server-ovh-prod-01-main/docs/plans/2026-03-18-caprover-migrati...

82 lines
3.8 KiB
Markdown
Raw Permalink Normal View History

# CapRover Migration Design
**Date:** 2026-03-18
**Status:** Approved
## Overview
Migrate services from CapRover server to the OVH production server (15.204.247.153). All services will be Docker Compose, integrated with Traefik, and auto-discovered by the existing backup script. Obsidian is excluded (using official Obsidian Sync). Portainer, changedetection, and heimdall are not being ported.
## Services
| Batch | Service | Domain | Data |
|-------|---------|--------|------|
| 0 | Watchtower | none | new (stateless) |
| 1 | Vaultwarden | bitwarden.swansoncloud.com | migrate data dir from CapRover |
| 1 | n8n | n8n.swansoncloud.com | fresh install |
| 2 | Forgejo | forgejo.swansoncloud.com | fresh install + 2 repos migrated from gitea.swansoncloud.com |
| 2 | NocoDB | nocodb.swansoncloud.com | fresh install |
## Architecture
### Watchtower
- Image: `nicholas-fedor/watchtower` (active community fork of the archived containrrr/watchtower)
- Stateless — no volumes, no domain, no backup needed
- Monitors all containers on a nightly schedule
- Rationale for fork: original containrrr/watchtower archived December 2025; this fork is actively maintained with weekly releases
### Vaultwarden
- Image: `vaultwarden/server`
- Single container, SQLite data dir (`./data`) — no separate database needed for personal use
- Traefik handles SSL termination
- Backup auto-discovered by existing `~/services/backup.sh`
### n8n
- Image: `n8nio/n8n`
- Fresh install — nothing worth preserving from CapRover instance
- Match pattern of existing n8n instances already on this server
- Backup auto-discovered
### Forgejo
- Image: `codeberg.org/forgejo/forgejo`
- SQLite — adequate for 2 repos, personal use
- Fresh install; repos migrated using Forgejo's built-in migration tool (compatible with Gitea)
- Domain: `forgejo.swansoncloud.com` (replaces `gitea.swansoncloud.com`)
- Backup auto-discovered
### NocoDB
- Image: `nocodb/nocodb`
- Fresh install, SQLite built-in
- No data to migrate
- Backup auto-discovered
## Vaultwarden Data Migration Steps
1. SSH into CapRover server, locate the Vaultwarden persistent data directory
2. `scp` the `data/` dir from CapRover to OVH at `~/services/vaultwarden/data/`
3. Deploy Vaultwarden on OVH
4. Test by accessing via direct IP or temporary subdomain — confirm vault unlocks and data is intact
5. Update `bitwarden.swansoncloud.com` DNS → OVH IP (15.204.247.153)
6. Verify browser extensions reconnect
## Forgejo Repo Migration
Forgejo's built-in migration tool can pull repos directly from the live Gitea instance at `gitea.swansoncloud.com`. Run migration from the new Forgejo web UI after deployment — no manual download needed.
## DNS Cutover Order
Cutover per-service independently once verified: Vaultwarden → n8n → Forgejo → NocoDB.
Old CapRover server stays up (read-only) until all four DNS records are confirmed healthy, then decommission.
## Post-Migration Tasks
- Set up Fireflies.ai meeting transcript backup automation in n8n
- Set up hyperthrive.io contact form automation in n8n
## Design Decisions
- **Vaultwarden over official Bitwarden server**: Official Bitwarden is a heavy .NET/SQL Server stack. Vaultwarden is ~10MB, supports all Bitwarden clients and premium features (TOTP, attachments) for free.
- **SQLite over PostgreSQL**: All services are single-user personal use. SQLite is simpler, lower overhead, and still auto-discovered by backup.sh. Can migrate to PostgreSQL later if needed.
- **nicholas-fedor/watchtower over Diun**: Backups are in place; fully automatic updates are acceptable. Diun (notification-only) adds operational overhead without meaningful benefit given the backup safety net.
- **Modular service composition**: Each service is an independent Docker Compose stack under `~/services/SERVICE_NAME/`, consistent with existing server patterns.