Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Windows Home Server Docker Stack

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.

Services

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).

Architecture

┌─────────────────────────────────────────────────────────┐
│  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                  │
└─────────────────────────────────────────────────────────┘

Requirements

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:

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

Quick Start

1. Clone the repository

git clone https://github.com/YOUR_USERNAME/windows-docker-homeserver.git
cd windows-docker-homeserver

2. Create your environment file

Copy-Item .env.example .env

Edit .env with your actual passwords and paths. Never commit the .env file.

3. Create required directories

# 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\cache

4. Start the stack

docker compose pull
docker compose up -d

5. Verify

docker compose ps

All services should show running or healthy.

Service Access

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).

Initial Setup

Immich

  1. Navigate to http://localhost:2284
  2. Create your admin account on first launch
  3. To add your existing photo library as an external library:
    • Go to Administration → External Libraries
    • Add path: /mnt/media/photos (mapped read-only from your PHOTOS_PATH)

Home Assistant

  1. Navigate to http://localhost:8123
  2. Follow the onboarding wizard
  3. Config files are stored at your HOMEASSISTANT_CONFIG_PATH

ownCloud

  1. Navigate to http://localhost:8080
  2. Log in with the admin credentials from your .env file
  3. Your documents folder is mounted at MyDocuments inside ownCloud

Jellyfin

  1. Navigate to http://localhost:8096
  2. Follow the setup wizard
  3. Add media libraries from /media/music, /media/videos, /media/movies

Storage Architecture

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 database
  • owncloud_data — ownCloud file metadata and user data
  • duplicati_config — Backup job definitions and local database
  • musicassistant_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

Memory Usage

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

Maintenance

Updating Services

Watchtower automatically updates containers nightly at 3 AM. To manually update:

docker compose pull
docker compose down
docker compose up -d

Immich Major Version Upgrades

For major Immich version bumps (e.g., v2 → v3), always:

  1. Back up the database first:
    docker exec immich-postgres pg_dump -U immich immich > F:\immich_backup.sql
  2. Read the release notes for breaking changes
  3. Update the image tag in docker-compose.yml
  4. Pull and restart

Reclaiming Disk Space

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.ps1

Also useful before compacting:

docker system prune -a --volumes
docker image prune -a

Backup Strategy

Duplicati 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_dump regularly)
  • Home Assistant config directory
  • ownCloud data
  • Duplicati's own config

Troubleshooting

YAML Parse Errors

Docker Compose is strict about YAML indentation. Validate before starting:

docker compose config --quiet

Immich Won't Start / VectorChord Errors

If 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.

Redis Job Queue Issues After Upgrade

If Immich behaves oddly after a major upgrade, flush the Redis queue:

docker exec immich-redis redis-cli FLUSHALL
docker compose restart immich-server

High Memory Usage

If 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.

NTFS and PostgreSQL

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.

Customization

Adding Services

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.

Disabling Services

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.

Changing Drive Letters

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.

Security Notes

  • All services are exposed only on localhost by default
  • Use Tailscale for secure remote access without exposing ports to the internet
  • Change all default passwords in .env before first run
  • The .env file contains secrets — it is excluded from version control via .gitignore
  • Watchtower is configured to only update running containers (WATCHTOWER_INCLUDE_STOPPED=false)

License

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.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages