PrivX Server Configuration
PrivX provides settings for managing server behavior, resource usage, and the user experience. This article describes how to configure PrivX Server behavior to meet your deployment requirements.
Dedicated Server Roles
You can assign roles to individual PrivX Servers in a high-availability (HA) deployment to control which jobs they perform.
Your PrivX deployment must include one of the following server combinations to perform all required jobs:
- Default roles: At least one
defaultserver - Dedicated roles: At least one
worker-onlyserver and at least oneserver-onlyserver.
To configure the role of a PrivX Server:
-
Access the PrivX Server as
root. -
In the shared-configuration file
/opt/privx/etc/shared-config.toml, setserver_modeto one of the following values:Supported Job defaultworker-onlyserver-onlyRole All Jobs Back-End Jobs Front-End Jobs Handle user logins • • Scan cloud hosts • • Check host availability • • Process audit logs and session recordings • • -
Restart PrivX services to apply your changes:
systemctl restart privx
Configuring Housekeeping Tasks
Housekeeping tasks periodically check and clean up PrivX data. You can enable, disable, and change the intervals of the following tasks without restarting PrivX:
| Microservice | Setting |
|---|---|
| Host Store | Housekeeping Interval (Hours) |
| Monitor Service | Housekeeping Interval (Hours) |
| Monitor Service | Database Cache Removal Interval (Seconds) |
| Role Store | Expired Keys Purge Interval (Hours) |
| Role Store | SCIM Role Cleanup Interval (Minutes) |
| Role Store | Inactive User Cleanup Interval (Hours) |
| Role Store | Ephemeral Users Cleanup Interval (Minutes) |
| Trail Index | Housekeeping Interval (Minutes) |
| Workflow Engine | Requests Housekeeping Interval (Hours) |
For descriptions of the settings, see PrivX Settings.
To configure one of these housekeeping tasks:
- In the PrivX Web UI, go to Administration → Settings.
- Select the microservice that runs the task, and click Edit.
- Configure the interval:
- To enable the task or change how often it runs, enter a valid positive value.
- To disable the task, set its interval to
0or-1for the task-specific disabling value.
- Click Save. The change applies without restarting PrivX.
Saving the settings reschedules the affected housekeeping tasks, even if their interval values have not changed. The following table describes the effects of enabling, reactivating, and disabling a task.
| Action | Effect |
|---|---|
| Enable a disabled task | The task runs shortly afterwards and then follows the configured interval. |
| Reactivate an enabled task by setting its interval to a valid positive value, which can be the same as its current value | Saving immediately resets the schedule. If the task is not running, its next run is scheduled after the configured interval. If it is running, it finishes and its next run is scheduled after that interval. |
| Disable an enabled task | No further runs are scheduled. If the task is running, it finishes before stopping. |
| Disable an already disabled task | The task remains disabled. |
An enabled task can therefore remain stopped. Housekeeping tasks do not run in the following cases, even if they are enabled:
- On servers with the
server-onlyrole. - While PrivX is in maintenance mode.
There are exceptions to both restrictions that could be applied to some housekeeping tasks. These tasks either have no configurable settings or require a server restart to apply configuration changes.
Disabled tasks do not run in either normal or maintenance mode.
PrivX Log Settings
You can configure where PrivX sends log messages, change the log level of individual microservices, and adjust logging settings to improve performance.
By default, PrivX sends regular and audit events to syslog. Audit events use the namespace SSH-PRIVX-AUDIT. Regular messages, including debug, information, warning, and error messages, use the namespace SSH-PRIVX.
Configure logging destinations in /opt/privx/etc/shared-config.toml and microservice log and trace levels in /opt/privx/scripts/local-env.
The following example shows how to enable syslog logging for regular and audit events nds disable stdout for regular events:
# Send PrivX system events to logs under /var/log/privx
send_regular_events_to_stdout = false
# Send PrivX audit events to syslog
send_audit_events_to_syslog = true
# Send regular PrivX system events to syslog
send_regular_events_to_syslog = true
For instructions, see:
Changing Log Levels and Forwarding Logs
You can change microservice log levels to collect more detailed information for troubleshooting. You can also configure rsyslog to forward PrivX logs to external syslog servers.
Changing Microservice Log Levels
To enable debug output for a microservice, perform the following steps as root on each PrivX Server that requires the change:
-
In
/opt/privx/scripts/local-env, set the log and trace levels for the microservice.
For example, to set the Authorizer log level toDEBUGand trace level to5:AUTHORIZER_LOG_LEVEL=DEBUGAUTHORIZER_TRACE=5 -
Restart the affected microservice to apply your changes. For Authorizer:
systemctl restart authorizerAlternatively, restart all PrivX services:
systemctl restart privx -
Configure rsyslog to write DEBUG messages to the log file.
In/etc/rsyslog.conf, locate the following rule. By default, it writes messages with severity INFO or higher to/var/log/messages, excluding the mail, authpriv, and cron facilities. It does not write DEBUG messages.*.info;mail.none;authpriv.none;cron.none /var/log/messagesTo include DEBUG messages, change the rule to:
*.debug;mail.none;authpriv.none;cron.none /var/log/messages -
Restart rsyslog to apply the changes:
systemctl restart rsyslog
Forwarding Logs to Multiple Syslog Servers
To forward PrivX logs to multiple external syslog servers, perform the following steps as root on each affected PrivX Server:
-
Create or edit
/etc/rsyslog.d/forward-privx-logs.confand add the following rules. Replace the example IP addresses and ports with those of your syslog servers:# Forward PrivX generated log messages to remote servers:programname, isequal, "SSH-PRIVX" @@192.168.1.1:514:programname, isequal, "SSH-PRIVX-AUDIT" @@192.168.1.1:514:programname, isequal, "SSH-PRIVX" @@192.168.1.2:514:programname, isequal, "SSH-PRIVX-AUDIT" @@192.168.1.2:514& stop -
Restart rsyslog to apply the changes:
systemctl restart rsyslog
Logging Through journald
For RPM deployments on RHEL 8 and 9, PrivX sends syslog messages to localhost:514 over TCP by default. If the local rsyslog TCP listener is disabled, PrivX cannot send messages to this destination and reports connection errors.
To use journald, configure PrivX to send syslog messages to the local Unix socket /dev/log. Rsyslog can then read the journal through its imjournal module and continue writing log files or forwarding messages to external collectors.
PrivX -> /dev/log -> journald -> rsyslog -> log files / remote collectors
Sensitive audit messages can remain in the journal even if rsyslog is configured to discard them. If persistent journal storage is enabled, these messages can also be stored on disk.
journald receives syslog messages before rsyslog applies the sensitive-event discard rule in /etc/rsyslog.d/privx-syslog.conf. This affects features that generate SSH-PRIVX-SENSITIVE-AUDIT messages. For example, restricted-shell command auditing can include command text in these syslog-only messages. PrivX does not store these messages in its audit-event database.
If sensitive events must bypass the journal, keep audit logging on its existing TCP destination and send only regular events through journald, as described below. If audit logging uses localhost:514, the local rsyslog TCP listener must remain enabled.
To configure logging through journald:
-
Perform the following steps as
rooton each PrivX Server. Back up each configuration file before you modify it. -
Check that journald is running and its syslog socket is available:
systemctl status systemd-journald.servicels -l /dev/log /run/systemd/journal/dev-log -
In the
[shared]section of/opt/privx/etc/shared-config.toml, configure the following to use journald:send_regular_events_to_syslog = truesend_regular_events_to_stdout = falsesyslog_protocol = "unixgram"syslog_address = "/dev/log"send_audit_events_to_syslog = truesend_audit_events_to_stdout = falseaudit_event_format = "syslog"audit_event_syslog_protocol = "unixgram"audit_event_syslog_address = "/dev/log"To keep audit events on the default TCP destination, use these audit overrides instead:
audit_event_syslog_protocol = "tcp"audit_event_syslog_address = "localhost:514"If audits already use a dedicated collector, retain that collector's protocol, address, and required audit format.
-
Check
/etc/rsyslog.confto ensure that rsyslog reads messages from the journal. Retain the existing module options. The relevant settings typically look like this:module(load="imuxsock" SysSock.Use="off")module(load="imjournal" StateFile="imjournal.state")Load each module only once. Keep the include for
/etc/rsyslog.d/*.confand your existing file, forwarding and sensitive-event rules.ForwardToSyslog=yesis not needed when usingimjournal. -
Resolve any reported configuration errors, then restart rsyslog and PrivX:
rsyslogd -N1systemctl restart rsyslog.servicesystemctl restart privx.serviceNo startup-script or systemd-unit changes are needed. Standard output (stdout) and standard error (stderr) diagnostics goes to
/var/log/privx/. Syslog messages configured to use/dev/loggo to journald. -
Generate a PrivX event, such as a test login, and check the journal for regular and audit messages:
journalctl --since '5 minutes ago' -t SSH-PRIVXjournalctl --since '5 minutes ago' -t SSH-PRIVX-AUDITAlso confirm that the event reaches your configured log file or external collector. If audit logging remains on TCP, audit events continue to appear at that destination rather than in the journal. If messages are missing, check
/var/log/privx/*.logfor syslog connection errors.
After verification, you can disable rsyslog's TCP port 514 input if no audit logging or other applications use it. After changing the configuration, validate it and restart rsyslog.
Configuring Journal Storage and Retention
You can configure journal storage and retention separately in /etc/systemd/journald.conf and its drop-in configuration files. Review storage, retention, and rate limits for your deployment. journald and the rsyslog imjournal module can discard messages under load. If you require complete audit logs, test with representative traffic.
To check the configuration options supported by the systemd version installed on your server, run man journald.conf.
For additional information, see the journal configuration and rsyslog imjournal documentation.
Restoring the Previous Logging Configuration
To restore the previous logging configuration, restore the previous settings in /opt/privx/etc/shared-config.toml and any rsyslog configuration files you changed. If you changed the rsyslog configuration, validate it and restart rsyslog. Ensure that the previous logging destination is available before restarting PrivX. If the previous destination was localhost:514, enable the local rsyslog TCP listener first.
Optimizing Log Performance
Large amounts of syslog traffic can reduce PrivX performance, particularly when verbose logging is enabled for multiple microservices. By default, PrivX sends messages to local syslog over TCP. You can reduce the performance impact of logging by:
- Using less verbose log levels.
- Logging to stdout or file instead of rsyslog.
- Switching to UDP logging.
Outside of troubleshooting scenarios, we recommend keeping microservice log levels at INFO. For more information on setting log levels, see Changing Log Levels and Forwarding Logs.
Writing Regular Events to Stdout or Files
To write regular events to stdout instead of rsyslog:
-
In
/opt/privx/etc/shared-config.toml, set the following values on each PrivX Server:send_regular_events_to_stdout = truesend_regular_events_to_syslog = false -
Restart PrivX services to apply your changes:
sudo systemctl restart privx -
To specify which files receive stdout and stderr output, set
stdout_logandstderr_login the microservice's startup script in/opt/privx/scripts/<microservice_name>.sh. For example, the Role Store startup script is/opt/privx/scripts/role-store.sh. -
Restart the affected microservice after changing its startup script.
Using UDP for Syslog Messages
You can enable UDP separately for regular and audit events. If you use UDP (instead of TCP) for logging, mind that UDP messages can be lost without notifying the sender.
UDP does not guarantee message delivery and prevents some events from being logged. If your deployment requires complete syslog, such as for SIEM integration, use TCP rather than switching to UDP. Audit events are logged to the database, regardless of syslog settings.
To enable UDP for both regular and audit events:
-
In
/opt/privx/etc/shared-config.toml, set the following values on each PrivX Server:syslog_protocol = "udp"audit_event_syslog_protocol = "udp" -
Restart PrivX services to apply your changes.
Custom Disclaimers
You can configure custom disclaimers to display messages to users in the PrivX Web UI, such as terms and conditions on the login page. Saved disclaimer settings appear in JSON format.
To configure custom disclaimers:
-
In the PrivX Web UI, go to Administration → Settings → Global Settings and click Edit.
-
Under Disclaimers, click Add Disclaimer. Configure the disclaimer content and behavior using the following fields:
For checkboxes, the JSON value is
truewhen enabled andfalsewhen disabled.Field Values JSON Property Description Path Regular expression pathSpecifies where the disclaimer appears. For example, ^/auth/login$limits it to the login page.Style JSON values: float,local,popupmodeSpecifies how the disclaimer appears. For example, Popup (modal dialog) displays it in a modal dialog. The local style is supported only on the login page. Title Text titleSpecifies the disclaimer title. Text Text textSpecifies the disclaimer message. Acceptance Text Text acceptSpecifies the label displayed next to the acceptance checkbox. For example, “I have read and agree to the terms and conditions.” Users can accept the disclaimer to close it true,falseacceptableAllows users to accept and close the disclaimer. When enabled, users must accept the disclaimer to proceed unless closing without acceptance is also allowed ( closeableis alsotrue). Acceptance is stored in browser local storage. Clearing that storage causes the disclaimer to appear again.Users can close the disclaimer without accepting it true,falsecloseableAllows users to close the disclaimer without accepting it. Expiration Time Number of hours expirationTimeSpecifies how long a dismissal remains valid, in hours. The disclaimer appears again after this period. User dismissal of the disclaimer expires at the next login true,falseexpireAtLoginWhen enabled, a dismissed disclaimer appears again at the next login. When cleared, logging in does not itself expire the dismissal. Content Updated Date and time timeStampRead-only. Stored in ISO 8601 format, such as 2020-01-01T12:00:00Z. Displays when the disclaimer content was created or updated. When this timestamp changes, it causes PrivX to treat the disclaimer as new and display it again, even to users who previously accepted it.No corresponding editable field Unique identifier idIdentifies the disclaimer and allows PrivX to track its acceptance separately from other disclaimers. PrivX converts the field values to JSON and displays the saved configuration under Disclaimers in view mode. For example:
[{"id": "terms-and-conditions","timeStamp": "2020-01-01T12:00:00Z","path": "^/auth/login$","title": "Terms and Conditions","text": "Lorem ipsum dolor sit amet.","accept": "I have read and agree to the terms and conditions","mode": "popup","acceptable": true,"closeable": false,"expirationTime": 24,"expireAtLogin": false}] -
Click Preview to check how the disclaimer appears to users. Save your changes.
-
Restart PrivX services to apply your changes. Click Restart on Administration → Settings, or run the following command as
rooton the PrivX Server:systemctl restart privx
Resetting Superuser Password
If you forget the password for a local PrivX superuser account, you can reset it:
-
Access a PrivX Server as
root. In a high-availability (HA) deployment, perform these steps on one of your PrivX Servers. -
Run
admin-toolwithpassword-reset. Replace<username>with the username of the local superuser account:/opt/privx/bin/admin-tool password-reset <username>noteThis command does not check whether the new password meets your organization’s password requirements. It may accept a password that the PrivX Web UI would reject.
-
When prompted, enter a new password that meets the configured password requirements.
You can now log in to PrivX with the new password. You can also change the password in the PrivX Web UI, which checks that it meets the configured password requirements.
Resetting PrivX Server Settings
To reset some or all PrivX settings to their default values:
-
Back up the current PrivX settings to a JSON file. Run the following command on one PrivX Server with
<filename.json>replaced with the backup file path:/opt/privx/bin/settings-tool -command=export -out <filename.json> -
On one PrivX server, run
settings-toolto reset the required settings. Use-scopeto select a service or the global settings. Use-sectionwith-scopeto select a specific group of settings within that scope.Replace
<scope>and<section>with the corresponding identifiers from the Scope and Section columns in PrivX Settings. Use the values exactly as listed, including capitalization and hyphens.-
To reset all settings:
/opt/privx/bin/settings-tool -command=reset -
To reset all settings in a specific scope:
/opt/privx/bin/settings-tool -command=reset -scope=<scope> -
To reset only a specific section within a scope:
/opt/privx/bin/settings-tool -command=reset -scope=<scope> -section=<section>
For example, to reset only the disclaimer settings in the
GLOBALscope:/opt/privx/bin/settings-tool -command=reset -scope=GLOBAL -section=disclaimer -
-
Restart PrivX on all PrivX Servers to apply your changes:
systemctl restart privx
Restoring Previous Settings
Restore settings only to the same PrivX version from which the backup was created. Restoring settings to a different PrivX version can cause PrivX to malfunction.
To restore settings from a backup, run the following command on one PrivX Server, where <filename.json> is replaced with the backup file path:
/opt/privx/bin/settings-tool -command=import -in <filename.json>
Restart PrivX on all PrivX Servers to apply the restored settings.
SSH Product Integrations
You can configure links to other SSH products in PrivX. Administrators can access these links from the upper-right corner of the header bar:
To configure a link to SSH Universal Key Manager (PrivX Key Manager):
- In the PrivX Web UI, go to Administration → Settings and click Edit.
- Under SSH Product Integrations, enter a valid URL for SSH Universal Key Manager.
- Save your changes.
To open a configured product, click the product menu icon in the upper-right corner of the header bar and select the product.
Changing SSH and RDP Bastion Ports
You can change the ports used by SSH Bastion and RDP Bastion to match your deployment requirements. By default:
- SSH Bastion listens on port 2222
- RDP Bastion listens on port 3389
To change either Bastion port, perform the following steps on all PrivX Servers:
-
Update the configuration for the Bastion service:
Service Configuration File Setting Default Port SSH Bastion /opt/privx/etc/ssh-mitm.tomlssh_listen_addresses2222 RDP Bastion /opt/privx/etc/rdpmitm/rdpproxy.iniportin the[globals]section3389 -
SSH Bastion: Update
ssh_listen_addressesto specify the new port. For example, to use port 8022:ssh_listen_addresses = [":8022"] -
RDP Bastion: Add or update
portin the[globals]section. For example, to use port 3999:port=3999
Save your changes.
-
-
Allow TCP connections to the new port in the firewall. The following commands use firewalld and the
publiczone. Replacepublicwith the appropriate zone for your deployment and<new_port>with the port configured in step 1:sudo firewall-cmd --permanent --zone=public --add-port=<new_port>/tcpIf the old port is no longer needed, remove its firewall rule. Replace
<old_port>with the previous port number:sudo firewall-cmd --permanent --zone=public --remove-port=<old_port>/tcpApply the firewall changes:
sudo firewall-cmd --reload -
Restart PrivX to apply the configuration changes:
sudo systemctl restart privx -
Verify that you can establish an SSH or RDP connection using the new Bastion port.
Performance Optimizations
The following settings can help reduce memory or socket usage. Review the limitations before applying these changes.
Optimizing for Low-Memory VMs
If you are running PrivX Server on a virtual machine (VM) with limited memory, adjusting garbage collection for the Role Store service may improve performance.
To adjust Role Store garbage collection, perform the following steps on each affected PrivX Server:
-
In
/opt/privx/scripts/role-store.sh, find the following line:SSH_AUDIT_PRIORITY=${auditpriority} SSH_LOG_LEVEL=$loglevel SSH_TRACE=$tracelevel /opt/privx/bin/role-store >> "$stdout_log" 2>> "$stderr_log"Add
GOGC=80at the beginning of the line:GOGC=80 SSH_AUDIT_PRIORITY=${auditpriority} SSH_LOG_LEVEL=$loglevel SSH_TRACE=$tracelevel /opt/privx/bin/role-store >> "$stdout_log" 2>> "$stderr_log"warningLowering
GOGCcan reduce heap memory usage but increase the CPU time spent on garbage collection. For production deployments, we recommend increasing the memory available to PrivX Servers beyond the minimum requirements instead. SettingGOGCtoo low can increase latency and reduce overall PrivX performance. The default value is100.
For more information on GOGC and the Go Garbage Collector, see A Guide to the Go Garbage Collector. -
Save your changes and restart the Role Store service.
Optimizing for Socket Usage and Latency
You can configure PrivX microservices to connect directly to each other instead of routing traffic through Nginx. This configuration can reduce the number of required sockets by almost half and reduce Nginx bottlenecks.
If your deployment has sufficient resources, we recommend increasing socket limits instead of using direct connections.
When microservices connect directly to each other, logging and timeout behavior changes:
- Nginx logs do not include HTTPS requests sent directly between microservices. You can use PrivX logs to obtain more comprehensive request records.
- Direct connections ignore Nginx timeouts or other Nginx settings. They use the PrivX default TLS timeout of 60 seconds.
To enable direct communication between microservices, on each PrivX Server update the settings in /opt/privx/etc/shared-config.toml to use the direct addresses in the following table:
| Setting Name | Nginx Address (Default) | Direct Address |
|---|---|---|
rolestore_address | https://localhost/role-store/api/v1 | https://localhost:8081/role-store/api/v1 |
local_user_store_address | https://localhost/local-user-store/api/v1 | https://localhost:8084/local-user-store/api/v1 |
local_user_store_default | https://localhost | https://localhost:8084 |
workflow_engine_address | https://localhost/workflow-engine/api/v1 | https://localhost:8085/workflow-engine/api/v1 |
host_store_address | https://localhost/host-store/api/v1 | https://localhost:8882/host-store/api/v1 |
keyvault_address | https://localhost/keyvault/api/v1 | https://localhost:8090/keyvault/api/v1 |
networkaccessmanager_address | https://localhost/network-access-manager/api/v1 | https://localhost:8899/network-access-manager/api/v1 |
extenderservice_address | https://localhost/extender-service/api/v1 | https://localhost:8981/extender-service/api/v1 |
connectionmanager_address | https://localhost/connection-manager/api/v1 | https://localhost:8091/connection-manager/api/v1 |
connectionmanager_ws_address | wss://localhost/connection-manager/api/v1/websocket | wss://localhost:8091/connection-manager/api/v1/websocket |
authorizer_address | https://localhost/authorizer/api/v1 | https://localhost:8082/authorizer/api/v1 |
rdp_proxy_address | https://localhost/rdp-proxy/api/v1 | https://localhost:8087/rdp-proxy/api/v1 |
ssh_proxy_address | https://localhost/ssh-proxy/api/v1 | https://localhost:8880/ssh-proxy/api/v1 |
monitor_address | https://localhost/monitor-service/api/v1 | https://localhost:8092/monitor-service/api/v1 |
rdpmitm_address | https://localhost/rdp-mitm/api/v1 | https://localhost:8093/rdp-mitm/api/v1 |
trail-index_address | https://localhost/trail-index/api/v1 | https://localhost:8094/trail-index/api/v1 |
sshmitm_address | https://localhost/ssh-mitm/api/v1 | https://localhost:8095/ssh-mitm/api/v1 |
vault_address | https://localhost/vault/api/v1 | https://localhost:8098/vault/api/v1 |
secrets_manager_address | https://localhost/secrets-manager/api/v1 | https://localhost:8100/secrets-manager/api/v1 |
license_manager_address | https://localhost/license-manager/api/v1 | https://localhost:8101/license-manager/api/v1 |
settings_address | https://localhost/settings/api/v1 | https://localhost:8099/settings/api/v1 |
dbproxy_address | https://localhost/db-proxy/api/v1 | https://localhost:8983/db-proxy/api/v1 |
apiproxy_address | https://localhost/api-proxy/api/v1 | https://localhost:8984/api-proxy/api/v1 |
Settings not listed in the table use the same values in both microservice communication modes.
Save your changes, then restart PrivX services on each PrivX Server to apply them.