Maintenance and referenceEnvironment variables

Environment variables

Every environment variable that configures Bekci and its agents, with default values and how to set them.

On this page

Most of Bekci's settings are made in the panel. A few server-level settings are passed as environment variables when the container starts. None of them is required; we only recommend setting BASE_URL.

How to set them#

Docker Compose

Add them under environment: in docker-compose.yml, then run docker compose up -d:

/opt/bekci/docker-compose.yml (excerpt)
    environment:
      BASE_URL: https://bekci.example.com
      TZ: Europe/Istanbul
      LOG_LEVEL: info

In the Caddy install you change BASE_URL, TZ, LOG_LEVEL and MAX_CONCURRENT_CHECKS in the .env file.

docker run

Add one -e NAME=value per variable. Variables are read when the container is created, so you need to delete the container and recreate it with the same volume (example).

Coolify

Add them under the application's Environment Variables and redeploy.

Bekci (the main application)#

VariableDefaultDescription
BASE_URL—The address the panel is reached at from outside, e.g. https://bekci.example.com. Links in notifications and server agent install commands use it. If empty, install commands use the address the request came in on. A status page custom domain can't be the same as this address.
TZEurope/IstanbulTime zone: daily summaries and the time of the nightly backup follow it. E.g. Europe/Berlin, UTC.
LOG_LEVELinfoLog detail: debug, info, warn or error.
MAX_CONCURRENT_CHECKS50The maximum number of checks running at the same time. Can be raised for hundreds of monitors.
DATABASE_URL—If set, PostgreSQL is used instead of SQLite: postgres://user:password@host:5432/database?sslmode=disable. Must start with postgres:// or postgresql://. Bekci then takes no nightly backup; back up on the database side. Ignored by the postgres image (it always uses its embedded database).
DATA_DIR/dataFolder for the SQLite database and backups. No need to change it in Docker; mount the volume at /data.
ADDR:8080Address and port to listen on inside the container.
TRUSTED_PROXY—Trusted reverse proxy networks as a comma-separated CIDR list (e.g. 172.17.0.1/32,10.0.0.0/8). When set, the X-Forwarded-For header is only trusted on connections from these networks. When empty, all private and local addresses are trusted (details).
UPTIME_LOCK_WAIT600How many seconds a second copy using the same data folder waits at most for the first one to stop. When the time is up it exits with an error.
AGENT_DIR/usr/local/share/uptime/agentsFolder with the agent programs for other platforms. Ready in the official image; don't change it.
PROBE_IMAGE—If set, the check location install command uses this Docker image instead of downloading the program.

Server agent and check location#

The install command from the panel sets these for you (in /etc/uptime-agent.env, /etc/uptime-probe.env or, on Windows, C:\Program Files\Uptime\agent.env). Normally you don't need to touch them.

VariableDefaultDescription
PROBE_SERVER—The panel's address (BASE_URL), e.g. https://bekci.example.com.
PROBE_TOKEN—The token given by the panel (starts with upr_).
PROBE_ALLOW_INSECURE—1 allows connecting to an unencrypted http:// address (not recommended).
MAX_CONCURRENT_CHECKS20The maximum number of simultaneous checks on a check location.
METRICS10 turns off collecting server metrics entirely.
ADDR:8080The agent's health check address; - turns it off (install commands use -).
HOST_PROC, HOST_SYS, HOST_ETC, HOST_ROOT—Where the server's /proc, /sys, /etc and root directory are mounted when the agent runs in Docker. The Docker install command sets them.
DOCKER_HOSTunix:///var/run/docker.sockDocker API address for container metrics.

The .env file of the Caddy install#

The /opt/bekci/.env file of the Caddy install reads these values:

VariableDescription
UPTIME_DOMAINThe panel's domain (without https://). BASE_URL is built from it. Required.
ACME_EMAILEmail for Let's Encrypt notices. Required.
UPTIME_TAGImage tag: latest, postgres, 1.0.0, 1.0.0-postgres… Default latest.
STATUS_DOMAINOptional: a separate domain for the status page (details).
TZ, LOG_LEVEL, MAX_CONCURRENT_CHECKSSame as in the table above.