DocHost
Guides

Install DocHost [Docker Compose]

KLKA
#self-host#docker#docker-compose

Requirements


Install using Docker Compose

Docker Compose is the recommended method to run DocHost in production. Below are the steps to deploy DocHost with Docker Compose.

Step 1 - Download the required files

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.

Step 2 - Populate the .env file with custom values

| 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

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:

| Start the containers

docker compose up -d

🎉 Access your selfhosted DocHost at http://localhost:5000.

← Back to docs