Configuration

Self-hosted Most of DataGerry’s settings are stored in its database and changed in the web interface. A few things have to be known before the database can be reached — the database connection itself, the port, TLS, and connections to external services. They live in two files. In the cloud, none of this is accessible; becon operates it.

File

Packages

Docker

cmdb.conf — backend

/etc/datagerry/cmdb.conf

/opt/DataGerry-docker/conf/cmdb.conf

app-config.json — frontend

/etc/datagerry/app-config.json

/opt/DataGerry-docker/conf/app-config.json

Restart DataGerry after every change: systemctl restart datagerry, or docker compose restart for Docker.

cmdb.conf

An INI file. The shipped default:

[Database]
host = 127.0.0.1
port = 27017
database_name = cmdb

[WebServer]
host = 0.0.0.0
port = 4000
# ssl = false
# certfile = /etc/ssl/certs/cmdb.pem
# keyfile = /etc/ssl/private/cmdb.key

# [OpenCelium]
# host = 127.0.0.1
# port = 9090
# protocol = http
# email = email
# user = username
# password = password

[ChatGPT]
api_key = <the api key>

Section

Key

Meaning

[Database]

host, port

Where MongoDB runs. Default 127.0.0.1:27017.

database_name

The MongoDB database DataGerry uses. Default cmdb.

[WebServer]

host, port

The address and port DataGerry listens on. Default 0.0.0.0:4000. Behind a reverse proxy on the same host, 127.0.0.1 is enough.

ssl, certfile, keyfile

Serve HTTPS directly. The datagerry user needs read access to both files. See Installing.

[OpenCelium]

host, port, protocol, email, user, password

The OpenCelium server that runs Automations. Leave the section commented out if you do not use Automations.

[ChatGPT]

api_key

OpenAI API key for the AI Assistant in the Document Generator (see Generate documents). Without a key the assistant shows as unavailable. The shipped file contains the placeholder <the api key>, which counts as a key — comment the line out if you do not use the assistant, or generation fails with an error from OpenAI.

Environment variables

Every value can also be set — and overridden — with an environment variable named DATAGERRY_<Section>_<key>, with the section name spelled as in the file:

DATAGERRY_Database_host=mongo.internal
DATAGERRY_Database_port=27018
DATAGERRY_WebServer_port=8080

The environment always wins over the file, and a section can exist only in the environment — a container can run without a cmdb.conf at all.

To connect to MongoDB with a full connection string — a replica set, authentication, or MongoDB Atlas — set CONNECTION_STRING instead of host and port:

CONNECTION_STRING='mongodb://datagerry:<password>@mongo1,mongo2,mongo3/?replicaSet=rs0'

A mongodb+srv:// connection string enables TLS to the database.

app-config.json

app-config.json describes where the DataGerry backend can be reached — by DNS name or IP address, protocol and port. The web interface runs in the user’s browser; when it starts, it reads this file from the backend and sends all further requests to the address given here. The address must therefore be the one the browser uses, not an address that only works on the server itself.

The shipped default:

{
  "protocol": "http",
  "apiUrl": "localhost",
  "apiPort": "4000"
}

Key

Meaning

protocol

http or https — as the browser reaches the backend.

apiUrl

The DNS name or IP address of the backend, without http:// and without a path — for example cmdb.example.com or 10.0.0.15. The default localhost only works when the browser runs on the server itself.

apiPort

The port. 0 means no port in the address, for example behind a reverse proxy on the standard ports 80 or 443.

All three keys must be set; an incomplete file is ignored and the built-in defaults are used.

Examples:

Setup

app-config.json

Browser reaches the backend directly on port 4000

{"protocol": "http", "apiUrl": "10.0.0.15", "apiPort": "4000"}

Behind nginx with TLS at https://cmdb.example.com

{"protocol": "https", "apiUrl": "cmdb.example.com", "apiPort": "0"}

When you change [WebServer] port in cmdb.conf and the browser talks to the backend directly, change apiPort here to the same value. With Docker, also update the port in docker-compose.yml and in the nginx configuration.

Settings in the web interface

Everything else is configured in DataGerry itself, under Settings:

  • Regional Settings — date format and time zone.

  • Authentication — login providers, LDAP and token lifetime; see Authentication.

  • License Management — see License Management.

  • System Information and Database Properties — version, runtime and database details, for support requests.

  • Object Logs — browse the change history of objects and delete log entries you no longer need.