A production-ready Docker Compose stack for running a self-hosted home server on Windows 10/11 Pro with Docker Desktop + WSL2. Includes photo management, smart home automation, media streaming, cloud storage, and automated backups.
| Service | Purpose | Port | Image |
|---|---|---|---|
| Immich | Photo/video management with AI | 2284 |
ghcr.io/immich-app/immich-server |
| Home Assistant | Smart home automation | 8123 |
ghcr.io/home-assistant/home-assistant |
| ownCloud | File sync & sharing | 8080 |
owncloud/server |
| Jellyfin | Media streaming (movies, music, video) | 8096 |
jellyfin/jellyfin |
| Music Assistant | Music library management | 8095 |
ghcr.io/music-assistant/server |
| Duplicati | Encrypted backups | 8200 |
duplicati/duplicati |
| Watchtower | Automatic container updates | — | containrrr/watchtower |
Supporting containers: PostgreSQL (Immich DB with VectorChord), two Redis instances (Immich + ownCloud).
┌─────────────────────────────────────────────────────────┐
│ Windows 10/11 Pro Host │
│ ┌───────────────────────────────────────────────────┐ │
│ │ Docker Desktop (WSL2) │ │
│ │ │ │
│ │ ┌─────────┐ ┌──────────┐ ┌─────────────────┐ │ │
│ │ │ Immich │ │ ownCloud │ │ Home Assistant │ │ │
│ │ │ Server │ │ │ │ │ │ │
│ │ │ + ML │ │ + Redis │ │ │ │ │
│ │ │ + DB │ │ │ │ │ │ │
│ │ │ + Redis│ │ │ │ │ │ │
│ │ └────┬────┘ └────┬─────┘ └────────┬────────┘ │ │
│ │ │ │ │ │ │
│ │ ┌────┴───┐ ┌─────┴────┐ ┌────────┴────────┐ │ │
│ │ │Jellyfin│ │ Music │ │ Duplicati │ │ │
│ │ │ │ │ Assistant│ │ + Watchtower │ │ │
│ │ └────────┘ └──────────┘ └─────────────────┘ │ │
│ └───────────────────────────────────────────────────┘ │
│ │
│ Storage Drives: │
│ F: (10TB Pool) ─── Media, photos, uploads │
│ L: (SSD) ─── Databases, configs, model cache │
│ K: (HDD) ─── Caches (Jellyfin transcodes) │
│ E: (External) ─── Backup destination │
└─────────────────────────────────────────────────────────┘
Hardware:
- 32GB RAM recommended (stack uses ~10-12GB under load)
- Multi-core CPU (4+ cores recommended)
- SSD for databases and configs
- Separate drive for media storage
Software:
- Windows 10/11 Pro
- Docker Desktop with WSL2 backend
- PowerShell 5.1+
Storage layout (customize paths in .env):
| Drive | Purpose | Recommended Type |
|---|---|---|
| F: | Media pool — photos, music, movies, Immich uploads | Large HDD/pool (NTFS) |
| L: | Databases, service configs, ML model cache | SSD (NTFS) |
| K: | Non-critical caches (Jellyfin transcodes) | HDD (NTFS) |
| E: | Backup destination | External USB drive |
git clone https://github.com/YOUR_USERNAME/windows-docker-homeserver.git
cd windows-docker-homeserverCopy-Item .env.example .envEdit .env with your actual passwords and paths. Never commit the .env file.
# SSD directories (adjust drive letters to match your system)
New-Item -ItemType Directory -Force -Path `
L:\docker\immich\pgdata, `
L:\docker\immich\model-cache, `
L:\docker\jellyfin\config, `
L:\docker\duplicati\config, `
L:\docker\owncloud\data, `
L:\docker\musicassistant\config
# Cache directory
New-Item -ItemType Directory -Force -Path K:\docker\jellyfin\cachedocker compose pull
docker compose up -ddocker compose psAll services should show running or healthy.
After starting, access your services at:
| Service | URL |
|---|---|
| Immich | http://localhost:2284 |
| Home Assistant | http://localhost:8123 |
| ownCloud | http://localhost:8080 |
| Jellyfin | http://localhost:8096 |
| Music Assistant | http://localhost:8095 |
| Duplicati | http://localhost:8200 |
For remote access via Tailscale, replace localhost with your Tailscale hostname (e.g., http://your-server.taild07057.ts.net:2284).
- Navigate to http://localhost:2284
- Create your admin account on first launch
- To add your existing photo library as an external library:
- Go to Administration → External Libraries
- Add path:
/mnt/media/photos(mapped read-only from yourPHOTOS_PATH)
- Navigate to http://localhost:8123
- Follow the onboarding wizard
- Config files are stored at your
HOMEASSISTANT_CONFIG_PATH
- Navigate to http://localhost:8080
- Log in with the admin credentials from your
.envfile - Your documents folder is mounted at
MyDocumentsinside ownCloud
- Navigate to http://localhost:8096
- Follow the setup wizard
- Add media libraries from
/media/music,/media/videos,/media/movies
This stack separates storage by performance requirements:
SSD (L: drive) — Anything that benefits from fast random I/O:
immich_pgdata— PostgreSQL database (VectorChord indexes, EXIF metadata)immich_model_cache— ML model weights (loaded at startup)jellyfin_config— Jellyfin metadata databaseowncloud_data— ownCloud file metadata and user dataduplicati_config— Backup job definitions and local databasemusicassistant_config— Music Assistant configuration
HDD/Cache (K: drive) — Expendable, regenerable data:
jellyfin_cache— Transcoded media cache
Media Pool (F: drive) — Bulk storage:
immich_upload— Immich's writable upload/thumbnail/library storage- Photos, music, movies, videos mounted read-only into respective containers
Approximate memory allocation with all services running:
| Service | Limit | Typical |
|---|---|---|
| Immich Server | 4 GB | 1-2 GB |
| Immich ML | 4 GB | 1-2 GB |
| Immich Postgres | 1 GB | 300-500 MB |
| Immich Redis | 384 MB | 50-100 MB |
| Home Assistant | 768 MB | 200-400 MB |
| ownCloud | 1 GB | 200-400 MB |
| ownCloud Redis | 192 MB | 30-50 MB |
| Jellyfin | 1.5 GB | 300-800 MB |
| Music Assistant | 512 MB | 100-200 MB |
| Duplicati | 1 GB | 100-300 MB |
| Watchtower | 128 MB | 20-30 MB |
| Total | ~14.5 GB | ~3-6 GB idle |
Watchtower automatically updates containers nightly at 3 AM. To manually update:
docker compose pull
docker compose down
docker compose up -dFor major Immich version bumps (e.g., v2 → v3), always:
- Back up the database first:
docker exec immich-postgres pg_dump -U immich immich > F:\immich_backup.sql
- Read the release notes for breaking changes
- Update the image tag in
docker-compose.yml - Pull and restart
Docker Desktop's VHDX file grows over time but doesn't shrink automatically. Use the included script to compact it:
# Run as Administrator
# This will stop Docker temporarily
.\scripts\trim-docker-vhdx.ps1Also useful before compacting:
docker system prune -a --volumes
docker image prune -aDuplicati runs inside the stack with read-only access to the entire F: drive and write access to E: (external backup drive). Configure backup jobs through the Duplicati web UI at http://localhost:8200.
Recommended backup targets:
- Immich PostgreSQL database (critical — use
pg_dumpregularly) - Home Assistant config directory
- ownCloud data
- Duplicati's own config
Docker Compose is strict about YAML indentation. Validate before starting:
docker compose config --quietIf you see vchord must be loaded via shared_preload_libraries, ensure you're using the official Immich Postgres image (ghcr.io/immich-app/postgres:14-vectorchord...), not the old tensorchord/pgvecto-rs image. The new image handles preloading automatically.
If Immich behaves oddly after a major upgrade, flush the Redis queue:
docker exec immich-redis redis-cli FLUSHALL
docker compose restart immich-serverIf the system becomes unresponsive:
# Check per-container memory usage
docker stats --no-stream --format "table {{.Name}}\t{{.MemUsage}}"Consider stopping non-essential services (Music Assistant, Jellyfin) during heavy Immich operations like initial library scans.
PostgreSQL running on NTFS (via Docker volumes) can have performance implications. For best results, keep the Postgres data on an SSD and use Docker named volumes (as configured in this stack) rather than direct bind mounts.
To add a new service, append it to docker-compose.yml under services: and add any named volumes to the volumes: section. Follow the existing pattern of resource limits and health checks.
Comment out or remove any service you don't need. The only hard dependency chain is:
immich-server → immich-postgres, immich-redis
immich-server → immich-machine-learning (optional but recommended)
owncloud → owncloud-redis
All other services are independent.
Update the paths in .env and the volumes: section at the bottom of docker-compose.yml to match your drive layout. Create the directories before starting.
- All services are exposed only on
localhostby default - Use Tailscale for secure remote access without exposing ports to the internet
- Change all default passwords in
.envbefore first run - The
.envfile contains secrets — it is excluded from version control via.gitignore - Watchtower is configured to only update running containers (
WATCHTOWER_INCLUDE_STOPPED=false)
This project is licensed under the MIT License. See LICENSE for details.
The individual services (Immich, Home Assistant, ownCloud, Jellyfin, etc.) are governed by their own respective licenses.