Automatically groups similar photos into stacks within the Immich photo management system.
# 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
# Optional: Enable file logging for persistent logs
# LOG_FILE=/app/logs/immich-stack.log
EOL
# Run with Docker (using 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
# View logs
docker logs -f immich-stack
# If LOG_FILE is set, logs are also saved to ./logs/immich-stack.logFor detailed documentation, please visit our documentation.
Immich Stack provides multiple commands for different operations:
immich-stackThe default command that processes and creates stacks based on your criteria.
immich-stack duplicatesScans your library and reports duplicate assets based on filename and timestamp.
immich-stack fix-trashIdentifies trashed assets and moves their related stack members to trash for consistency.
- Groups similar photos into stacks based on filename, date, and custom criteria.
- Detects burst sequences via the
sequencekeyword (Sony'sDSCPDC_0001_BURST, Canon'sIMG_0001, and similar patterns). - Lists duplicates by filename and capture time.
- Cleans up trash operations: moves stack members of trashed assets to trash too.
- Runs against multiple users in one go (comma-separated API keys).
- Lets you pick the stack parent by extension, filename pattern, regex, or size.
- Dry-run mode, stack replacement, and a confirmation-gated reset.
- Colorized, structured logs at configurable verbosity.
MIT