# Configure Desktop App

The Psono desktop app can be configured manually by each user or centrally by administrators. Central configuration is useful if you want to preconfigure the server URL and disable manual server changes for managed devices.

The configuration value is the same config.json format that is used by the webclient.

# Configuration (manually)

A user can manually configure the desktop app with the Remote Config feature.

The user enters the server address and starts Remote Config. The app connects to the server, asks for the WEBCLIENT_URL, then connects to the webclient and downloads the config.json.

Desktop App Remote Config

# Configuration (with managed configuration)

As an alternative to manual configuration, administrators can configure the desktop app centrally.

Platform Source
macOS Managed App Configuration provided by the MDM solution
Windows Registry policy value
Linux Configuration file

Use the key ConfigJson and set its value to the JSON configuration.

Example:

{
  "backend_servers": [
    {
      "title": "Your Company",
      "url": "https://example.com/server"
    }
  ],
  "base_url": "https://example.com/",
  "allow_custom_server": false,
  "allow_registration": true,
  "allow_lost_password": true
}

Most MDM systems expect this as a string value under the ConfigJson key:

{
  "ConfigJson": "{\"backend_servers\":[{\"title\":\"Your Company\",\"url\":\"https://example.com/server\"}],\"base_url\":\"https://example.com/\",\"allow_custom_server\":false,\"allow_registration\":true,\"allow_lost_password\":true}"
}

The app also accepts the configuration keys directly if your MDM supports structured managed configuration dictionaries.

# Behavior

When a managed configuration is present, the app stores it as a managed configuration and uses the first entry in backend_servers as the server URL.

If the managed configuration is removed, the app removes the managed configuration from its local state. Users can then configure the app manually again.

# macOS

Configure the app through your MDM solution with Managed App Configuration.

Use:

Key Type Value
ConfigJson String Escaped JSON configuration

# Windows

On Windows, the app reads the managed configuration from the registry.

Create this registry value:

HKLM\SOFTWARE\Policies\esaqa\Psono

Value:

Name Type Value
ConfigJson REG_SZ JSON configuration

To automate this, you can put the following content into a psono.reg file and execute it:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\esaqa\Psono]
"ConfigJson"="{\"backend_servers\":[{\"title\":\"Your Company\",\"url\":\"https://example.com/server\"}],\"base_url\":\"https://example.com/\",\"allow_custom_server\":false,\"allow_registration\":true,\"allow_lost_password\":true}"

Example PowerShell:

if ((Test-Path -LiteralPath "HKLM:\SOFTWARE\Policies\esaqa\Psono") -ne $true) {
  New-Item "HKLM:\SOFTWARE\Policies\esaqa\Psono" -Force -ea SilentlyContinue
}

New-ItemProperty `
  -LiteralPath "HKLM:\SOFTWARE\Policies\esaqa\Psono" `
  -Name "ConfigJson" `
  -Value '{"backend_servers":[{"title":"Your Company","url":"https://example.com/server"}],"base_url":"https://example.com/","allow_custom_server":false,"allow_registration":true,"allow_lost_password":true}' `
  -PropertyType String `
  -Force -ea SilentlyContinue

# Linux

On Linux, the app reads the managed configuration from this file:

/etc/opt/psono/config.json

Example:

{
  "backend_servers": [
    {
      "title": "Your Company",
      "url": "https://example.com/server"
    }
  ],
  "base_url": "https://example.com/",
  "allow_custom_server": false,
  "allow_registration": true,
  "allow_lost_password": true
}