# Building a Self-Hosted Photo Library That Lasts

A self-hosted photo library gives you control over storage, metadata, and access without depending on a commercial cloud provider. My setup runs Immich on a small home server with mirrored disks, while the mobile app automatically uploads new photos over Wi-Fi. The result feels similar to a hosted service, but the original files remain on hardware I manage.

## Storage and Deployment

The application runs in Docker Compose alongside PostgreSQL and Redis. Photos are stored outside the container volumes so they remain easy to inspect, back up, and migrate. I also pin container versions instead of tracking `latest`, which prevents an automatic update from introducing an unexpected database migration.

```yaml
services:
  immich-server:
    image: ghcr.io/immich-app/immich-server:v1.142.1
    volumes:
      - /srv/photos/library:/usr/src/app/upload
    restart: unless-stopped
```

## Network Access

Remote access is provided through a reverse proxy with HTTPS and single sign-on. The server itself is not directly exposed to the internet; only ports 80 and 443 reach the proxy, while database and cache services stay on an internal Docker network. For administrative work, I connect through a VPN rather than publishing SSH.

## Backups and Recovery

Mirrored disks protect against one drive failing, but they are not a backup. Each night, the photo directory and database dump are copied to encrypted external storage, and a second copy is sent off-site. I periodically restore a sample database and several image directories to verify that the backup is usable rather than merely present.

## Operational Lessons

The most important maintenance tasks are monitoring free disk space, preserving database consistency, and documenting upgrades. Machine-learning indexes and thumbnails can usually be regenerated, but original photos and metadata cannot. Keeping those assets separate, versioned, and tested makes the library portable enough to survive both hardware failures and future software changes.