Skip to main content
Version: 7.0

Passwork server configuration

If a required parameter is missing from the list, it means it is configured through the Passwork web interface or is no longer supported.

The configuration file config.env is located in the following directories (depending on the Passwork installation choice):

  • Linux/var/www/init/config.env
  • Windows ServerC:\inetpub\wwwroot\passwork\init\config.env
  • Docker/<passwork>/conf/keys/config.env
ParameterDefault valueDescription
ENCRYPTION_CIPHERAES-256-CFBData encryption algorithm.
IS_EXPORT_ENABLED1By default, password export in Passwork is enabled. Value 0 disables export.
IS_EMERGENCY_RESET_ENABLED0Permission to reset the Owner's password via console command.
IS_WRITING_LOGS_TO_STDERR_ENABLED1Writing errors to the stderr stream
IS_WRITING_LOGS_TO_ERROR_LOG_ENABLED1Writing errors to the error_log file
IS_BASE64_RESPONSE_ENCODING_ENABLED1Encoding responses in Base64.
APP_URLPasswork URL address. Set during the Installation Wizard process.
HEALTH_CHECK_TOKENToken for the health check endpoint.
HASH_ALGORITHMRecommended to leave unchangedPassword hashing algorithm. SHA512 is used by default.
ENCRYPTION_CIPHERRecommended to leave unchangedYou can specify an encryption algorithm from the OpenSSL library.
IS_HTTP_HEADERS_CHECKER_ENABLED0Enable Referer check in HTTP headers.

Path and configuration file parameters

ParameterDefault valueDescription
FILES_DIR<Passwork root>/filesDirectory containing background task logs, API schema description, and others
INIT_DIR<Passwork root>/initDefault directory for storing the encryption key and user configuration file.
ENCRYPTION_KEY_PATHINIT_DIR/encryption_keyPath to the encryption key file.
ENV_LOCAL_PATHINIT_DIR/config.envPath to the user configuration file.
SSO_FILES_DIRFILES_DIR/ssoPath to the sso directory, required for storing certificates when used for signing.

Usage

init/config.env — the default path specified, but it can be overridden via .env.local. It contains the main part of the settings and in most cases configuration is limited to changing or adding parameters in this file.

.env — located in the root of the Passwork code (Do not confuse with .env in the root of the Docker build). Please do not make changes to this file unless requested by our technical support.

.env.local — by default absent, can only be located in the root of the Passwork code. We recommend using it to change only a few settings: paths, encryption mode, response encoding mode. Settings from this file will override those specified in init/config.env and .env.

Environment variables — can also be used for configuration, but this is reasonable only when running in containers or via external process managers. In other cases, it is preferable to use configuration files.

Database connection parameters

MongoDB

ParameterDescription
MONGODB_URLConnection string to MongoDB.
MONGODB_DBPasswork database name.
MONGODB_USERNAME(optional) MongoDB username.
MONGODB_PASSWORD(optional) MongoDB user password.

Mail parameters

info

Used with DSN type.

ParameterDescription
APP_SENDER_EMAILSender email for system messages.
MAILER_DSNDSN connection string to the mail server.

Interface customization

Logo display

Passwork lets you show your company logo in the web interface instead of the textual name.

Setup sequence:

  1. Prepare a PNG file of the appropriate size and place it in a directory accessible to the web server user.
  2. Specify the absolute path to the file in the APP_LOGO_PATH parameter inside config.env.
  3. Restart the services to load the logo.

Logo format recommendations:

  • Format: PNG
  • Maximum size: 200×80 pixels
ParameterDescription
APP_LOGO_PATHpath to the logo image
Configuration examples

Linux

  1. Move the .png file to the server where Passwork is installed and set the Apache2 web-server user as the owner.
chown www-data:www-data /opt/logo/example.png
  1. Edit config.env and add the parameter:
APP_LOGO_PATH=/opt/logo/example.png
  1. Restart the PHP and web-server services:
systemctl restart php8.3-fpm
systemctl restart apache2

Docker

  1. Place the .png file in /<passwork>/conf/keys/ inside the configuration directory:
keys
├── config.env
├── encryption_key
└── example.png
  1. Add the parameter to config.env using the %init_dir% variable:
APP_LOGO_PATH="%init_dir%/example.png"
  1. Restart the PHP and Nginx containers:
docker restart passwork_php passwork_nginx

Windows Server

  1. Copy the file to any directory accessible to IIS, for example:
C:\inetpub\logo\example.png
  1. Add the parameter to config.env:
APP_LOGO_PATH="C:\inetpub\logo\example.png"
  1. In IIS, restart the Passwork website or the corresponding application pool.