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.
Move to the directory you created
mkdir ./immich-app
cd ./immich-app
Download docker-compose.yml
and example.env
by running the following commands:
Get docker-compose.yml file
wget -O docker-compose.yml https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
Get .env file
wget -O .env https://github.com/immich-app/immich/releases/latest/download/example.env
You can alternatively download these two files from your browser and move them to the directory that you created, in which case ensure that you rename example.env
to .env
.
Step 2 - Populate the .env file with custom values
Default environmental variable content
UPLOAD_LOCATION=./library
DB_DATA_LOCATION=./postgres
IMMICH_VERSION=release
DB_PASSWORD=postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
- Populate
UPLOAD_LOCATION
with your preferred location for storing backup assets. It should be a new directory on the server with enough free space. - Consider changing
DB_PASSWORD
to a custom value. Postgres is not publicly exposed, so this password is only used for local authentication. To avoid issues with Docker parsing this value, it is best to use only the characters A-Za-z0-9
. pwgen
is a handy utility for this. - Set your timezone by uncommenting the
TZ=
line. - Populate custom database information if necessary.
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 the following command to start Immich as a background service:
buka di localhost:2283
Tambah akses (scan folder) diluar folder immich
edit docker-compose.yml
tambah dibawah ini
immich-server:
volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
misalnya mau nambah /media/debian/IMAGE8/Sena-Immich/
# Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- /media/debian/IMAGE8/Sena-Immich:/media/debian/IMAGE8/Sena-Immich
Create the library
In the Immich web UI:
click the Administration link in the upper right corner.

Select the External Libraries tab

Click the Create Library button

In the dialog, select which user should own the new library

Click the three-dots menu and select Edit Import Paths

Click Add path

Enter /usr/src/app/external as the path and click Add

Save the new path

Click the three-dots menu and select Scan New Library Files

Confirm stuff is happening