Skip to main content Link Search Menu Expand Document (external link)

Installation Guide for Linux

This guide provides step-by-step instructions for the manual installation of DocIntel on a Linux system.

This guide has been tested on Ubuntu 22.04 LTS but should work properly with other Linux variants.

Install Docker

Install Docker on your system by following the instructions on the Docker website. Check that Docker is properly installed and running with the following command.

docker info

Setup Directories and Variables

In the following guide, we will install DocIntel data in /data and its configuration in /config.

export DOCINTEL_DATA=/data
export DOCINTEL_CONFIG=/config

Create the necessary folders

mkdir -p $DOCINTEL_DATA
mkdir -p $DOCINTEL_DATA/files
mkdir -p $DOCINTEL_DATA/lock
mkdir -p $DOCINTEL_CONFIG/lock

We also use passwords for PostgreSQL and Vertex Synapse. We recommend you to set strong passwords.

export POSTGRES_PASSWORD=MyVerySecretPassword
export SYNAPSE_PASSWORD=MyVerySecretPassword

Configure PostgreSQL

Create and configure a Docker container running a PostgreSQL database instance that will be used for the DocIntel application.

Create the folder used for database persistence. We recommend you to backup this folder on production instances.

mkdir -p $DOCINTEL_DATA/postgres

Create and configure a Docker container.

docker run --name docintel-dev-postgresql \
  -e POSTGRES_PASSWORD=$POSTGRES_PASSWORD \
  -e PGUSER=postgres \
  -v $DOCINTEL_DATA/postgres/:/var/lib/postgresql/data \
  -d postgres

Wait for PostgreSQL to be up-and-running and then install the required Postgres extension and create the database for DocIntel.

docker exec docintel-dev-postgresql psql -c 'CREATE EXTENSION IF NOT EXISTS "uuid-ossp";'
docker exec docintel-dev-postgresql psql -c 'CREATE DATABASE "docintel";'

You can now stop and remove that container. We will re-create it when we setup the Docker deployement.

docker stop docintel-dev-postgresql
docker rm docintel-dev-postgresql

Configure Apache SolR

Create and configure a Docker container running an Apache SolR instance that will be used for the DocIntel application.

Create the folder used for Apache SolR persistence. Make sure that the permissions are correct for the container. We recommend you to backup this folder on production instances.

mkdir -p $DOCINTEL_DATA/solr
chown 8983:8983 $DOCINTEL_DATA/solr

Create and configure a Docker container.

docker run --name docintel-dev-solr \
  -v $DOCINTEL_DATA/solr/:/var/solr \
  -d solr

Create and configure the Apache SolR cores used by DocIntel.

docker exec -it docintel-dev-solr solr create_core -c document
curl https://raw.githubusercontent.com/docintelapp/DocIntel/main/conf/solrconfig-document.xml \
  -o $DOCINTEL_DATA/solr/data/document/conf/solrconfig.xml
curl https://raw.githubusercontent.com/docintelapp/DocIntel/main/conf/managed-schema-document \
  -o $DOCINTEL_DATA/solr/data/document/conf/managed-schema.xml 
  
docker exec -it docintel-dev-solr solr create_core -c tag
curl https://raw.githubusercontent.com/docintelapp/DocIntel/main/conf/solrconfig-tag.xml \
  -o $DOCINTEL_DATA/solr/data/tag/conf/solrconfig.xml
curl https://raw.githubusercontent.com/docintelapp/DocIntel/main/conf/managed-schema-tag \
  -o $DOCINTEL_DATA/solr/data/tag/conf/managed-schema.xml 

docker exec -it docintel-dev-solr solr create_core -c source
curl https://raw.githubusercontent.com/docintelapp/DocIntel/main/conf/solrconfig-source.xml \
  -o $DOCINTEL_DATA/solr/data/source/conf/solrconfig.xml
curl https://raw.githubusercontent.com/docintelapp/DocIntel/main/conf/managed-schema-source \
  -o $DOCINTEL_DATA/solr/data/source/conf/managed-schema.xml 

docker exec -it docintel-dev-solr solr create_core -c facet
curl https://raw.githubusercontent.com/docintelapp/DocIntel/main/conf/solrconfig-facet.xml \
  -o $DOCINTEL_DATA/solr/data/facet/conf/solrconfig.xml
curl https://raw.githubusercontent.com/docintelapp/DocIntel/main/conf/managed-schema-facet \
  -o $DOCINTEL_DATA/solr/data/facet/conf/managed-schema.xml

You can now stop and remove that container. We will re-create it when we setup the Docker deployement.

docker stop docintel-dev-solr
docker rm docintel-dev-solr

Configure RabbitMQ

Create the folder used for RabbitMQ persistence. We recommend you to backup this folder on production instances.

mkdir -p $DOCINTEL_DATA/rabbitmq

Create and configure a Docker container.

docker run --name docintel-dev-rabbitmq -d -p 5672:5672 -p 15672:15672 \
-v $DOCINTEL_DATA/rabbitmq/:/var/lib/rabbitmq/mnesia/ \
rabbitmq:latest

Install the management pluging.

docker exec -it docintel-dev-rabbitmq rabbitmq-plugins enable rabbitmq_management

You can now stop and remove that container. We will re-create it when we setup the Docker deployement.

docker stop docintel-dev-rabbitmq
docker rm docintel-dev-rabbitmq

Prepare Docker Deployment

Create the compose file for the Docker deployment.

curl https://raw.githubusercontent.com/docintelapp/DocIntel/main/conf/docker-compose.yml.example \
   -o $DOCINTEL_CONFIG/docker-compose.yml

Replace the variables with your custom values. The table below provides default value.

Variable Value
_POSTGRES_USER_ postgres
_POSTGRES_PW_ $POSTGRES_PASSWORD
_POSTGRES_DB_ docintel
_POSTGRES_PORT_ 5432
_POSTGRES_HOST_ docintel-dev-postgres
_SYNAPSE_URL_ tcp://root:$SYNAPSE_PASSWORD@docintel-dev-synapse:27492
_RABBITMQ_HOST_ docintel-dev-rabbitmq
_RABBITMQ_VHOST_ /
_RABBITMQ_USER_ guest
_RABBITMQ_PW_ guest
_SOLR_URL_ http://docintel-dev-solr:8983

For example, you could use sed

sed -i.bck "s~_DOCINTEL_CONFIG_~$DOCINTEL_CONFIG~g" $DOCINTEL_CONFIG/docker-compose.yml
sed -i.bck "s~_DOCINTEL_DATA_~$DOCINTEL_DATA~g" $DOCINTEL_CONFIG/docker-compose.yml
sed -i.bck "s~_POSTGRES_USER_~postgres~g" $DOCINTEL_CONFIG/docker-compose.yml
sed -i.bck "s~_POSTGRES_HOST_~docintel-dev-postgres~g" $DOCINTEL_CONFIG/docker-compose.yml
sed -i.bck "s~_POSTGRES_PW_~$POSTGRES_PASSWORD~g" $DOCINTEL_CONFIG/docker-compose.yml
sed -i.bck "s~_POSTGRES_DB_~docintel~g" $DOCINTEL_CONFIG/docker-compose.yml
sed -i.bck "s~_POSTGRES_PORT_~5432~g" $DOCINTEL_CONFIG/docker-compose.yml
sed -i.bck "s~_SYNAPSE_URL_~tcp://root:$SYNAPSE_PASSWORD@docintel-dev-synapse:27492~g" $DOCINTEL_CONFIG/docker-compose.yml
sed -i.bck "s~_RABBITMQ_HOST_~docintel-dev-rabbitmq~g" $DOCINTEL_CONFIG/docker-compose.yml
sed -i.bck "s~_RABBITMQ_VHOST_~/~g" $DOCINTEL_CONFIG/docker-compose.yml
sed -i.bck "s~_RABBITMQ_USER_~guest~g" $DOCINTEL_CONFIG/docker-compose.yml
sed -i.bck "s~_RABBITMQ_PW_~guest~g" $DOCINTEL_CONFIG/docker-compose.yml
sed -i.bck "s~_SOLR_URL_~http://docintel-dev-solr:8983~g" $DOCINTEL_CONFIG/docker-compose.yml

Configure DocIntel

Create the configuration files for DocIntel

curl https://raw.githubusercontent.com/docintelapp/DocIntel/main/conf/appsettings.json.example \
  -o $DOCINTEL_CONFIG/appsettings.json
curl https://raw.githubusercontent.com/docintelapp/DocIntel/main/conf/nlog.config.example \
  -o $DOCINTEL_CONFIG/nlog.config

After downloading the configuration file, replace the various variables in the file with your own values, as shown in the previous step. For additional information on logging and its configuration, please refer to the Administration/Logging page page.

For example, you could use sed

sed -i.bck "s~_DOCINTEL_CONFIG_~$DOCINTEL_CONFIG~g" $DOCINTEL_CONFIG/appsettings.json
sed -i.bck "s~_DOCINTEL_DATA_~$DOCINTEL_DATA~g" $DOCINTEL_CONFIG/appsettings.json
sed -i.bck "s~_POSTGRES_USER_~postgres~g" $DOCINTEL_CONFIG/appsettings.json
sed -i.bck "s~_POSTGRES_HOST_~docintel-dev-postgres~g" $DOCINTEL_CONFIG/appsettings.json
sed -i.bck "s~_POSTGRES_PW_~$POSTGRES_PASSWORD~g" $DOCINTEL_CONFIG/appsettings.json
sed -i.bck "s~_POSTGRES_DB_~docintel~g" $DOCINTEL_CONFIG/appsettings.json
sed -i.bck "s~_POSTGRES_PORT_~5432~g" $DOCINTEL_CONFIG/appsettings.json
sed -i.bck "s~_SYNAPSE_URL_~tcp://root:$SYNAPSE_PASSWORD@docintel-dev-synapse:27492~g" $DOCINTEL_CONFIG/appsettings.json
sed -i.bck "s~_RABBITMQ_HOST_~docintel-dev-rabbitmq~g" $DOCINTEL_CONFIG/appsettings.json
sed -i.bck "s~_RABBITMQ_VHOST_~/~g" $DOCINTEL_CONFIG/appsettings.json
sed -i.bck "s~_RABBITMQ_USER_~guest~g" $DOCINTEL_CONFIG/appsettings.json
sed -i.bck "s~_RABBITMQ_PW_~guest~g" $DOCINTEL_CONFIG/appsettings.json
sed -i.bck "s~_SOLR_URL_~http://docintel-dev-solr:8983~g" $DOCINTEL_CONFIG/appsettings.json

sed -i.bck "s~_DOCINTEL_CONFIG_~$DOCINTEL_CONFIG~g" $DOCINTEL_CONFIG/nlog.config
sed -i.bck "s~_DOCINTEL_DATA_~$DOCINTEL_DATA~g" $DOCINTEL_CONFIG/nlog.config
sed -i.bck "s~_POSTGRES_USER_~postgres~g" $DOCINTEL_CONFIG/nlog.config
sed -i.bck "s~_POSTGRES_HOST_~docintel-dev-postgres~g" $DOCINTEL_CONFIG/nlog.config
sed -i.bck "s~_POSTGRES_PW_~$POSTGRES_PASSWORD~g" $DOCINTEL_CONFIG/nlog.config
sed -i.bck "s~_POSTGRES_DB_~docintel~g" $DOCINTEL_CONFIG/nlog.config
sed -i.bck "s~_POSTGRES_PORT_~5432~g" $DOCINTEL_CONFIG/nlog.config
sed -i.bck "s~_SYNAPSE_URL_~tcp://root:$SYNAPSE_PASSWORD@docintel-dev-synapse:27492~g" $DOCINTEL_CONFIG/nlog.config
sed -i.bck "s~_RABBITMQ_HOST_~docintel-dev-rabbitmq~g" $DOCINTEL_CONFIG/nlog.config
sed -i.bck "s~_RABBITMQ_VHOST_~/~g" $DOCINTEL_CONFIG/nlog.config
sed -i.bck "s~_RABBITMQ_USER_~guest~g" $DOCINTEL_CONFIG/nlog.config
sed -i.bck "s~_RABBITMQ_PW_~guest~g" $DOCINTEL_CONFIG/nlog.config
sed -i.bck "s~_SOLR_URL_~http://docintel-dev-solr:8983~g" $DOCINTEL_CONFIG/nlog.config

Run DocIntel

DocIntel is now configured and ready to run

docker compose -f docker-compose.yml -p docintel-dev up -d

You might need to restart the docintel containers if the containers for Apache SolR, Vertex Synapse, PostgreSQL, or RabbitMQ did not start fast enough. You can just re-type the compose command above.

To access DocIntel, it is necessary to create an account. Without an account, it will not be possible to log in. To ensure the security of your account, it is recommended that you create a specific admin account that is not used for your daily tasks. This will help to prevent any potential security issues that may arise from using the same account for administrative tasks and daily use.

docker exec -it docintel-dev-webapp \
  dotnet /cli/DocIntel.AdminConsole.dll \
  user add --username admin
docker exec -it docintel-dev-webapp \
  dotnet /cli/DocIntel.AdminConsole.dll \
  user role --username admin --role administrator

You can now login on http://localhost:5005.