Add Solidworks licenses, scripts, and update server docs
- Add Solidworks license files and install guides - Add PowerShell privacy lockdown scripts for Solidworks telemetry - Add Siemens License Server v5.1 binary for NX - Update DALIDOU-SERVER.md with storage layout, backup system, and DNS fixes - Add MEGA-PLAN-BRAIN-SYSTEM.md for unified knowledge management - Add Claude Code local settings 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Dalidou Home Server - Complete Documentation
|
||||
|
||||
> **Last Updated:** December 6, 2025
|
||||
> **Last Updated:** December 18, 2025
|
||||
> **Server Name:** dalidou
|
||||
> **Owner:** Antoine Letarte
|
||||
|
||||
@@ -25,10 +25,20 @@
|
||||
## Server Overview
|
||||
|
||||
### Hardware
|
||||
- **Type:** Home server running Docker containers
|
||||
- **OS:** Linux (Debian/Ubuntu-based)
|
||||
- **Type:** ThinkPad W520 home server running Docker containers
|
||||
- **OS:** Ubuntu Linux
|
||||
- **Location:** Home network
|
||||
|
||||
### Storage Drives
|
||||
|
||||
| Device | Model | Size | Mount Point | Purpose |
|
||||
|--------|-------|------|-------------|---------|
|
||||
| sda | Samsung SSD 850 | 232GB | `/` (root) | Operating system |
|
||||
| sdb | Crucial BX500 SSD | 3.6TB | `/srv/storage` | Service data, Obsidian, shared files |
|
||||
| sdc | WD Elements 14TB | 12.7TiB | `/mnt/hdd` | Immich photos, backups |
|
||||
|
||||
**Note:** sdc is connected via USB 3.0 (SuperSpeed)
|
||||
|
||||
### Purpose
|
||||
Self-hosted infrastructure replacing cloud services:
|
||||
- Google Photos → Immich
|
||||
@@ -383,6 +393,31 @@ docker compose up -d
|
||||
|
||||
## Directory Structure
|
||||
|
||||
### SSD Storage (`/srv/storage` - 3.6TB Crucial SSD)
|
||||
```
|
||||
/srv/storage/
|
||||
├── docs/ ← Paperless consume folder
|
||||
├── shared/ ← Filebrowser root
|
||||
├── repos/ ← Gitea repositories
|
||||
├── obsidian/ ← Obsidian vault (synced)
|
||||
└── photos/ ← External photos (read-only in Immich)
|
||||
```
|
||||
|
||||
### HDD Storage (`/mnt/hdd` - 14TB WD Elements)
|
||||
```
|
||||
/mnt/hdd/
|
||||
├── immich/ ← Primary Immich storage (photos/videos)
|
||||
│ ├── upload/ ← All user uploads (~535GB)
|
||||
│ ├── postgres/ ← Immich database
|
||||
│ ├── model-cache/ ← ML models
|
||||
│ └── redis/ ← Redis cache
|
||||
│
|
||||
└── backups/
|
||||
├── restic-repo/ ← Incremental backups (deduplicated)
|
||||
└── system-images/ ← Weekly full system tarballs
|
||||
```
|
||||
|
||||
### Service Configuration (`/srv/`)
|
||||
```
|
||||
/srv/
|
||||
├── filebrowser/
|
||||
@@ -396,10 +431,7 @@ docker compose up -d
|
||||
│ │ └── lfs/
|
||||
│ └── postgres/
|
||||
│
|
||||
├── immich/
|
||||
│ ├── upload/
|
||||
│ ├── library/
|
||||
│ └── postgres/
|
||||
├── immich -> /srv/storage/immich ← Symlink
|
||||
│
|
||||
├── paperless/
|
||||
│ ├── consume/ ← Drop documents here
|
||||
@@ -424,26 +456,111 @@ docker compose up -d
|
||||
│ ├── bookmarks.yaml ← External links
|
||||
│ └── docker.yaml ← Docker integration
|
||||
│
|
||||
└── storage/
|
||||
└── shared/ ← Filebrowser root
|
||||
├── pihole/
|
||||
│ ├── etc-pihole/
|
||||
│ └── etc-dnsmasq.d/
|
||||
│
|
||||
└── storage/ ← Main SSD storage mount
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Backup Strategy
|
||||
|
||||
### Critical Data Locations
|
||||
### Automated Backup System (Restic + Cron)
|
||||
|
||||
| Priority | Data | Location | Backup Method |
|
||||
|----------|------|----------|---------------|
|
||||
| HIGH | Photos | `/srv/immich/` | External drive + cloud |
|
||||
| HIGH | Documents | `/srv/paperless/` | External drive |
|
||||
| HIGH | Git repos | `/srv/gitea/` | Git push to remote |
|
||||
| MEDIUM | Seafile | `/srv/seafile/` | External drive |
|
||||
| LOW | Configs | `/srv/*/config/` | Copy to backup |
|
||||
The server uses a dual backup approach:
|
||||
1. **Daily incremental backups** at midnight using restic
|
||||
2. **Weekly full system images** on Sundays at 3 AM
|
||||
|
||||
### How Restic Backups Work (Efficiency)
|
||||
|
||||
Restic uses **deduplication and incremental backups**, making it very efficient:
|
||||
|
||||
| Aspect | Behavior |
|
||||
|--------|----------|
|
||||
| **First backup** | Full backup (~535GB for Immich, takes 1-2 hours) |
|
||||
| **Daily backups** | Only new/changed data (typically minutes, not hours) |
|
||||
| **Storage** | Deduplicated - identical files stored once |
|
||||
| **CPU/Energy** | Low - only processes changes |
|
||||
|
||||
**Example:** If you add 20 new photos (100MB) today:
|
||||
- Backup uploads ~100MB (not 535GB)
|
||||
- Takes ~2-5 minutes (not hours)
|
||||
- HDD spins briefly, then sleeps
|
||||
|
||||
This makes nightly backups energy-efficient and fast after the initial backup.
|
||||
|
||||
### Backup Storage
|
||||
|
||||
| Location | Purpose | Size |
|
||||
|----------|---------|------|
|
||||
| `/mnt/hdd/backups/restic-repo` | Incremental backups (versioned, deduplicated) | ~500GB+ |
|
||||
| `/mnt/hdd/backups/system-images` | Weekly full system tarballs | ~50GB x 4 |
|
||||
| `/mnt/hdd/immich` | Primary Immich photo storage | ~535GB |
|
||||
|
||||
### Backup Credentials
|
||||
|
||||
**Restic Repository Password:** `dalidou-backup-2025`
|
||||
|
||||
⚠️ **IMPORTANT:** Store this password securely (e.g., Bitwarden). Without it, backups are irrecoverable!
|
||||
|
||||
### What Gets Backed Up Daily
|
||||
|
||||
| Data | Location | Priority |
|
||||
|------|----------|----------|
|
||||
| Immich photos & DB | `/mnt/hdd/immich` | HIGH |
|
||||
| Obsidian vault | `/srv/storage/obsidian` | HIGH |
|
||||
| Documents | `/srv/storage/docs` | HIGH |
|
||||
| Shared files | `/srv/storage/shared` | MEDIUM |
|
||||
| Gitea repos & DB | `/srv/gitea` | HIGH |
|
||||
| Paperless docs & DB | `/srv/paperless` | HIGH |
|
||||
| Syncthing config | `/srv/syncthing` | LOW |
|
||||
| Homepage config | `/srv/homepage` | LOW |
|
||||
| Pi-hole config | `/srv/pihole` | LOW |
|
||||
| Docker compose | `/home/papa` | MEDIUM |
|
||||
|
||||
### Backup Scripts
|
||||
|
||||
| Script | Schedule | Purpose |
|
||||
|--------|----------|---------|
|
||||
| `/usr/local/bin/backup-daily.sh` | Daily at midnight | Incremental restic backup |
|
||||
| `/usr/local/bin/backup-weekly-image.sh` | Sundays 3 AM | Full system tarball |
|
||||
|
||||
### Retention Policy
|
||||
|
||||
- **Daily backups:** Keep 7 days
|
||||
- **Weekly backups:** Keep 4 weeks
|
||||
- **Monthly backups:** Keep 12 months
|
||||
- **System images:** Keep 4 most recent
|
||||
|
||||
### Manual Backup Commands
|
||||
|
||||
```bash
|
||||
# Check backup status
|
||||
export RESTIC_REPOSITORY=/mnt/hdd/backups/restic-repo
|
||||
export RESTIC_PASSWORD='dalidou-backup-2025'
|
||||
restic snapshots
|
||||
|
||||
# Run manual backup
|
||||
/usr/local/bin/backup-daily.sh
|
||||
|
||||
# Restore a file from backup
|
||||
restic restore latest --target /tmp/restore --include /srv/storage/obsidian
|
||||
|
||||
# List files in a snapshot
|
||||
restic ls latest
|
||||
|
||||
# Check backup integrity
|
||||
restic check
|
||||
|
||||
# View backup logs
|
||||
tail -100 /var/log/backup-daily.log
|
||||
tail -100 /var/log/backup-weekly.log
|
||||
```
|
||||
|
||||
### Legacy Manual Backup Commands
|
||||
|
||||
```bash
|
||||
# Backup Immich
|
||||
tar -czvf immich-backup-$(date +%Y%m%d).tar.gz /srv/immich/
|
||||
@@ -498,43 +615,138 @@ sudo systemctl restart docker
|
||||
|
||||
## Disaster Recovery
|
||||
|
||||
### If Server Fails - Rebuild Steps
|
||||
### What You Need to Recover
|
||||
|
||||
1. **Install fresh Linux (Debian/Ubuntu)**
|
||||
1. **The 14TB WD Elements HDD** (contains all backups and Immich photos)
|
||||
2. **Any new Linux machine** (Ubuntu 22.04+ recommended)
|
||||
3. **The restic password:** `dalidou-backup-2025`
|
||||
|
||||
### Complete Recovery Steps
|
||||
|
||||
#### Step 1: Install Fresh Ubuntu
|
||||
|
||||
Install Ubuntu Server or Desktop on the new machine.
|
||||
|
||||
#### Step 2: Install Required Software
|
||||
|
||||
2. **Install Docker:**
|
||||
```bash
|
||||
# Install Docker
|
||||
curl -fsSL https://get.docker.com | sh
|
||||
sudo usermod -aG docker $USER
|
||||
```
|
||||
newgrp docker
|
||||
|
||||
3. **Restore /srv from backup:**
|
||||
```bash
|
||||
sudo mkdir /srv
|
||||
sudo tar -xzvf backup.tar.gz -C /
|
||||
```
|
||||
# Install restic
|
||||
sudo apt update && sudo apt install -y restic
|
||||
|
||||
4. **Start each service:**
|
||||
```bash
|
||||
cd /srv/gitea && docker compose up -d
|
||||
cd /srv/immich && docker compose up -d
|
||||
cd /srv/paperless && docker compose up -d
|
||||
cd /srv/seafile && docker compose up -d
|
||||
# etc.
|
||||
```
|
||||
|
||||
5. **Install Tailscale:**
|
||||
```bash
|
||||
# Install Tailscale (for remote access)
|
||||
curl -fsSL https://tailscale.com/install.sh | sh
|
||||
sudo tailscale up
|
||||
```
|
||||
|
||||
### Key Files to Backup
|
||||
#### Step 3: Connect and Mount the 14TB HDD
|
||||
|
||||
- All of `/srv/`
|
||||
- `/etc/caddy/Caddyfile` (if using Caddy)
|
||||
- Docker compose files (already in /srv/)
|
||||
- This documentation!
|
||||
```bash
|
||||
# Find the drive
|
||||
lsblk
|
||||
|
||||
# Create mount point and mount (replace sdX with actual device)
|
||||
sudo mkdir -p /mnt/hdd
|
||||
sudo mount /dev/sdX1 /mnt/hdd
|
||||
|
||||
# Add to fstab for auto-mount (get UUID first)
|
||||
sudo blkid /dev/sdX1
|
||||
# Add line to /etc/fstab:
|
||||
# UUID=<your-uuid> /mnt/hdd ext4 defaults,nofail 0 2
|
||||
```
|
||||
|
||||
#### Step 4: Restore from Restic Backup
|
||||
|
||||
```bash
|
||||
# Set up restic environment
|
||||
export RESTIC_REPOSITORY=/mnt/hdd/backups/restic-repo
|
||||
export RESTIC_PASSWORD='dalidou-backup-2025'
|
||||
|
||||
# List available backups
|
||||
restic snapshots
|
||||
|
||||
# Restore everything to root filesystem
|
||||
sudo -E restic restore latest --target /
|
||||
|
||||
# This restores:
|
||||
# - /mnt/hdd/immich (Immich photos & database)
|
||||
# - /srv/storage/obsidian (Obsidian vault)
|
||||
# - /srv/storage/docs (Documents)
|
||||
# - /srv/gitea (Git repositories)
|
||||
# - /srv/paperless (Paperless documents)
|
||||
# - /srv/homepage, /srv/pihole, /srv/syncthing (configs)
|
||||
# - /home/papa (docker-compose.yml)
|
||||
```
|
||||
|
||||
#### Step 5: Create Required Directories
|
||||
|
||||
```bash
|
||||
sudo mkdir -p /srv/storage
|
||||
# Mount SSD if you have one, or create directories
|
||||
```
|
||||
|
||||
#### Step 6: Start All Services
|
||||
|
||||
```bash
|
||||
cd /home/papa
|
||||
docker compose up -d
|
||||
|
||||
# Verify all containers are running
|
||||
docker ps
|
||||
```
|
||||
|
||||
#### Step 7: Configure Tailscale
|
||||
|
||||
```bash
|
||||
sudo tailscale up
|
||||
# Follow the link to authenticate
|
||||
```
|
||||
|
||||
#### Step 8: Verify Services
|
||||
|
||||
- Immich: http://localhost:2283
|
||||
- Gitea: http://localhost:3000
|
||||
- Paperless: http://localhost:8082
|
||||
- Homepage: http://localhost:3001
|
||||
|
||||
### Recovery Time Estimate
|
||||
|
||||
| Step | Time |
|
||||
|------|------|
|
||||
| Install Ubuntu | 15-30 min |
|
||||
| Install Docker/restic | 5 min |
|
||||
| Mount HDD | 2 min |
|
||||
| Restore from backup | 30-60 min (depends on data size) |
|
||||
| Start services | 5 min |
|
||||
| **Total** | **~1-2 hours** |
|
||||
|
||||
### Key Files in Backup
|
||||
|
||||
| Location | Contents |
|
||||
|----------|----------|
|
||||
| `/mnt/hdd/immich` | All photos, videos, thumbnails, postgres DB |
|
||||
| `/srv/storage/obsidian` | Obsidian vault |
|
||||
| `/srv/gitea` | Git repositories and database |
|
||||
| `/srv/paperless` | Scanned documents and database |
|
||||
| `/home/papa/docker-compose.yml` | All service definitions |
|
||||
|
||||
### Alternative: Weekly System Image Recovery
|
||||
|
||||
If you prefer a full system restore (slower but includes OS configs):
|
||||
|
||||
```bash
|
||||
# Mount the HDD
|
||||
sudo mount /dev/sdX1 /mnt/hdd
|
||||
|
||||
# List available images
|
||||
ls -la /mnt/hdd/backups/system-images/
|
||||
|
||||
# Extract to new system
|
||||
sudo tar -xzvf /mnt/hdd/backups/system-images/system-image-YYYYMMDD.tar.gz -C /
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
@@ -584,6 +796,40 @@ docker exec -it <postgres_container> psql -U <user> -d <database>
|
||||
docker exec <postgres_container> pg_isready
|
||||
```
|
||||
|
||||
### DNS Resolution Issues
|
||||
|
||||
If external domains fail to resolve (e.g., `api.anthropic.com`, `google.com`):
|
||||
|
||||
```bash
|
||||
# Check current DNS config
|
||||
cat /etc/resolv.conf
|
||||
|
||||
# Test DNS resolution
|
||||
ping -4 google.com
|
||||
|
||||
# If using Tailscale MagicDNS and it's failing:
|
||||
# Option 1: Disable Tailscale DNS management
|
||||
tailscale set --accept-dns=false
|
||||
|
||||
# Option 2: Add fallback DNS to systemd-resolved
|
||||
cat > /etc/systemd/resolved.conf.d/fix-dns.conf << 'EOF'
|
||||
[Resolve]
|
||||
DNS=8.8.8.8 1.1.1.1
|
||||
FallbackDNS=8.8.4.4 1.0.0.1
|
||||
EOF
|
||||
systemctl restart systemd-resolved
|
||||
|
||||
# Switch to systemd-resolved
|
||||
rm /etc/resolv.conf
|
||||
ln -s /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
|
||||
```
|
||||
|
||||
**Current DNS Configuration (as of Dec 2025):**
|
||||
- Tailscale DNS disabled (`--accept-dns=false`)
|
||||
- Using systemd-resolved with Google (8.8.8.8) and Cloudflare (1.1.1.1) DNS
|
||||
|
||||
---
|
||||
|
||||
### Reset Service Password
|
||||
|
||||
**Filebrowser:**
|
||||
@@ -643,3 +889,6 @@ df -h /srv
|
||||
| 2025-11-27 | Added Seafile setup |
|
||||
| 2025-11-27 | Added Git LFS for CAD versioning |
|
||||
| 2025-12-06 | Added Homepage dashboard documentation |
|
||||
| 2025-12-18 | Added 14TB WD Elements HDD for Immich storage and backups |
|
||||
| 2025-12-18 | Configured automated backup system (restic daily + weekly images) |
|
||||
| 2025-12-18 | Fixed DNS resolution issues (Tailscale MagicDNS → systemd-resolved) |
|
||||
|
||||
Reference in New Issue
Block a user