# Runtime Environment & Options

Signal K Server provides the following command line options and environment variables to configure your implementation.

## Command line options

Option | Description
--- | ---
`-s` | Override path to the settings file. (same as `SIGNALK_NODE_SETTINGS` environment variable)
`-c` | Override the path to find server configuration. (same as `SIGNALK_NODE_CONFIG_DIR` environment variable)
`--sample-nmea0183-data` | Starts signalk-server with sample NMEA0183 data.
`--sample-n2k-data` | Starts signalk-server with sample NMEA2000 data.
`--override-timestamps` | Override timestamps in the sample NMEA2000 data with current date and time. Doesn't apply nor makes a difference to NMEA0183 sample data.
`--securityenabled` | Enable security. For a fresh install this makes the Admin UI force the user to create an admin account before he/she can continue further into the UI. See Security for further details.

## Environment variables

Variable | Description
--- | ---
`PORT` | Override the port for http/ws service (default is 3000).
`SSLPORT` | Override the port for https/wss service. If defined forces ssl as default protocol (default port is 3443).
`PROTOCOL` | Override http/https where the server is accessed via https but the server sees http (e.g. when Heroku handles https termination)
`EXTERNALPORT` | The port used in /signalk response and Bonjour advertisement. Has precedence over configuration file.
`EXTERNALHOST` | The host used in /signalk response and Bonjour advertisement. Has precedence over configuration file.
`FILEUPLOADSIZELIMIT` | Override the file upload size limit (default is '10mb').
`NMEA0183PORT` | Override the port for the NMEA 0183 over tcp service (default is 10110).
`TCPSTREAMPORT` | Override the port for the Signal K Streaming (deltas) over TCP.
`TCPSTREAMADDRESS` | Override the address the Signal K Stream (deltas) over TCP is listening on.
`DISABLEPLUGINS` | Disable all plugins so that they can not be enabled (default is false).
`DEFAULTENABLEDPLUGINS` | A comma separated list of plugin ids that are overridden to be enabled by default if no setttings exist. Lower preference than `DISABLEPLUGINS`.
`PLUGINS_WITH_UPDATE_DISABLED` | A comma separated list of plugin that will not be updated.
`SECURITYSTRATEGY` | Override the security strategy module name.
`WSCOMPRESSION` | Compress websocket messages (default is false).
`MAXSENDBUFFERSIZE` | The maximum number of bytes allowed in the server's send buffer of a WebSocket connection. The connection will be terminated if this is exceeded for MAXSENDBUFFERCHECKTIME milliseconds. Guards against slow or dysfunctional clients that can not cope with the message volume (default is 512 * 1024 bytes).
`MAXSENDBUFFERCHECKTIME` | The maximum number of bytes allowed in the server's send buffer of a WebSocket connection. The connection will be terminated if this is exceeded. Guards against slow or dysfunctional clients that can not cope with the message volume (default is 512 * 1024 bytes).
`SIGNALK_SERVER_IS_UPDATABLE` | Allows the server to be updated through the GUI even if it is not installed in the standard paths (default is false). If set to true, the server must have been installed with `npm install -g signalk-server`.
`SIGNALK_DISABLE_SERVER_UPDATES` | Disables server updates in the GUI (default is false).
`DEBUG` | A comma-separated list of tags for debugging the specified module (e.g signalk-server*,signalk-provider-tcp). Can now be defined directly in the graphical interface. More help on how to use the debug here: `https://www.npmjs.com/package/debug#wildcards`
`IS_IN_DOCKER` | Used to tell the server it is in Docker and not normally updateable (default is false).
`NPMREGISTRYTIMEOUT` | How long to wait for the registry when retrieving the App Store listing (default is 20s).
`SECRETKEY` | A secret string used to generate an authentication token (the internal default autogenerated is a string of 512 hex chars like 'ef8307a4c7a4bd7...309d947bca3')
`ALLOW_DEVICE_ACCESS_REQUESTS` | Used when a device needs to gain access to a secured Signal K server (default is true) (https://signalk.org/specification/1.4.0/doc/access_requests.html).
`ALLOW_NEW_USER_REGISTRATION` | (default is true).
`ADMINUSER` | Force an account for admin user (username:password format).
`PRESERIALCOMMAND` | Command to run before opening a serial port.
`SIGNALK_NODE_SETTINGS` | Override the path to the settings file.
`SIGNALK_NODE_CONFIG_DIR` | Override the path to find server configuration. Includes all run-time changing content: configuration files, plugins, plugin configuration files, webapps, and so forth.