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 Server —
C:\inetpub\wwwroot\passwork\init\config.env - Docker —
/<passwork>/conf/keys/config.env
Parameters related to Passwork operation
| Parameter | Default value | Description |
|---|---|---|
ENCRYPTION_CIPHER | AES-256-CFB | Data encryption algorithm. |
IS_EXPORT_ENABLED | 1 | By default, password export in Passwork is enabled. Value 0 disables export. |
IS_EMERGENCY_RESET_ENABLED | 0 | Permission to reset the Owner's password via console command. |
IS_WRITING_LOGS_TO_STDERR_ENABLED | 1 | Writing errors to the stderr stream |
IS_WRITING_LOGS_TO_ERROR_LOG_ENABLED | 1 | Writing errors to the error_log file |
IS_BASE64_RESPONSE_ENCODING_ENABLED | 1 | Encoding responses in Base64. |
APP_URL | Passwork URL address. Set during the Installation Wizard process. | |
HEALTH_CHECK_TOKEN | Token for the health check endpoint. | |
HASH_ALGORITHM | Recommended to leave unchanged | Password hashing algorithm. SHA512 is used by default. |
ENCRYPTION_CIPHER | Recommended to leave unchanged | You can specify an encryption algorithm from the OpenSSL library. |
IS_HTTP_HEADERS_CHECKER_ENABLED | 0 | Enable Referer check in HTTP headers. |
Path and configuration file parameters
| Parameter | Default value | Description |
|---|---|---|
FILES_DIR | <Passwork root>/files | Directory containing background task logs, API schema description, and others |
INIT_DIR | <Passwork root>/init | Default directory for storing the encryption key and user configuration file. |
ENCRYPTION_KEY_PATH | INIT_DIR/encryption_key | Path to the encryption key file. |
ENV_LOCAL_PATH | INIT_DIR/config.env | Path to the user configuration file. |
SSO_FILES_DIR | FILES_DIR/sso | Path 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
| Parameter | Description |
|---|---|
MONGODB_URL | Connection string to MongoDB. |
MONGODB_DB | Passwork database name. |
MONGODB_USERNAME | (optional) MongoDB username. |
MONGODB_PASSWORD | (optional) MongoDB user password. |
Mail parameters
Used with DSN type.
| Parameter | Description |
|---|---|
APP_SENDER_EMAIL | Sender email for system messages. |
MAILER_DSN | DSN 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:
- Prepare a PNG file of the appropriate size and place it in a directory accessible to the web server user.
- Specify the absolute path to the file in the
APP_LOGO_PATHparameter insideconfig.env. - Restart the services to load the logo.
Logo format recommendations:
- Format: PNG
- Maximum size: 200×80 pixels
| Parameter | Description |
|---|---|
APP_LOGO_PATH | path to the logo image |
Configuration examples
Linux
- Move the
.pngfile to the server where Passwork is installed and set the Apache2 web-server user as the owner.
- DEB
- RPM
chown www-data:www-data /opt/logo/example.png
chown apache:apache /opt/logo/example.png
- Edit
config.envand add the parameter:
- config.env
APP_LOGO_PATH=/opt/logo/example.png
- Restart the PHP and web-server services:
- DEB
- RPM
systemctl restart php8.3-fpm
systemctl restart apache2
systemctl restart php-fpm
systemctl restart httpd
Docker
- Place the
.pngfile in/<passwork>/conf/keys/inside the configuration directory:
- tree
keys
├── config.env
├── encryption_key
└── example.png
- Add the parameter to
config.envusing the%init_dir%variable:
- config.env
APP_LOGO_PATH="%init_dir%/example.png"
- Restart the PHP and Nginx containers:
- Docker
docker restart passwork_php passwork_nginx
Windows Server
- Copy the file to any directory accessible to IIS, for example:
- PowerShell
C:\inetpub\logo\example.png
- Add the parameter to
config.env:
- config.env
APP_LOGO_PATH="C:\inetpub\logo\example.png"
- In IIS, restart the Passwork website or the corresponding application pool.