Files
SERVtomaste/docs/DALIDOU-SERVER.md

646 lines
14 KiB
Markdown

# Dalidou Home Server - Complete Documentation
> **Last Updated:** December 6, 2025
> **Server Name:** dalidou
> **Owner:** Antoine Letarte
---
## Table of Contents
1. [Server Overview](#server-overview)
2. [Network Configuration](#network-configuration)
3. [User Accounts](#user-accounts)
4. [Installed Services](#installed-services)
5. [Service Details & Configuration](#service-details--configuration)
6. [Docker Infrastructure](#docker-infrastructure)
7. [Directory Structure](#directory-structure)
8. [Backup Strategy](#backup-strategy)
9. [Maintenance Commands](#maintenance-commands)
10. [Disaster Recovery](#disaster-recovery)
11. [Troubleshooting](#troubleshooting)
---
## Server Overview
### Hardware
- **Type:** Home server running Docker containers
- **OS:** Linux (Debian/Ubuntu-based)
- **Location:** Home network
### Purpose
Self-hosted infrastructure replacing cloud services:
- Google Photos → Immich
- Google Drive → Seafile
- Dropbox → Syncthing
- GitHub → Gitea
- Document management → Paperless-ngx
---
## Network Configuration
### IP Addresses
| Network | IP Address | Usage |
|---------|------------|-------|
| WiFi (Primary) | `192.168.86.50` | Main local access |
| Wired | `10.0.0.77` | Backup/alternate |
| Tailscale VPN | `100.80.199.40` | Remote access from anywhere |
### SSH Access
```bash
# Local network
ssh papa@192.168.86.50
# Via Tailscale (remote)
ssh papa@100.80.199.40
# Using hostname (if DNS configured)
ssh papa@dalidou
```
### Ports in Use
| Port | Service | Protocol |
|------|---------|----------|
| 22 | SSH (host) | TCP |
| 80 | Caddy (reverse proxy) | TCP |
| 2222 | Gitea SSH | TCP |
| 2283 | Immich | TCP |
| 3000 | Gitea Web | TCP |
| 3001 | Homepage Dashboard | TCP |
| 8080 | Home Assistant | TCP |
| 8081 | Filebrowser | TCP |
| 8082 | Paperless-ngx | TCP |
| 8083 | Seafile | TCP |
| 8384 | Syncthing Web UI | TCP |
| 21027 | Syncthing Discovery | UDP |
| 22000 | Syncthing Transfer | TCP/UDP |
---
## User Accounts
### System Users
| Username | Password | Role |
|----------|----------|------|
| papa | Ladygaga | Admin (SSH, sudo) |
### Service Accounts
| Service | Username | Password | Email |
|---------|----------|----------|-------|
| Gitea | Antoine | Ladygaga | antoine.letarte@gmail.com |
| Filebrowser | Antoine | Ladygaga2024 | - |
| Seafile | antoine.letarte@gmail.com | Ladygaga2025 | antoine.letarte@gmail.com |
| Immich | Antoine | (see Bitwarden) | antoine.letarte@gmail.com |
| Paperless | Antoine | (see Bitwarden) | - |
### Family Accounts
| Name | Password | Notes |
|------|----------|-------|
| Odile | Adalidou948 | Family member access |
---
## Installed Services
### Quick Access URLs
| Service | Local URL | Direct IP URL |
|---------|-----------|---------------|
| **Homepage** (Dashboard) | http://home.dalidou.home | http://192.168.86.50:3001 |
| **Immich** (Photos) | http://photos.dalidou.home | http://192.168.86.50:2283 |
| **Filebrowser** | http://files.dalidou.home | http://192.168.86.50:8081 |
| **Paperless** (Docs) | http://docs.dalidou.home | http://192.168.86.50:8082 |
| **Gitea** (Git) | http://git.dalidou.home | http://192.168.86.50:3000 |
| **Syncthing** | http://sync.dalidou.home | http://192.168.86.50:8384 |
| **Seafile** (Cloud) | http://cloud.dalidou.home | http://192.168.86.50:8083 |
| **Home Assistant** | - | http://192.168.86.50:8080 |
### Remote Access (Tailscale)
When away from home, use Tailscale IP:
- Immich: http://100.80.199.40:2283
- Seafile: http://100.80.199.40:8083
- Gitea: http://100.80.199.40:3000
- etc.
---
## Service Details & Configuration
### 1. Immich - Photo Management
**Purpose:** Google Photos replacement - backup, organize, and share photos
**Containers:**
- `immich_server` - Main application
- `immich_postgres` - Database
- `immich_redis` - Cache
**Data Location:** `/srv/immich/`
**Features:**
- Mobile app backup (iOS/Android)
- Face recognition
- Location mapping
- Sharing albums
**Mobile App:** "Immich" on App Store / Play Store
- Server URL: http://192.168.86.50:2283 (local) or http://100.80.199.40:2283 (remote)
---
### 2. Filebrowser - Web File Manager
**Purpose:** Browse and manage server files via web browser
**Container:** `filebrowser`
**Data Location:**
- Config: `/srv/filebrowser/config/`
- Database: `/srv/filebrowser/database/`
- Serves: `/srv/storage/shared/`
**Login:** Antoine / Ladygaga2024
**Use Cases:**
- Quick file access without SSH
- Share files with family
- Upload/download files
---
### 3. Paperless-ngx - Document Management
**Purpose:** Scan, OCR, organize, and search documents
**Containers:**
- `paperless` - Main application
- `paperless_postgres` - Database
- `paperless_redis` - Cache
**Data Location:** `/srv/paperless/`
**Features:**
- OCR scanning
- Full-text search
- Tagging and categorization
- Correspondent tracking
**Workflow:**
1. Scan documents to consume folder
2. Paperless auto-processes and OCRs
3. Search and organize in web UI
---
### 4. Gitea - Git Repository Hosting
**Purpose:** Self-hosted GitHub - version control for code and CAD files
**Containers:**
- `gitea` - Main application
- `gitea_postgres` - Database
**Data Location:** `/srv/gitea/`
**Configuration:**
- Web Port: 3000
- SSH Port: 2222
- LFS Enabled: Yes (for large CAD files)
- LFS Path: `/data/git/lfs`
**Git LFS:** Enabled for large file storage (CAD files, binaries)
**Clone via HTTPS:**
```bash
git clone http://192.168.86.50:3000/Antoine/CADTOMASTE.git
```
**Clone via SSH:**
```bash
git clone ssh://git@192.168.86.50:2222/Antoine/CADTOMASTE.git
```
---
### 5. Syncthing - File Synchronization
**Purpose:** Sync files between devices (like Dropbox but self-hosted)
**Container:** `syncthing`
**Data Location:** `/srv/syncthing/`
**Ports:**
- 8384: Web UI
- 22000: Sync (TCP/UDP)
- 21027: Discovery (UDP)
**Use Cases:**
- Sync folders between laptop and server
- Backup important directories
- Share folders with family
---
### 6. Seafile - Cloud Storage
**Purpose:** Self-hosted Google Drive / Dropbox alternative
**Containers:**
- `seafile` - Main application
- `seafile-mysql` - Database (MariaDB)
- `seafile-memcached` - Cache
**Data Location:** `/srv/seafile/`
**Configuration:**
- Web Port: 8083
- Admin: antoine.letarte@gmail.com / Ladygaga2025
- Timezone: America/Toronto
**Clients:**
- **SeaDrive (Windows):** Creates virtual drive letter (S:\)
- **Mobile App:** "Seafile" on App Store / Play Store
**Desktop Client Setup:**
1. Install SeaDrive from https://www.seafile.com/en/download/
2. Server: http://192.168.86.50:8083
3. Login with your credentials
4. Choose drive letter (e.g., S:\)
---
### 7. Home Assistant - Smart Home
**Purpose:** Home automation and smart device control
**Container:** `homeassistant`
**Access:** http://192.168.86.50:8080
**Additional:** Matter Server (`matter-server`) for Matter/Thread devices
---
### 8. Homepage - Server Dashboard
**Purpose:** Centralized dashboard to view and access all server services at a glance
**Container:** `homepage`
**Image:** `ghcr.io/gethomepage/homepage:latest`
**Data Location:** `/srv/homepage/`
**Configuration:**
- Web Port: 3001
- Theme: Dark (slate color)
- Docker integration enabled (monitors container status)
**Access:**
- Local: http://192.168.86.50:3001
- Wired: http://10.0.0.77:3001
- Tailscale: http://100.80.199.40:3001
**Features:**
- Real-time Docker container status monitoring
- Quick links to all services (Immich, Paperless, Gitea, Seafile, etc.)
- Customizable widgets and bookmarks
- Dark theme with clean interface
**Configuration Files:**
- `services.yaml` - Define services and their icons/links
- `settings.yaml` - Theme, layout, and general settings
- `widgets.yaml` - System widgets (CPU, memory, etc.)
- `bookmarks.yaml` - External bookmarks
- `docker.yaml` - Docker socket configuration
**Customization:**
```bash
# Edit service definitions
nano /srv/homepage/services.yaml
# Restart to apply changes
docker restart homepage
```
---
## Docker Infrastructure
### View Running Containers
```bash
ssh papa@192.168.86.50 "docker ps --format 'table {{.Names}}\t{{.Status}}\t{{.Ports}}'"
```
### Container Management
```bash
# Restart a service
docker restart <container_name>
# View logs
docker logs <container_name>
docker logs -f <container_name> # Follow logs
# Stop/Start
docker stop <container_name>
docker start <container_name>
# Check resource usage
docker stats
```
### Docker Compose Locations
| Service | Compose File Location |
|---------|----------------------|
| Seafile | `/srv/seafile/docker-compose.yml` |
| Immich | `/srv/immich/docker-compose.yml` |
| Gitea | `/srv/gitea/docker-compose.yml` |
| Paperless | `/srv/paperless/docker-compose.yml` |
| Homepage | `/home/papa/docker-compose.yml` |
### Restart All Services
```bash
cd /srv/<service>
docker compose down
docker compose up -d
```
---
## Directory Structure
```
/srv/
├── filebrowser/
│ ├── config/
│ └── database/
├── gitea/
│ ├── data/
│ │ └── git/
│ │ ├── repositories/
│ │ └── lfs/
│ └── postgres/
├── immich/
│ ├── upload/
│ ├── library/
│ └── postgres/
├── paperless/
│ ├── consume/ ← Drop documents here
│ ├── data/
│ ├── media/
│ └── postgres/
├── seafile/
│ ├── data/
│ │ └── seafile/
│ │ ├── conf/
│ │ └── seafile-data/
│ └── mysql/
├── syncthing/
│ └── config/
├── homepage/
│ ├── services.yaml ← Service definitions
│ ├── settings.yaml ← Theme and layout
│ ├── widgets.yaml ← Dashboard widgets
│ ├── bookmarks.yaml ← External links
│ └── docker.yaml ← Docker integration
└── storage/
└── shared/ ← Filebrowser root
```
---
## Backup Strategy
### Critical Data Locations
| 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 |
### Manual Backup Commands
```bash
# Backup Immich
tar -czvf immich-backup-$(date +%Y%m%d).tar.gz /srv/immich/
# Backup Paperless
tar -czvf paperless-backup-$(date +%Y%m%d).tar.gz /srv/paperless/
# Backup Gitea
tar -czvf gitea-backup-$(date +%Y%m%d).tar.gz /srv/gitea/
# Backup Seafile (stop first for consistency)
docker compose -f /srv/seafile/docker-compose.yml stop seafile
tar -czvf seafile-backup-$(date +%Y%m%d).tar.gz /srv/seafile/
docker compose -f /srv/seafile/docker-compose.yml start seafile
```
---
## Maintenance Commands
### System Updates
```bash
# Update system packages
sudo apt update && sudo apt upgrade -y
# Update Docker images
docker compose pull
docker compose up -d
```
### Check Disk Space
```bash
df -h /srv
du -sh /srv/*
```
### View All Container Logs
```bash
docker logs --tail 50 <container_name>
```
### Restart Docker
```bash
sudo systemctl restart docker
```
---
## Disaster Recovery
### If Server Fails - Rebuild Steps
1. **Install fresh Linux (Debian/Ubuntu)**
2. **Install Docker:**
```bash
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER
```
3. **Restore /srv from backup:**
```bash
sudo mkdir /srv
sudo tar -xzvf backup.tar.gz -C /
```
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
curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up
```
### Key Files to Backup
- All of `/srv/`
- `/etc/caddy/Caddyfile` (if using Caddy)
- Docker compose files (already in /srv/)
- This documentation!
---
## Troubleshooting
### Service Not Accessible
```bash
# Check if container is running
docker ps | grep <service>
# Check container logs
docker logs <container_name>
# Restart the service
docker restart <container_name>
```
### Port Already in Use
```bash
# Find what's using a port
sudo lsof -i :<port>
sudo netstat -tlnp | grep <port>
```
### Container Won't Start
```bash
# Check logs for errors
docker logs <container_name>
# Check disk space
df -h
# Check Docker status
sudo systemctl status docker
```
### Database Issues
```bash
# Enter postgres container
docker exec -it <postgres_container> psql -U <user> -d <database>
# Check database health
docker exec <postgres_container> pg_isready
```
### Reset Service Password
**Filebrowser:**
```bash
docker stop filebrowser
docker run --rm -v /srv/filebrowser/database:/database filebrowser/filebrowser \
users update admin --password newpassword -d /database/filebrowser.db
docker start filebrowser
```
**Gitea:**
```bash
docker exec -it gitea gitea admin user change-password --username Antoine --password newpassword
```
---
## Quick Reference Card
### SSH Access
```bash
ssh papa@192.168.86.50 # Local
ssh papa@100.80.199.40 # Tailscale
```
### Most Used Commands
```bash
# Check all containers
docker ps
# Restart a service
docker restart <name>
# View logs
docker logs -f <name>
# Disk space
df -h /srv
```
### Service URLs (Local)
- Dashboard: http://192.168.86.50:3001
- Photos: http://192.168.86.50:2283
- Files: http://192.168.86.50:8081
- Docs: http://192.168.86.50:8082
- Git: http://192.168.86.50:3000
- Cloud: http://192.168.86.50:8083
- Sync: http://192.168.86.50:8384
---
## Document History
| Date | Change |
|------|--------|
| 2025-11-27 | Initial documentation created |
| 2025-11-27 | Added Seafile setup |
| 2025-11-27 | Added Git LFS for CAD versioning |
| 2025-12-06 | Added Homepage dashboard documentation |