0

Sample configuration file

๐Ÿ’ก Content in curly brackets { } signifies a placeholder. Both the curly brackets and the content within must be replaced for the request to work.

 server-config.json provides the following configuration options:

{
    "data": "C:/ProgramData/Ninox",
    "ssl": false,
    "host": "localhost",
    "port": 8080,
    "bindPort": 8080,
    "bindInterface": "0.0.0.0",
    "redirectPort": 9090,
    "workers": 2,
    "emailHost": "",
    "emailPort": 25,
    "emailSecure": false,
    "emailUser": "",
    "emailPassword": "",
    "emailFrom": "",
    "emailClient": "",
    "snapshots": true
}

data

The data directory in which Ninox stores data. Provide an absolute path to an existing directory for data.

ssl

An object to specify the path where SSL certificates for your Ninox server are going to be. On boot, the Ninox server uses the paths specified in ssl to look for proper certificates and boot accordingly.

Options

Path Name Path Definition
pfx path of pfx file
cert path of certificate file
works only if pfx is not specified
key path of certificate key
works only if pfx is not specified
ca path of ca certificate, if any
works only if pfx is not specified
passphrase string containing passphrase, if used while generating the key and certificate

Example code when using a pfx file

{
  "ssl": {
    "pfx": "path/to/pfx",
    "passphrase": "passphrase-used-when-creating-pfx"
  }
}

Example code when using a certificate file

{
  "ssl": {
    "cert": "path/to/cert/file",
    "key": "path/to/key/file",
    "ca": "path/to/ca/file"
  }
}

The default value is an empty string which launches the server when SSL is disabled. We recommend you specify SSL-related paths if there is no proxy sitting between the server and client. Otherwise, SSL certificates shall sit on the proxy itself.

host

The hostname from which you access the Ninox server.

port

The port from which the Ninox server should assume it's going to get accessed. The default value for HTTP is 80 and 443 for HTTPS.

bindPort

The port that the Ninox server actually listens to for incoming requests.

bindInterface

The host on which the Ninox server boots. We recommend you leave bindInterface as-is for simple deployments.

redirectPort

The port on which a redirect server listens. The redirect server redirects all requests on the aforementioned port to the value specified in port.

redirectPort is typically used when an SSL enabled server is running, and HTTP requests need to be redirected to the SSL server port.

Example code when using redirectPort

{
"port" : 443,
"bindPort" : 8443,
"redirectPort" : 80
}

โœ… Check that bindPort and redirectPort have different values.

workers

The number worker processes that handle incoming connection. The value should either be a number or null. We recommend null as Ninox auto-determines the suitable number of worker processes to be spawned based on server configuration.

apiAuthorization (deprecated since Ninox 3.4.0 and higher)

The authorization key for accessing the Ninox API. apiAuthorization should have a value in the following format:

{
  // rest of server-config file
  'apiAuthorization: Bearer {accessToken}'
}

emailHost

The host (DNS name or IP address of the SMTP server). The default is an empty string. Configure emailHost with a proper SMTP host.

emailPort

The port of the SMTP server. The default value is 25.

emailSecure

A boolean value that specifies whether the SMTP server requires authentication. The default value is false.

Default value must be set to false to work with Microsoft Office 365 as host

โœ… When using Microsoft Office 365 as host, check the default value false is not accidentally set to true. This ensures that your server will be correctly configured to work with Microsoft Office 365.

emailUser

The user name for SMTP authentication. Required only if emailSecure is true.

emailPassword

The password for SMTP authentication. Required only if emailSecure is true.

emailFrom

The default sender's address, e.g., ninox@mycompany.com. When not specified, the value is that of emailUser.

emailClient

Use emailClient only if you configure a Google SMTP and its value should be the host of Ninox that is whitelisted in the Google SMTP configuration.

cryptoAESKey

The key for database encryption/decryption.

snapshots

A boolean value that specifies whether Ninox server shall automatically create database snapshots. The recommended value is true.

ipcPort

The port for inter-process communication. Do not modify ipcPort unless necessary. Confirm the port specified is not being listened on by other processes.

die

The number of milliseconds a Ninox workspace is kept alive after the latest request has ended. The recommended value is 60000 or higher.

Reply

null