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_LOCATIONwith your preferred location for storing backup assets. - Consider changing
DB_PASSWORDto something randomly generated - Consider changing
TYPESENSE_API_KEYto 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.