Immich
Docker Compose [Recommended]
Docker Compose is the recommended method to run Immich in production. Below are the steps to deploy Immich with Docker Compose.
Step 1 - Download the required files
Create a directory of your choice (e.g. ./immich-app
) to hold the docker-compose.yml
and .env
files.
mkdir ./immich-app
cd ./immich-app
Download docker-compose.yml
and example.env
, either by running the following commands:
wget https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
wget -O .env https://github.com/immich-app/immich/releases/latest/download/example.env
wget https://github.com/immich-app/immich/releases/latest/download/hwaccel.yml
or by downloading from your browser and moving the files to the directory that you created.
Note: If you downloaded the files from your browser, also ensure that you rename example.env
to .env
.
Optionally, you can use the hwaccel.yml
file to enable hardware acceleration for transcoding. See the Hardware Transcoding guide for info on how to set this up.
Step 2 - Populate the .env file with custom values
Example .env content
# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables
# The location where your uploaded files are stored
UPLOAD_LOCATION=/srv/path/Files/Immich/Upload
# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release
# Connection secrets for postgres and typesense. You should change these to random passwords
TYPESENSE_API_KEY=complicatedrandomkey
DB_PASSWORD=anothercomplicatedrandomkey
## Needed
IMMICH_WEB_URL=http://immich-web:3000
IMMICH_SERVER_URL=http://immich-server:3001
IMMICH_MACHINE_LEARNING_URL=http://immich-machine-learning:3003
# The values below this line do not need to be changed
###################################################################################
DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
REDIS_HOSTNAME=immich_redis
- Populate custom database information if necessary.
- Populate
UPLOAD_LOCATION
with your preferred location for storing backup assets. - Consider changing
DB_PASSWORD
to something randomly generated - Consider changing
TYPESENSE_API_KEY
to something randomly generated
Step 3 - Start the containers
From the directory you created in Step 1, (which should now contain your customized docker-compose.yml
and .env
files) run docker-compose up -d
.
docker-compose up -d # or `docker compose up -d` based on your docker-compose version
For more information on how to use the application, please refer to the Post Installation guide.
Note that downloading container images might require you to authenticate to the GitHub Container Registry (steps here).
Step 4 - Upgrading
If IMMICH_VERSION
is set, it will need to be updated to the latest or desired version.
When a new version of Immich is released, the application can be upgraded with the following commands, run in the directory with the docker-compose.yml
file:
docker-compose pull && docker-compose up -d # Or `docker compose up -d`
Automatic Updates
Immich is currently under heavy development, which means you can expect breaking changes and bugs. Therefore, we recommend reading the release notes prior to updating and to take special care when using automated tools like Watchtower.
Portainer
Install Immich using Portainer's Stack feature.
- Go to "Stacks" in the left sidebar.
- Click on "Add stack".
- Give the stack a name (i.e. Immich), and select "Web Editor" as the build method.
- Copy the content of the
docker-compose.yml
file from the GitHub repository. - Replace
.env
withstack.env
for all containers that need to use environment variables in the web editor.
- Click on "Advanced Mode" in the Environment Variables section.
- Copy the content of the
example.env
file from the GitHub repository and paste into the editor. - Switch back to "Simple Mode".
- Populate custom database information if necessary.
- Populate
UPLOAD_LOCATION
with your preferred location for storing backup assets.
- Click on "Deploy the stack".
For more information on how to use the application, please refer to the Post Installation guide.