Configuring OpenProject with environment variables

Set OpenProject up as code with environment variables instead of configuration.yml, across packages, Compose and the all-in-one container, with the admin, LDAP and SSO seeding you need.

On this page

Why teams configure OpenProject with environment variables

Environment variables are the recommended way to configure OpenProject, and config/configuration.yml is deprecated. A platform team that has to rebuild, move or re-host a self-hosted OpenProject should treat that as the starting rule: every setting that shapes the instance belongs in a source the team can read, review and reapply. When settings live in environment variables, a change to the domain, the database connection, mail delivery or the initial administrator becomes a reviewable diff rather than an edit someone made by hand on a server months ago. This is the core reason to adopt the method before the first production install, not after an incident.

The method matters most in three situations. The first is a rebuild, where a new host or container must come up with the same behavior as the old one and nobody remembers which file was edited. The second is a move between packaged installs, Docker Compose and the all-in-one container, where the same variable names need to hold across different places they are set. The third is multiple environments, such as a test instance and a production instance that should differ only in a few values. The advanced configuration documentation covers the naming convention and the places where variables are read, and the team should confirm which variables apply to its exact version before relying on them. Settings that the documentation says can be seeded from variables include the initial admin user, LDAP connections and Enterprise design options, so those are the first items to move out of hand-edited files.

Where to set variables for packages, Compose and the all-in-one container

Packaged installs on Ubuntu, Debian, RHEL or SLES read environment variables from the /etc/openproject/conf.d/env directory. Use this path when you want each setting in its own file that configuration management can template and version. The openproject config:set command is the other route: it stores a value that the configuration step then applies. The advanced configuration docs list the keys that the installed release accepts.

  • File location: Keep variables in files under /etc/openproject/conf.d/env, grouped by concern, so reviews and version control stay readable.
  • Command route: Run openproject config:set with the key and value, then run openproject configure so the change is applied.
  • Services: The web and worker services run under systemd. Confirm with your release notes which services must restart after configure.
  • Permissions: Restrict read access to the env directory, since database passwords and keys can be stored there.
  • Rebuilds: Keep the files in version control so a replacement host can be configured from the same source.

After each change, check the service status and the application logs for startup errors before you test user-facing behavior.

Which configuration method fits which install

This table compares the four ways to set OpenProject options: configuration.yml, environment files in conf.d, openproject config:set with configure, and container environment blocks. Read each row to see where the setting lives, who can change it, how changes are reviewed and which install type it suits. The main takeaway is that configuration.yml is deprecated, so new installs should start with environment variables.

MethodWhere the setting lives and who changes itHow changes are reviewedWhen it fits
config/configuration.yml (deprecated)A YAML file in the application config directory, edited by whoever has file access on the serverUsually reviewed by hand or not tracked, so drift is likelyOnly for legacy installs being migrated off it; plan the move to environment variables
Environment files in /etc/openproject/conf.d/envVariables in files on a package install host, edited by a root or system administratorReviewable as files if kept under configuration management or version controlPackage installs on Ubuntu, Debian, RHEL or SLES that need settings kept as plain files
openproject config:set followed by openproject configureValues stored by the CLI on the host, changed by an administrator with shell accessChanges are made by command, so teams should log each run in a change recordPackage installs where an administrator prefers command-driven setup over editing files
Compose or container environment blocksVariables in the Compose file, an env file or the orchestrator manifest, changed by whoever edits the deployment repositoryReviewable through merge requests and pipeline checks when the file is in GitDocker Compose, the all-in-one container and Kubernetes or OpenShift installs managed as code
Secrets passed to the runtimeValues such as admin passwords and LDAP bind credentials supplied from a secret store or the orchestratorAccess and rotation are reviewed in the secret store, not in the settings fileAny install where credentials must stay out of files committed to source control

Seeding the initial admin, LDAP connections and Enterprise design

Seeding means that the initial admin user, LDAP connections and Enterprise design settings are created from environment variables at first start, instead of being clicked through in the web interface after installation. For a team that rebuilds OpenProject across test, staging and production, this makes the first run repeatable: the same variables produce the same starting state every time, and the result can be reviewed in version control like any other infrastructure change. Confirm the exact variable names for your release in the OpenProject advanced configuration docs before you write them into a template, because the seeding keys are the part most likely to change between versions.

The initial administrator password is the sensitive part. If it is written into a Compose file, a Helm values file, a shell history or a CI variable that many people can read, it becomes a standing credential that outlives the first login. Keep the seed value in a secrets manager or the platform's secret store, make the first login force a password change, and remove or rotate the seeded value once the real administrators are in place. Ask whether your pipeline logs environment values on failure, since a failed deployment is a common way seeded credentials leak. The same rule applies to LDAP bind credentials, which should be treated as service account passwords with the least directory rights that still allow the lookup.

LDAP group synchronization and single sign-on are Enterprise features, so a seeded LDAP connection only delivers group-based access if the license covers it. Seeding an LDAP connection on a Community installation can configure the connection, but the group behavior you planned for will not work until the plan is in place. Confirm, with the vendor and against your version, which keys belong to the Enterprise design settings, which features each plan entitles and whether the license key itself is set through configuration. Test the seeded LDAP connection with a non-administrator account before you rely on it, and record the plan entitlements next to the configuration so that an audit or a later upgrade can show what was enabled and why.

How to move settings from configuration.yml into environment variables

This sequence turns a configuration.yml-based OpenProject setup into an environment-driven one, so every setting is declared once, applied the same way on each install method, and confirmed in the running instance.

  1. Inventory every setting in configuration.yml

    The platform engineer or administrator who owns the current installation opens config/configuration.yml, or the copy the install uses, and lists every active key, including commented-out keys that were switched on in production, LDAP blocks, email settings, host and HTTPS settings and any Enterprise design values. Note which file or process applies each value, because some installs also read values from the environment already. The step is done when the list covers every key the team can account for and each entry records its current value, with secrets marked separately. Confirm the list against a fresh read of the file, since configuration.yml is deprecated and drift between the file and the live instance is common.

  2. Map each setting to its environment variable

    For each inventory entry, find the matching environment variable in the official advanced configuration documentation and write the mapping in a table with the YAML path, the variable name, the value type and the install methods that will use it. Use double-underscore naming for nested keys as the documentation describes, and do not guess names from memory. Flag any key with no documented equivalent, since those need a decision: keep the key in a supported form, drop it after review, or raise it with the vendor. The step is done when every key has either a verified variable or a recorded decision, and a reviewer has checked the table against the documentation for the exact release in use.

  3. Set variables for the chosen install method

    The administrator places the mapped variables where the install method reads them. Packaged installs use files under /etc/openproject/conf.d/env or the openproject config:set command. Docker Compose and the all-in-one container read them from the environment definition or an env file that the container receives. Keep secrets such as database passwords, SMTP credentials and LDAP bind passwords in the secret store your organization already uses, and keep the environment files under version control only without secret values. The step is done when a file or definition lists every mapped variable for that install and the secrets are referenced, not written in plain text.

  4. Apply the configuration and restart the services

    For packaged installs, the administrator runs the configuration step that reads the new settings, then restarts the web and worker services so both pick up the changes. For Compose and container installs, the administrator recreates the containers that received new variables, since changing an env file does not update a running container. Before applying, record the current image or package version and take a backup, so a failed change can be reversed. The step is done when the services start cleanly and the logs show no configuration errors on either the web or worker process.

  5. Verify values in the administration interface

    A named administrator signs in and compares each mapped setting in the administration interface with the inventory. Check host name, HTTPS mode, outbound email settings, the initial admin account, and any LDAP or Enterprise design settings that were seeded. Some settings are read-only in the interface when they come from the environment, which is itself useful evidence that the variable took effect. The step is done when every setting in the table shows the expected value, and any mismatch is logged with the variable name and the source that overrode it.

  6. Confirm behavior in the logs and with a test user

    The operator checks the application and worker logs for configuration warnings, deprecation notices about configuration.yml, and failed connections to LDAP or the mail server. Then a test user signs in through the path the change affected, for example a test LDAP account or a sent notification, and the operator confirms the result. The step is done when logs show no unexpected configuration errors and each test path works, with the test results saved next to the mapping table.

  7. Remove the old file and record the baseline

    Once the new configuration is verified, the team archives or removes the old configuration.yml from the install so that two sources do not drift apart, and records the final variable set, the install method and the release in the change record. The owner also schedules a repeat of the verification after each upgrade, because settings and variable names can change between releases. The step is done when the old file is no longer read, the baseline is stored in the team's change system, and the next verification is assigned to a named owner.

Protecting secrets and admin access in variable-driven configuration

Once settings live in environment variables, the variables themselves become the sensitive part of the deployment. The cards below cover where secrets sit, how they reach the container, who can read them, and how the first admin account is handled. Confirm each control against the vendor guidance for your OpenProject version before you rely on it.

Keep env files out of version control

Environment files holding the secret key base, database password and SMTP credentials should never be committed to a Git repository, even a private one. Add the file names to .gitignore and store a template with placeholder values in the repository instead. Check the history of any existing repository for values committed earlier, because deleting the file later does not remove them from history.

Restrict file permissions on the host

On package installs, files under /etc/openproject/conf.d/env are read when services start, so their owner and mode decide who can read the database password. Limit them to root and the service account that needs them, and confirm the group and mode after every configuration change. Verify the ownership on the host rather than assuming the package defaults fit your hardening baseline.

Pass secrets to Compose without inlining them

In Compose files, avoid writing secret values directly into the environment block of the YAML, since that file is often copied, reviewed and shared. Reference an external env file or Compose secrets instead, and confirm which mechanism your Compose version supports for the OpenProject image. Also check that docker inspect output and container logs do not echo these values.

Store CI variables as protected secrets

When a pipeline writes configuration or deploys the container, the secrets it uses should be defined as masked, protected CI variables scoped to the production branch or environment. Restrict who can edit them and who can view job logs. Avoid echoing the rendered env file in pipeline output, since logs are often retained longer than the secret it contains.

Rotate the initial admin password

Seeding the initial admin user from environment variables is convenient, but the seeded password then exists in a file and possibly in a pipeline. Change it through the interface after first login, remove the seed variable from the configuration, and reload the service. Ask the vendor whether the seed value is ignored once the account exists for your version, and record who completed the change.

Log configuration changes

A change to an environment variable can alter authentication, email or storage behavior without any record in the application's audit trail. Keep the configuration in version control with reviewed commits, and record each deployment with the operator, time and release. Confirm which OpenProject audit log entries cover administrative actions in your version, and fill any gap in your change process.

Advanced configuration docs

Questions teams ask before configuring OpenProject this way

How much effort does moving OpenProject from configuration.yml to environment variables take?

The effort depends mainly on how many settings the current configuration.yml carries and how many environments share it. A small single-instance install with a handful of overrides is a short task, while a setup with custom mail, proxy, storage, authentication and branding settings across development, test and production takes longer because each value must be mapped, checked and documented. Drivers to review are the number of environments, whether secrets are stored in files or a secrets manager, whether the deployment is a package, Docker Compose or the all-in-one container, and how much testing the team requires before cutover. Ask any provider for a written list of settings to be converted, the environments covered and the acceptance checks before agreeing a fixed scope.

Can our internal team do this configuration work alone?

Yes, if the team has someone comfortable with Linux, the chosen install method and the OpenProject settings reference. The official advanced configuration documentation describes the deprecated configuration.yml file and the recommended environment variable approach, and packaged installs use /etc/openproject/conf.d/env or the openproject config:set and openproject configure commands. The work becomes harder when the team must also handle identity provider setup, database changes or proxy rules at the same time. Internal teams usually succeed by converting one environment first, keeping the old file for comparison and writing down each variable and its owner.

What do we need to provide before the configuration work starts?

Plan to supply the current configuration file or a copy of the running settings, the install method in use, the OpenProject version, and a list of the integrations that depend on the settings, such as SMTP, LDAP, single sign-on, storage and reverse proxies. You will also need access to the hosts or containers, a place to store secrets, and a named contact who can approve changes to production. A staging environment that matches production closely helps. Confirm these needs in the written scope so that nobody discovers a missing access right or secret store halfway through the work.

Which configuration settings need an Enterprise plan?

Single sign-on methods, LDAP group synchronization and custom branding are listed among OpenProject Enterprise features on the pricing page, and the same pricing page covers Enterprise on-premises licensing per named user per month. Seeding Enterprise design settings from environment variables therefore only has value on an installation with a suitable license. Before writing variables for these features, confirm the plan with OpenProject or your licensing contact, because feature lists change between releases. The Community edition is free and includes work packages, Gantt charts, agile boards, time tracking and dashboards.

How do we test environment variable changes before they reach production?

Test changes in a non-production instance that uses the same install method, OpenProject version and variable set as production, with the secrets replaced by test values. Check that the application starts, that the admin user can sign in, that outbound mail and any LDAP or single sign-on login work, and that file uploads behave as expected. Keep the variables in version control so every change is reviewed and can be rolled back. Record the OpenProject release you test against, because the release notes can change defaults between versions such as 17.7.0, 17.8.0 and 17.9.0. Ask any provider to describe the test cases and the rollback step in the written scope.

Can environment variables store admin accounts and LDAP connections safely?

Yes, the initial admin user, LDAP connections and Enterprise design settings can be seeded from environment variables, but the values must be protected like any other credential. Avoid committing passwords or bind credentials to a repository in plain text. Use the secret mechanism your platform provides, such as Docker secrets, Kubernetes secrets or a package-level environment file with restricted file permissions, and rotate the initial admin password after first sign-in. Review who can read the container definition or environment file, because anyone with that access can often read the values.

What does ongoing maintenance of these settings cost after the first change?

After the first conversion, the recurring work is keeping the variable set aligned with each OpenProject upgrade, reviewing release notes for renamed or removed settings, and rotating secrets on the schedule your policy requires. The cost is driven by how often you upgrade, how many environments you maintain and whether a team member owns the configuration. Ask for a clear handover of the variable inventory, the owner of each secret and the steps for an upgrade, so the work can be done in house or under a support agreement.

Does moving to environment variables change how we back up or restore OpenProject?

Backups must still capture the database, attachments and any file-based secrets that the instance needs, so moving configuration into environment variables does not remove that duty. Store the variable definitions in version control or a secrets manager with its own backup, and record which values are needed to rebuild the instance on a new host. Test a restore into a clean environment to confirm that the seeded admin, mail and authentication settings come back as expected. Backup design is covered in the operations and backup content group, so confirm the restore procedure with your operations team before relying on it.

How DeployOpen works on this

DeployOpen treats OpenProject settings as code that lives in your repository, not in hand-edited files on a server. We scope the variables, secrets and seeded identity settings for your install method, build them against a test instance, and hand over a documented, reviewable configuration your team can run.

How we scope

  • Inventory the settings your teams need, including admin seeding, LDAP and SSO, and Enterprise design options.
  • Confirm the install method first: package, Docker Compose or the all-in-one container, since each sets variables differently.
  • Agree the written scope, deliverables and timeline before work starts, with ongoing support available as a retainer.

How we build

  • Move settings out of configuration.yml into environment variables, using the double-underscore naming that matches each key.
  • Keep secrets out of plain files and set them through the secret store or file mechanism your organization already uses.
  • Test the configuration on a non-production instance, including first login, admin access and identity provider sign-in.

How we hand over

  • Deliver the variable files or Compose overrides in a version-controlled repository with a change history.
  • Document each variable, its purpose, its default and which edition or plan it requires for your deployment.
  • Walk your administrators through applying changes with openproject config:set and openproject configure where packages apply.

How we support

  • Review configuration changes when OpenProject releases bring new or renamed variables, before you apply the upgrade.
  • Re-test identity and seeding settings after certificate, provider or domain changes in your environment.
  • Offer ongoing support, upgrades and continuous testing as a retainer, scoped in writing against your configuration.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.