> ## Documentation Index
> Fetch the complete documentation index at: https://docs.levelrail.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Self-host Immich with Docker

> Self-hosted photo and video backup with mobile apps, facial recognition, and timeline search.

Self-hosted photo and video backup with mobile apps, facial recognition, and timeline search.

This page describes the Levelrail template for Immich (Media). It deploys the services below as one Docker Compose app on your own server. Project site: [https://immich.app/docs](https://immich.app/docs).

Recommended memory: about 1536 MiB.

## Services, ports and volumes

| Service | Image | Container ports | Volumes |
| - | - | - | - |
| `db` | `ghcr.io/immich-app/postgres:14-vectorchord0.3.0-pgvectors0.2.0` | none | `immich_db_data -&#62; /var/lib/postgresql/data` |
| `immich-machine-learning` | `ghcr.io/immich-app/immich-machine-learning:v1.126.1` | none | `immich_ml_cache -&#62; /cache` |
| `immich-server` | `ghcr.io/immich-app/immich-server:v1.126.1` | 2283 | `immich_upload_data -&#62; /usr/src/app/upload` |
| `redis` | `redis:7.4-alpine` | none | none |

## Environment variables

| Service | Variable | Value |
| - | - | - |
| `db` | `POSTGRES_DB` | Preset in the template |
| `db` | `POSTGRES_PASSWORD` | Generated at deploy |
| `db` | `POSTGRES_USER` | Preset in the template |
| `immich-server` | `DB_DATABASE_NAME` | Preset in the template |
| `immich-server` | `DB_HOSTNAME` | Preset in the template |
| `immich-server` | `DB_PASSWORD` | Generated at deploy |
| `immich-server` | `DB_USERNAME` | Preset in the template |
| `immich-server` | `REDIS_HOSTNAME` | Preset in the template |

Passwords and keys marked as generated are created for you when the app is deployed and stored as secrets. Values are not shown here.

## Deploy Immich with Levelrail

In the dashboard, open **Apps**, choose **New app**, then **Browse templates**, and select Immich. Review the Compose body and deploy.

With the CLI:

```bash theme={"dark"}
levelrail-cli templates deploy immich --name my-immich
```

See the [service template catalog](/templates-and-registry) for how templates work, and [Getting started](/getting-started) if you have not installed Levelrail yet.

## More Media templates

* [Audiobookshelf](/self-host/audiobookshelf)
* [Bazarr](/self-host/bazarr)
* [Calibre-Web](/self-host/calibre-web)
* [Castopod](/self-host/castopod)
* [Emby](/self-host/emby)

All templates are listed in the [self-host gallery](/self-host).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.