Search…
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:
1
{
2
"data": "C:/ProgramData/Ninox",
3
"ssl": false,
4
"host": "localhost",
5
"port": 8080,
6
"bindPort": 8080,
7
"bindInterface": "0.0.0.0",
8
"redirectPort": 9090,
9
"workers": 2,
10
"emailHost": "",
11
"emailPort": 25,
12
"emailSecure": true,
13
"emailUser": "",
14
"emailPassword": "",
15
"emailFrom": "",
16
"emailClient": "",
17
"snapshots": true
18
}
Copied!

data

Data directory in which Ninox will store data. Provide an absolute path to an existing directory for data.

ssl

An object to specify path where SSL certificates for Ninox server will be. On boot, Ninox server will use the paths specified in ssl to look for proper certificates and boot accordingly.
Options:
  • pfx: path of pfx file
  • cert: path of certificate file (works only if pfx is not specified)
  • key: path of certificate's 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:
1
{
2
"ssl": {
3
"pfx": "path/to/pfx",
4
"passphrase": "passphrase-used-when-creating-pfx"
5
}
6
}
Copied!
Example code when using a certificate file:
1
{
2
"ssl": {
3
"cert": "path/to/cert/file",
4
"key": "path/to/key/file",
5
"ca": "path/to/ca/file"
6
}
7
}
Copied!
The default value is an empty string which launches the server when SSL is disabled. We recommend specifying SSL-related paths if there won't be a proxy sitting between the server and client. Otherwise, SSL certificates shall sit on the proxy itself.

host

Hostname you will access the Ninox server from.

port

Port that the Ninox server should assume it will be accessed from. Default is 80 for HTTP and should be changed to 443 for HTTPS.

bindPort

Port that the Ninox server will actually listen to for incoming requests.

bindInterface

Host on which the Ninox server will boot. It is recommended to leave it unchanged for simple deployments.

redirectPort

Port on which a redirect server will listen. The redirect server will redirect all requests on the aforementioned port to the port specified in port property of the server configuration. It 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:
1
{
2
"port" : 443,
3
"bindPort" : 8443,
4
"redirectPort" : 80
5
}
Copied!
Check thatbindPortandredirectPorthave different values.

workers

Number worker processes that will handle incoming connection. The value should either be a number ornull. We recommended null as Ninox will auto-determine the suitable number of worker processes to be spawned based on server configuration.

apiAuthorization (deprecated since Ninox 3.4.0 and higher)

Authorization key for accessing the Ninox API. apiAuthorization should have a value in the following format:
1
{
2
// rest of server-config file
3
'apiAuthorization: Bearer {accessToken}'
4
}
Copied!

emailHost

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

emailPort

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

emailSecure

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

emailUser

User name for SMTP authentication. Required only if emailSecure is true.

emailPassword

Password for SMTP authentication. Required only if emailSecure is true.

emailFrom

The default sender's address, e.g., [email protected]. If not specified the value will be the value 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 Google SMTP configuration.

cryptoAESKey

Key for database encryption/decryption.

snapshots

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

ipcPort

Port to be used for inter process communication. Do not modify unless necessary. Confirm the port specified is not being listened on by other processes.

die

The number of milliseconds, a Ninox team will be kept alive after the latest request has ended. The recommended value is 60000 or higher.
Export as PDF
Copy link
Contents