Install
Installation

Configuration reference

Every environment variable the Relic server and worker read.

Relic reads its configuration from environment variables. relic server start, relic server worker and relic server migrate take --settings <file>, which first sets the variables of a file of KEY=value lines, replacing ones already set; give the server and the worker the same file. Blank lines and lines starting with # are skipped, and quotes around a value are dropped. A line with export, or with spaces around =, stops the command with an error that names the line.

Durations use Go syntax (90s, 10m, 336h). Switches take true or false. Feed URLs take an http or https URL, or off. If any variable is wrong, Relic refuses to start and lists every error.

Core

VariableDefaultMeaning
RELIC_HTTP_LISTEN_ADDRESS:8090Listen address, host:port or :port. Serves HTTPS unless the server runs with --no-tls.
RELIC_DATABASE_URL(required)A PostgreSQL URL, such as postgres://relic:<password>@db:5432/relic?sslmode=require, or a SQLite file for a single node, such as sqlite:///var/lib/relic/data/relic.db (Single node).
RELIC_ADMIN_USERNAME, RELIC_ADMIN_PASSWORDadmin, (none)The first administrator, created when no user exists. The password needs at least 8 characters, as every user password does.
RELIC_ENCRYPTION_KEY(none)32 bytes in base64 (openssl rand -base64 32). Seals token signing keys, signing key pairs, and the upstream, replication and LDAP manager passwords. See Secrets at rest.
RELIC_UPSTREAM_ALLOW_PRIVATE_ADDRESSESfalsetrue lets remote repositories and replication reach loopback, private and link-local addresses.
RELIC_UPSTREAM_CA_CERTIFICATE_FILE(none)A PEM file of extra CA certificates, trusted besides the system roots, for the servers remote repositories and replication connect to. Set it on the server and the worker. See Trusting the authority.
RELIC_WEBHOOK_ALLOW_PRIVATE_ADDRESSESfalsetrue lets webhooks reach loopback, private and link-local addresses.

TLS

relic server start serves HTTPS: TLS 1.3 (with the hybrid post-quantum X25519MLKEM768 key exchange), and TLS 1.2 with ECDHE and AES-GCM or ChaCha20-Poly1305 only. Older versions and CBC suites are refused.

relic server start --no-tls serves plain HTTP, for use behind a proxy that terminates TLS. List that proxy in RELIC_TRUSTED_PROXIES (Behind a reverse proxy). The metrics listener always serves plain HTTP.

VariableDefaultMeaning
RELIC_TLS_CERTIFICATE_FILE, RELIC_TLS_KEY_FILE(none)Your certificate chain and private key, as PEM files. Set both or neither. Reloaded when either changes; a pair that does not load is logged as a warning and the previous certificate stays in use.
RELIC_TLS_DIRECTORY$XDG_CONFIG_HOME/relic/tls, or ~/.config/relic/tls; /etc/relic/tls in the imageWhere Relic keeps the certificate authority and certificate it generates when you give it none.
RELIC_TLS_MIN_VERSION1.21.2 or 1.3.
RELIC_TLS_HOSTNAMES(none)Comma-separated host names (*. allowed in front) and IP addresses to add to the generated certificate.

The generated certificate authority

Without your own certificate, Relic creates these files in RELIC_TLS_DIRECTORY:

FileHolds
ca.crt, ca.keyA certificate authority, valid for 10 years. The key has mode 0600.
server.crt, server.keyThe server certificate, valid for 90 days. Relic issues a new one at every start and 30 days before it expires.

The keys are ECDSA P-384. The server certificate holds localhost, 127.0.0.1, ::1, the host name, the interface addresses, the host of RELIC_HTTP_LISTEN_ADDRESS and RELIC_TLS_HOSTNAMES. Add the name clients use, such as relic.example.com, to RELIC_TLS_HOSTNAMES.

At start, the server logs the path of ca.crt and its SHA-256 fingerprint. Give clients ca.crt; keep ca.key on the server. Keep the directory across restarts and upgrades: if it is lost, Relic creates a new authority that every client has to trust again.

Each server creates its own authority. Behind one load balancer, give every server the same RELIC_TLS_CERTIFICATE_FILE and RELIC_TLS_KEY_FILE.

Trusting the authority

Clients need a private authority's certificate:

ClientWhere the certificate goes
relic CLI--ca-file ca.crt on relic auth login, or accept the fingerprint it shows (Sign in).
Browsers and other toolsThe operating system's trust store.
npmcafile in .npmrc.
pip--cert ca.crt, or PIP_CERT.
GoSSL_CERT_FILE.
Docker/etc/docker/certs.d/<host:port>/ca.crt on each machine that pushes or pulls.
Maven, GradleThe JVM trust store.
Another Relic server (remote repositories, replication)RELIC_UPSTREAM_CA_CERTIFICATE_FILE on the server and the worker.

Object storage

See Storage for each provider.

VariableDefaultMeaning
RELIC_OBJECT_STORAGE_TYPEs3s3 (Amazon S3 or S3-compatible), azure, gcs, or filesystem (a local directory).
RELIC_OBJECT_STORAGE_PATH(required with filesystem)Absolute path of the content directory, such as /var/lib/relic/objects.
RELIC_OBJECT_STORAGE_ENDPOINT(empty)s3: the service's base URL with scheme, such as http://seaweedfs-s3:8333; empty for Amazon S3. azure: https://<account>.blob.core.windows.net. gcs: an emulator's URL only.
RELIC_OBJECT_STORAGE_REGIONus-east-1The region Relic signs S3 requests for.
RELIC_OBJECT_STORAGE_ACCESS_KEY, RELIC_OBJECT_STORAGE_SECRET_KEY(empty)A static S3 key pair. Empty uses the AWS default credentials (IRSA, EKS Pod Identity, the instance or task role, the environment).
RELIC_OBJECT_STORAGE_SSE(empty)S3 server-side encryption for every write: AES256 or aws:kms.
RELIC_OBJECT_STORAGE_SSE_KMS_KEY_ID(empty)The KMS key for aws:kms; empty uses the account's default key.
RELIC_OBJECT_STORAGE_STORAGE_CLASS(empty)The S3 storage class for every write, such as INTELLIGENT_TIERING.
RELIC_OBJECT_STORAGE_AZURE_CONNECTION_STRING(empty)azure: a connection string with the account key. Empty uses the default Azure credential.
RELIC_OBJECT_STORAGE_ARTIFACTS_BUCKETartifactsThe bucket, or Azure container, for content.
RELIC_OBJECT_STORAGE_TEMPORARY_BUCKETtemporaryThe bucket for uploads in progress. Must differ from the artifacts bucket.
RELIC_OBJECT_STORAGE_CHECKSUMwhen_supportedwhen_supported sends a checksum with every upload. when_required sends one only where S3 requires it, for services that reject uploads with XAmzContentSHA256Mismatch or another checksum error.

Server

VariableDefaultMeaning
RELIC_MAX_CONNECTIONS8192Client connections accepted at once; more wait. 0 removes the cap.
RELIC_MAX_UPLOAD_SIZE(none)The largest file Relic accepts, in bytes or with KiB, MiB, GiB or TiB (10GiB). Larger uploads fail with 413. A local repository can set a lower limit.
RELIC_DATABASE_MAX_CONNECTIONS20PostgreSQL only. Connections per server or worker process. Processes times this value must fit within PostgreSQL's max_connections. pool_max_conns in RELIC_DATABASE_URL takes precedence.
RELIC_DATABASE_STATEMENT_TIMEOUT5mPostgreSQL only. The longest a server query may run; 0 removes the limit. Migrations and the worker have none.
RELIC_FAILED_SIGN_INS_BEFORE_BACKOFF20Failed password attempts a client address may make within ten minutes. After that, Relic answers 429 until a wait passes: one second, doubling up to five minutes. Clients behind one NAT share the count.
RELIC_TRUSTED_PROXIES(none)Comma-separated CIDRs or addresses of the proxies allowed to set X-Forwarded-For and X-Forwarded-Proto.
RELIC_SIGN_IN_NOTE(none)Public text shown under the sign-in form.
RELIC_LDAP_CA_CERTIFICATE_FILE(none)A PEM file of extra CA certificates for LDAP over ldaps:// or StartTLS. See LDAP.
RELIC_TRASH_ENABLEDtruefalse makes deletes permanent.
RELIC_INDEXER_DIRshare/relic/indexer beside the binary's directory; /usr/local/share/relic/indexer in the imagerelic-indexer-<os>-<arch> builds that clients download.

Worker

VariableDefaultMeaning
RELIC_TRASH_RETENTION336hHow long deleted items stay in the trash can.
RELIC_AUDIT_RETENTION8760hHow long audit events are kept.
RELIC_GARBAGE_COLLECTION_INTERVAL10mHow often garbage collection runs.
RELIC_GARBAGE_COLLECTION_GRACE_PERIOD1hHow long unreferenced content is kept before deletion. Keep it longer than your longest backup copy (Backup).
RELIC_SCAN_SYFT_PATH, RELIC_SCAN_GRYPE_PATHsyft, grypeThe scanner binaries. If either is missing, Relic Scan is off.
RELIC_SCAN_MEMORY_BUDGEThalf the container's memory limit, at most 1GiB; 1GiB without a limitThe memory the scanner subprocesses share, in bytes or with KiB, MiB, GiB or TiB (768MiB). See Memory.
RELIC_SCAN_GITLEAKS_PATHgitleaks on PATHThe secrets analyzer; off when not found.
RELIC_SCAN_TRIVY_PATHtrivy on PATHThe misconfiguration analyzer, run with its bundled checks and no downloads; off when not found.
RELIC_SCAN_SCANCODE_PATH(none)ScanCode's scancode, for deep license scanning of file text. Slow, so off unless set.
RELIC_SCAN_VULNERABILITY_DATABASE_DIR/var/lib/relic/grypeGrype's vulnerability database. Keep it on a persistent volume.
RELIC_SCAN_VULNERABILITY_DATABASE_URLGrype's listingA latest.json listing, such as a mirror of https://grype.anchore.io/databases/v6/latest.json. With off, import databases with relic security database import or on the System page; until then, scans fail, including jf scan and relic security scan. Stored artifacts are scanned again after an import.
RELIC_SCAN_MAVEN_URLoffA Maven repository Syft reads POMs from, for licenses and parent POMs. See Package lookups.
RELIC_SCAN_PYPI_URLoffA PyPI JSON API (<url>/<name>/<version>/json) Syft reads licenses from.
RELIC_SCAN_NPM_URLoffAn npm registry (<url>/<name>/<version>) Syft reads licenses from.
RELIC_SCAN_GO_PROXY_URLoffOne Go module proxy (<url>/<module>/@v/<version>.zip) Syft reads licenses from.
RELIC_MALICIOUS_PACKAGES_URLOSV's bucketMalicious-package advisories, read from <url>/<ecosystem>/all.zip.
RELIC_SCAN_GOVULNCHECK_PATHgovulncheck on PATHTells whether Go executables call the vulnerable code. Without it, Go findings have unknown reachability.
RELIC_SCAN_GO_VULNERABILITY_DATABASE_URLhttps://vuln.go.dev/vulndb.zipThe Go vulnerability database govulncheck reads.
RELIC_END_OF_LIFE_URLendoflife.dateendoflife.date's full product dump (/api/v1/products/full), read daily. With off, use relic security end-of-life import.
RELIC_SECRET_VALIDATION_ENABLEDfalsetrue sends each secret found in content to its provider (GitHub, GitLab, Slack, npm, Stripe) to check whether it is still valid.
RELIC_SECRET_VALIDATION_PROVIDERSallComma-separated: github, gitlab, slack, npm, stripe.
RELIC_DEPS_DEV_URLoffdeps.dev's API (https://api.deps.dev) or a mirror, to flag deprecated and unmaintained packages. Each check sends a package name and version.
RELIC_CVE_EPSS_URLFIRST's daily EPSS scoresEPSS scores (.csv.gz).
RELIC_CVE_KEV_URLCISA's KEV catalogThe Known Exploited Vulnerabilities catalog (JSON).
RELIC_CVE_RECORDS_URLhttps://cveawg.mitre.org/api/cveServes CVE JSON 5 records at <url>/<CVE-ID>.

In an air-gapped network, point the feeds at mirrors or set them to off.

Telemetry

The server and the worker both read these. See Monitoring.

VariableDefaultMeaning
RELIC_METRICS_LISTEN_ADDRESS:8091Serves /metrics over plain HTTP, or off.
RELIC_PROFILING_ENABLEDfalsetrue adds /debug/pprof/ to the metrics listener.
RELIC_METRICS_REPOSITORY_LABELfalsetrue labels artifact, upstream, cache and replication series with the repository name. Series then grow with the number of repositories.
RELIC_LOG_LEVELinfodebug, info, warn or error.
RELIC_LOG_FORMATjsonjson or text.
OTEL_EXPORTER_OTLP_ENDPOINT(none)The OTLP/HTTP base URL, such as http://collector:4318. Without it or a traces endpoint, tracing is off.
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT, OTEL_EXPORTER_OTLP_LOGS_ENDPOINT(none)Full URLs per signal.
OTEL_EXPORTER_OTLP_PROTOCOLhttp/protobufThe only protocol. Relic refuses to start with grpc.
OTEL_EXPORTER_OTLP_HEADERS(none)Headers for the collector.
OTEL_SERVICE_NAMErelic-server, relic-workerThe service name.
OTEL_RESOURCE_ATTRIBUTES(none)Extra resource attributes, key=value,….
OTEL_TRACES_SAMPLER, OTEL_TRACES_SAMPLER_ARGparentbased_always_onalways_on, always_off, traceidratio, or their parentbased_ forms; the argument is the ratio.
OTEL_TRACES_EXPORTERotlpnone turns tracing off.
OTEL_LOGS_EXPORTERnoneotlp also sends log records to the collector.
OTEL_SDK_DISABLEDfalsetrue turns traces and OTLP logs off.