Skip to content

Self-hosting Immich with Traefik and Coolify

1 min read

Immich is a self-hosted Google Photos alternative. I couldn’t install it through Coolify’s UI because of rclone volume mount issues, so I deployed it separately with Docker Compose and wired it into Coolify’s Traefik instance.

The Immich compose file

Standard Immich compose, but with a custom network added to every service:

networks:
  immich_network:
    driver: bridge

Add networks: [immich_network] to each service (immich-server, immich-machine-learning, redis, database).

Connect Traefik to Immich’s network

In Coolify’s Traefik compose, add the Immich network as external:

networks:
  coolify:
    external: true
  immich_immich_network:
    external: true

services:
  traefik:
    networks:
      - coolify
      - immich_immich_network

Add a Traefik dynamic config

Create a dynamic configuration file for the Immich route:

http:
  routers:
    immich:
      entryPoints:
        - https
      rule: Host(`immich.yourdomain.com`)
      service: immich-service
      tls:
        certResolver: letsencrypt
  services:
    immich-service:
      loadBalancer:
        servers:
          - url: 'http://immich-server:2283'

This tells Traefik to route immich.yourdomain.com to the Immich server container on port 2283, with automatic HTTPS via Let’s Encrypt.

Mount remote storage with rclone

If you want to store photos on a remote drive (like Google Drive), set up rclone:

sudo -v ; curl https://rclone.org/install.sh | sudo bash
rclone config

Follow the Google Drive setup guide, then mount:

rclone mount rclone:data ./data

You’ll need fuse3 installed (apt-get install fuse3 on Debian). Set up a systemd service for persistence.