Skip to content

Docker Integration

Quick Start

Run Immich Stack using Docker:

# Create a .env file
cat > .env << EOL
API_KEY=your_immich_api_key
API_URL=http://immich-server:2283/api
RUN_MODE=cron
CRON_INTERVAL=60
EOL

# Run with Docker Hub
docker run -d --name immich-stack --env-file .env -v ./logs:/app/logs majorfi/immich-stack:latest

# Or using GitHub Container Registry
docker run -d --name immich-stack --env-file .env -v ./logs:/app/logs ghcr.io/majorfi/immich-stack:latest

Image Sources

Immich Stack is available from two container registries:

  1. Docker Hub (recommended for Portainer):
docker pull majorfi/immich-stack:latest
  1. GitHub Container Registry:
    docker pull ghcr.io/majorfi/immich-stack:latest
    

Container Configuration

Environment Variables

All configuration is done through environment variables. See Environment Variables for details.

Volumes

The container uses one volume:

  • /app/logs: For storing log files
    -v ./logs:/app/logs
    

Network

When running with Immich, use the same Docker network:

--network immich_default

Building Locally

Build the Docker image locally:

# Clone the repository
git clone https://github.com/majorfi/immich-stack.git
cd immich-stack

# Build the image
docker build -t immich-stack .

# Run the container
docker run -d \
  --name immich-stack \
  --env-file .env \
  -v ./logs:/app/logs \
  immich-stack

Container Management

View Logs

# View logs
docker logs immich-stack

# Follow logs
docker logs -f immich-stack

Stop Container

docker stop immich-stack

Remove Container

docker rm immich-stack

Update Container

# Pull new image
docker pull majorfi/immich-stack:latest

# Stop and remove old container
docker stop immich-stack
docker rm immich-stack

# Run new container
docker run -d \
  --name immich-stack \
  --env-file .env \
  -v ./logs:/app/logs \
  majorfi/immich-stack:latest

Best Practices

  1. Version Pinning:

  2. Use specific versions in production

  3. Test new versions before updating

  4. Resource Limits:

  5. Set memory limits for large libraries

  6. Monitor container resource usage

  7. Backup:

  8. Backup your .env file

  9. Consider backing up logs

  10. Security:

  11. Use Docker secrets for sensitive data
  12. Restrict container capabilities
  13. Use non-root user