-->
Docker Compose is the recommended method to run DocHost in production. Below are the steps to deploy DocHost with Docker Compose.
Create a directory of your choice (e.g. ./dochost
) to hold the docker-compose.yml
and .env
files.
| Move to the directory you created.
mkdir ./dochost
cd ./dochost
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/kamalkoranga/dochost/releases/latest/download/docker-compose.yml
| Get .env file
wget -O .env https://github.com/kamalkoranga/dochost/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
.
| Default environmental variable content
# The location where your uploaded files are stored.
DRIVE_PATH=./users_drives
# The location where your metadata/user data are stored.
DATABASE_PATH=./postgres_data
# Connection secret for postgres. You should change it to a random password
# Please use only the characters `A-Za-z0-9`, without special characters or spaces
POSTGRES_PASSWORD=postgres
# This can be generated at google cloud console
# under APIs & Services > Credentials >Create Credentials
GOOGLE_CLIENT_ID=YOUR_GOOGLE_CLIENT_ID_HERE
GOOGLE_CLIENT_SECRET=YOUR_GOOGLE_CLIENT_SECRET_HERE
# The values below this line do not need to be changed
###################################################################################
POSTGRES_USER=postgres
POSTGRES_DB=postgres
FLASK_APP=dochost.py
DRIVE_PATH
with your preferred location for storing files. It should be a new directory on the server with enough free space.POSTGRES_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.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:
| Start the containers
docker compose up -d
🎉 Access your selfhosted DocHost at http://localhost:5000.