{"__v":0,"_id":"588f722bbcace50f0052ba00","category":{"version":"588f722bbcace50f0052b9e1","project":"565f5fa26bafd40d0030a064","_id":"588f722bbcace50f0052b9e7","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-12-17T21:29:23.551Z","from_sync":false,"order":5,"slug":"server-installation-configuration","title":"Self Hosting"},"parentDoc":null,"project":"565f5fa26bafd40d0030a064","user":"565f5f29de5dc50d00acfe9f","version":{"__v":1,"_id":"588f722bbcace50f0052b9e1","project":"565f5fa26bafd40d0030a064","createdAt":"2017-01-30T17:04:43.410Z","releaseDate":"2017-01-30T17:04:43.410Z","categories":["588f722bbcace50f0052b9e2","588f722bbcace50f0052b9e3","588f722bbcace50f0052b9e4","588f722bbcace50f0052b9e5","588f722bbcace50f0052b9e6","588f722bbcace50f0052b9e7"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"5.3.0","version":"5.3.0"},"updates":["57e547d700c8680e00fae7d1","57eaed3d98d0570e00c328e5"],"next":{"pages":[],"description":""},"createdAt":"2016-02-11T22:00:30.916Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":4,"body":"## Configuration File\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"##################################################\\n### Example nanoscale.io server configuration file\\n### Copyright (c) 2016 AnyPresence Inc.\\n### Documentation: http://devhub.nanoscale.io\\n### Support: http://support.nanoscale.io, support:::at:::nanoscale.io\\n##################################################\\n\\n## ---------- General ------------\\n# The path to a valid Gateway license key, default is './license'.\\n# license = ''\\n\\n# The license contents as a base64 encoded string.  If present, license option is ignored\\n# licenseContent = ''\\n\\n# Whether or not to run in server mode, default is false.\\n# server =\\n\\n# Whether or not to run background jobs, default is true.\\n# jobs =\\n\\n## ---------- Database ------------\\n[database]\\n# The connection string for your database, default is './gateway.db' for sqlite driver.\\n# Example: postgres connectionString = 'dbname=my_db user=user sslmode=disable host=my_host password=my_password'\\n# Postgres connectionString options:\\n#   dbname - The name of the database to connect to\\n#   user - The user to sign in as\\n#   password - The user's password\\n#   host - The host to connect to. Values that start with / are for unix domain sockets. (default is localhost)\\n#   port - The port to bind to. (default is 5432)\\n#   sslmode - Whether or not to use SSL (default is require, this is not the default for libpq)\\n#   fallback_application_name - An application_name to fall back to if one isn't provided.\\n#   connect_timeout - Maximum wait for connection, in seconds. Zero or not specified means wait indefinitely.\\n#   sslcert - Cert file location. The file must contain PEM encoded data.\\n#   sslkey - Key file location. The file must contain PEM encoded data.\\n#   sslrootcert - The location of the root certificate file. The file must contain PEM encoded data.\\n#\\n#   Valid sslmode values:\\n#       * disable - No SSL\\n#       * require - Always SSL (skip verification)\\n#       * verify-ca - Always SSL (verify that the certificate presented by the server was signed by a trusted CA)\\n#       * verify-full - Always SSL (verify that the certification presented by the server was signed by a trusted CA and the server host name matches the one in the certificate)\\n#\\n#     Use single quotes for values that contain whitespace:\\n#       \\\"user=pgtest password='with spaces'\\\"\\n#\\n#     A backslash will escape the next character in values:\\n#       \\\"user=space\\\\ man password='it\\\\'s valid'\\\" (default \\\"gateway.db\\\")\\n#\\n# connectionString = 'dbname=my_db user=user sslmode=disable host=my_host password=my_password'\\n\\n# The database driver; sqlite or postgres, default is 'sqlite3'. NOTE: Use sqllite for local development only.\\n# driver = 'postgres'\\n\\n# The maximum number of connections to use, default is 50.\\n# maxConnections =\\n\\n# Whether or not to migrate the database on startup, default is false.\\n# migrate =\\n\\n## --------------------------------------------------------------------------\\n\\n\\n## ---------- Admin ------------\\n[admin]\\n# Whether or not to add a default environment to new APIs, default is true.\\n# addDefaultEnv =\\n\\n# The auth key to use for sessions. 64 chars recommended. Required in server mode.\\n# authKey = 'CHANGE'\\n\\n# Same as sessionAuthKey, to be used during key rotation.\\n# authKey2 = ''\\n\\n# The Access-Control-Allow-Origin header value to send with admin responses, default is '*'\\n# corsOrigin = ''\\n\\n# Set to false to disable CORS headers from being added to admin responses, default is true.\\n# corsEnabled =\\n\\n# Whether or not to create a deafult host when an API is created, based off of the configured proxy-domain, default is true\\n# createDefaultHost =\\n\\n# The name of the default environment to create, default is 'Development'\\n# defaultEnvName = ''\\n\\n# Enable account enableRegistration API, default is true.\\n# enableRegistration =\\n\\n# The encryption key to use for sessions. 32 chars recommended. If unset, encryption is disabled.\\n# encryptionKey = ''\\n\\n# Same as sessionEncryptionKey, to be used during key rotation.\\n# encryptionKey2 = ''\\n\\n# The host the administrative area is accessible via.\\n# host = ''\\n\\n# The password for HTTP Basic Auth to protect the site admin functionality. Default is blank.\\n# password = 'CHANGE'\\n\\n# The path prefix the administrative area is accessible under, default is '/admin/'\\n# pathPrefix = ''\\n\\n# The HTTP Basic realm to use (optional).\\n# realm = ''\\n\\n# The header to send the admin request ID back in. Not sent if blank, default is 'X-Gateway-Admin-Request'\\n# requestIdHeader = ''\\n\\n# The domain to set on the admin session cookie, default is blank.\\n# cookieDomain =\\n\\n# The name of the cookie to use for sessions, default is '__ap_gateway'.\\n# sessionName = ''\\n\\n# Whether or not to expose the Gateway version to the Admin UI, default is true.\\n# showVersion =\\n\\n# The username HTTP Basic Auth to protect the site admin functionality, default is 'admin'.\\n# username = ''\\n\\n# Set to false to disable CORS headers from being added to admin responses.\\n# corsEnabled = true\\n\\n# The Access-Control-Allow-Origin header value to send with admin responses.\\n# corsOrigin = '*'\\n\\n# Run as messaging broker, default is true.\\n# enableBroker = true\\n\\n# The address or name of the broker, default is localhost.\\n# broker = 'localhost'\\n\\n# The port of the broker pub, default is 5555.\\n# brokerPubPort = '5555'\\n\\n# The port of the broker sub, default is 5556.\\n# brokerSubPort = '5556'\\n\\n# The broker transport, default is 'tcp'.\\n# brokerTransport = 'tcp'\\n\\n# The broker websocket location, default is localhost:5000.\\n# brokerWs = 'localhost:5000'\\n\\n# Enable account registration API, default is true. Only applies in server mode.\\n# enableRegistration = true\\n\\n# The Base URL to use for accessing the API that will be displayed to the user in the front-end admin app after an API is created.  This value can be interpolated based on the hosts configured for an API.  Default is 'http://{{hosts[0]}}:5000' where '{{hosts[0]}}' the first value in the array of interpolated hosts for that API.\\n# defaultAPIAccessScheme = \\\"http://{{hosts.[0]}}:5000\\\"\\n\\n# A Google Analytics Tracking ID to be used by the rendered Admin UI.\\n# googleAnalyticsTrackingId = ''\\n\\n## ---------- Proxy ------------\\n[proxy]\\n# Whether or not to cache API data when serving proxy calls, default is false.\\n# cacheApis =\\n\\n# The number of lines of code to show around script errors, default is 2. NOTE: this option is only available when server = true.\\n# numErrorLines =\\n\\n# The timeout in seconds to use for proxy script code, default is 5.\\n# codeTimeout =\\n\\n# The domain name for the proxy server. Required when running in server mode, else defaults to lvh.me (default \\\"lvh.me\\\")\\n# domain = ''\\n\\n# Whether or not to expose the OS's ENV to proxy code, default is false.\\n# enableOsEnv =\\n\\n# The hostname of the proxy server, default is localhost.\\n# host =\\n\\n# The timeout in seconds to use for proxied HTTP requests, default is 60.\\n# httpTimeout =\\n\\n# The port of the proxy server, default is 5000.\\n# port =\\n\\n# The header to send the proxy request ID back in. Not sent if blank.\\n# requestIdHeader = ''\\n\\n[remoteEndpoint]\\n# Whether or not http remote endpoints are enabled, defaults is true.\\n# httpEnabled =\\n\\n# Whether or not MongoDB remote endpoints are enabled, defaults is true.\\n# mongoDbEnabled =\\n\\n# Whether or not MySQL remote endpoints are enabled, defaults is true.\\n# mySqlEnabled =\\n\\n# Whether or not PostgreSQL remote endpoints are enabled, defaults is true.\\n# postgreSqlEnabled =\\n\\n# Whether or not script remote endpoints are enabled, defaults is true.\\n# scriptEnabled =\\n\\n# Whether or not soap remote endpoints are enabled, defaults is true.\\n# soapEnabled =\\n\\n# Whether or not MS SQLServer remote endpoints are enabled, defaults is true.\\n# sqlServerEnabled =\\n\\n# Whether or not LDAP remote endpoints are enabled, default is true.\\n# ldapEnabled =\\n\\n# Whether or not the local store remote endpoints are enabled, default is false.\\n# storeEnabled =\\n\\n[soap]\\n# The hostname for the SOAP client, default is 'localhost'\\n# soapClientHost = ''\\n\\n# The port number to listen on for the SOAP client, default is 19083\\n# soapClientPort =\\n\\n# The JVM options to pass to the JVM on startup that will be used to invoke SOAP services, default is blank\\n# javaOpts = ''\\n\\n# The home directory of your JDK 1.8 installation, default is what's in the path\\n# jdkPath = ''\\n\\n# The number of worker threads in the JVM that will concurrently process soap requests.  When set to 0, pooling is disabled (i.e. a new thread per request), defaults to 0.\\n# threadPoolSize =\\n\\n## ---------- Logging ------------\\n[bleve]\\n# Number of days to keep the logs, default is 30\\n# loggingDeleteAfter =\\n\\n# The bleve file to store logs, default is 'logs.bleve'\\n# loggingFile = ''\\n\\n[elasticLogging]\\n# Number of days to keep the logs, default is 30\\n# loggingDeleteAfter =\\n\\n# The url of the elastic server\\n# url = ''\\n\\n## ---------- Error Notification (optional) ------------\\n[airbrake]\\n# The API key to use for Airbrake notifications.\\n# apiKey = ''\\n\\n# The environment tag under which errors are reported to Airbrake.\\n# environment = ''\\n\\n# The ID assigned to your Airbrake project.\\n# projectId =\\n\\n## ---------- SMTP (required if registration is enabled or password reset notification is needed) ------------\\n[smtp]\\n# The host to be used in email links\\n# emailHost = ''\\n\\n# The port to be used in email links\\n# emailPort =\\n\\n# The scheme to be used in email links, default is 'http'\\n# emailScheme = ''\\n\\n# The password for the smtp server\\n# password = ''\\n\\n# The port of the smtp server, default is 25\\n# port = 25\\n\\n# The sender of emails from gateway\\n# sender = ''\\n\\n# The address or name of the smtp server\\n# server = ''\\n\\n# The user name for the smtp server\\n# user = ''\",\n      \"language\": \"toml\"\n    }\n  ]\n}\n[/block]\n## Command Line Options\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Usage of ./gateway-darwin-amd64:\\n  -admin-add-default-env\\n    \\tWhether or not to add a default environment to new APIs in dev mode (default true)\\n  -admin-cors-enabled\\n    \\tSet to false to disable CORS headers from being added to admin responses. (default true)\\n  -admin-cors-origin string\\n    \\tThe Access-Control-Allow-Origin header value to send with admin responses. (default \\\"*\\\")\\n  -admin-create-default-host\\n    \\tWhether or not to create a deafult host when an API is created, based off of the configured proxy-domain (default true)\\n  -admin-default-api-access-scheme string\\n    \\tThe Base URL to use for accessing the API that will be displayed to the user in the front-end admin app after an API is created.  This value can be interpolated based on the hosts configured for an API.  Default is 'http://{{hosts[0]}}:5000' where '{{hosts[0]}}' the first value in the array of interpolated hosts for that API. (default \\\"http://{{hosts.[0]}}:5000\\\")\\n  -admin-default-env-name string\\n    \\tThe name of the default environment to create (default \\\"Development\\\")\\n  -admin-enable-registration\\n    \\tEnable account registration API (default true)\\n  -admin-google-analytics-tracking-id string\\n    \\tA Google Analytics Tracking ID to be used by the rendered Admin UI.\\n  -admin-host string\\n    \\tThe host the administrative area is accessible via\\n  -admin-password string\\n    \\tThe password to require with HTTP Basic Auth to protect the site admin functionality\\n  -admin-path-prefix string\\n    \\tThe path prefix the administrative area is accessible under (default \\\"/admin/\\\")\\n  -admin-realm string\\n    \\tThe HTTP Basic realm to use. Optional.\\n  -admin-request-id-header string\\n    \\tThe header to send the admin request ID back in. Not sent if blank. (default \\\"X-Gateway-Admin-Request\\\")\\n  -admin-session-auth-key string\\n    \\tThe auth key to use for sessions. 64 chars recommended. Required.\\n  -admin-session-auth-key-rotate string\\n    \\tSame as admin-session-auth-key, to be used during key rotation.\\n  -admin-session-cookie-domain string\\n    \\tThe domain to set on the session cookie.\\n  -admin-session-encryption-key string\\n    \\tThe encryption key to use for sessions. 32 chars recommended. If unset, encryption is disabled.\\n  -admin-session-encryption-key-rotate string\\n    \\tSame as admin-session-encryption-key, to be used during key rotation.\\n  -admin-session-name string\\n    \\tThe name of the cookie to use for sessions. (default \\\"__ap_gateway\\\")\\n  -admin-show-version\\n    \\tWhether or not to expose the Gateway version (default true)\\n  -admin-username string\\n    \\tThe username to require with HTTP Basic Auth to protect the site admin functionality (default \\\"admin\\\")\\n  -airbrake-api-key string\\n    \\tThe API key to use for Airbrake notifications\\n  -airbrake-environment string\\n    \\tThe environment tag under which errors are reported to Airbrake\\n  -airbrake-project-id int\\n    \\tThe ID assigned to your Airbrake project\\n  -bleve-logging-delete-after int\\n    \\tHow long in days to keep logs (default 30)\\n  -bleve-logging-file string\\n    \\tThe bleve file to store logs in (default \\\"logs.bleve\\\")\\n  -broker string\\n    \\tThe address or name of the broker (default \\\"localhost\\\")\\n  -broker-pub-port string\\n    \\tThe port of the broker pub (default \\\"5555\\\")\\n  -broker-sub-port string\\n    \\tThe port of the broker sub (default \\\"5556\\\")\\n  -broker-transport string\\n    \\tThe broker transport (default \\\"tcp\\\")\\n  -broker-ws string\\n    \\tThe broker websocket location (default \\\"localhost:5000\\\")\\n  -config string\\n    \\tThe path to the configuration file (default \\\"gateway.conf\\\")\\n  -db-conn-string string\\n    \\tThe connection string for your database\\n\\n    \\tConnection string is of the format \\\"parameter=value parameter2=value2 parameter3=value3\\\"\\n\\n    \\tValid parameters:\\n\\n    \\t* dbname - The name of the database to connect to\\n    \\t* user - The user to sign in as\\n    \\t* password - The user's password\\n    \\t* host - The host to connect to. Values that start with / are for unix domain sockets. (default is localhost)\\n    \\t* port - The port to bind to. (default is 5432)\\n    \\t* sslmode - Whether or not to use SSL (default is require, this is not the default for libpq)\\n    \\t* fallback_application_name - An application_name to fall back to if one isn't provided.\\n    \\t* connect_timeout - Maximum wait for connection, in seconds. Zero or not specified means wait indefinitely.\\n    \\t* sslcert - Cert file location. The file must contain PEM encoded data.\\n    \\t* sslkey - Key file location. The file must contain PEM encoded data.\\n    \\t* sslrootcert - The location of the root certificate file. The file must contain PEM encoded data.\\n\\n    \\tValid sslmode values:\\n\\n    \\t* disable - No SSL\\n    \\t* require - Always SSL (skip verification)\\n    \\t* verify-ca - Always SSL (verify that the certificate presented by the server was signed by a trusted CA)\\n    \\t* verify-full - Always SSL (verify that the certification presented by the server was signed by a trusted CA and the server host name matches the one in the certificate)\\n\\n    \\tUse single quotes for values that contain whitespace:\\n\\n    \\t\\\"user=pgtest password='with spaces'\\\"\\n\\n    \\tA backslash will escape the next character in values:\\n\\n    \\t\\\"user=space\\\\ man password='it\\\\'s valid'\\\" (default \\\"gateway.db\\\")\\n  -db-driver string\\n    \\tThe database driver; sqlite or postgres (default \\\"sqlite3\\\")\\n  -db-max-connections int\\n    \\tThe maximum number of connections to use (default 50)\\n  -db-migrate\\n    \\tWhether or not to migrate the database on startup\\n  -elastic-logging-delete-after int\\n    \\tHow long in days to keep logs (default 30)\\n  -elastic-logging-url string\\n    \\tThe url of the elastic server\\n  -enable-broker\\n    \\tRun as messaging broker (default true)\\n  -example-config string\\n    \\tWhether to print an example gateway.conf file and quit\\n  -jobs\\n    \\tRun background jobs (default true)\\n  -license string\\n    \\tThe path to a valid Gateway license key\\n  -license-content string\\n    \\tThe license contents as a base64 encoded string.  If present, license option is ignored\\n  -oss-licenses string\\n    \\tWhether to print the list of libraries and respective licenses used by this product and quit\\n  -proxy-cache-apis\\n    \\tWhether or not to cache API data when serving proxy calls\\n  -proxy-code-error-lines int\\n    \\tThe number of lines of code to show around script errors in dev mode. (default 2)\\n  -proxy-code-timeout int\\n    \\tThe timeout in seconds to use for proxy script code. (default 5)\\n  -proxy-domain string\\n    \\tThe domain name for the proxy server. Required when running in server mode, else defaults to lvh.me (default \\\"lvh.me\\\")\\n  -proxy-enable-os-env\\n    \\tWhether or not to expose the OS's ENV to proxy code.\\n  -proxy-host string\\n    \\tThe hostname of the proxy server (default \\\"localhost\\\")\\n  -proxy-http-timeout int\\n    \\tThe timeout in seconds to use for proxied HTTP requests. (default 60)\\n  -proxy-port int\\n    \\tThe port of the proxy server (default 5000)\\n  -proxy-request-id-header string\\n    \\tThe header to send the proxy request ID back in. Not sent if blank.\\n  -remote-endpoint-http-enabled\\n    \\tWhether or not http remote endpoints are enabled. Defaults to true. (default true)\\n  -remote-endpoint-ldap-enabled\\n    \\tWhether or not LDAP remote endpoints are enabled. Defaults to true. (default true)\\n  -remote-endpoint-mongodb-enabled\\n    \\tWhether or not MongoDB remote endpoints are enabled. Defaults to true. (default true)\\n  -remote-endpoint-mysql-enabled\\n    \\tWhether or not MySQL remote endpoints are enabled. Defaults to true. (default true)\\n  -remote-endpoint-postgresql-enabled\\n    \\tWhether or not PostgreSQL remote endpoints are enabled. Defaults to true. (default true)\\n  -remote-endpoint-script-enabled\\n    \\tWhether or not script remote endpoints are enabled. Defaults to true. (default true)\\n  -remote-endpoint-soap-enabled\\n    \\tWhether or not soap remote endpoints are enabled. Defaults to true. (default true)\\n  -remote-endpoint-sqlserver-enabled\\n    \\tWhether or not MS SQLServer remote endpoints are enabled. Defaults to true. (default true)\\n  -remote-endpoint-store-enabled\\n    \\tWhether or not Store remote endpoints are enabled. Defaults to false.\\n  -server\\n    \\tWhether or not to run in server mode\\n  -smtp-email-host string\\n    \\tThe host to be used in email links\\n  -smtp-email-port int\\n    \\tThe port to be used in email links\\n  -smtp-email-scheme string\\n    \\tThe scheme to be used in email links (default \\\"http\\\")\\n  -smtp-password string\\n    \\tThe password for the smtp server\\n  -smtp-port int\\n    \\tThe port of the smtp server (default 25)\\n  -smtp-sender string\\n    \\tThe sender of emails from gateway\\n  -smtp-server string\\n    \\tThe address or name of the smtp server\\n  -smtp-user string\\n    \\tThe user name for the smtp server\\n  -soap-client-host string\\n    \\tThe hostname for the soap client.  Defaults to localhost. (default \\\"localhost\\\")\\n  -soap-client-port int\\n    \\tThe port number to listen on for the soap client.  Defaults to 19083 (default 19083)\\n  -soap-java-opts string\\n    \\tThe JVM options to pass to the JVM on startup that will be used to invoke SOAP services\\n  -soap-jdk-path string\\n    \\tThe home directory of your JDK 1.8 installation\\n  -soap-thread-pool-size int\\n    \\tThe number of worker threads in the JVM that will concurrently process soap requests.  When set to 0, pooling is disabled (i.e. a new thread per request).  Defaults to 0.\\n  -store-conn-string string\\n    \\tThe database connection string for the store. See: db-conn-string (default \\\"store.db\\\")\\n  -store-max-connections int\\n    \\tThe maximum number of connections to use (default 50)\\n  -store-migrate\\n    \\tWhether or not to migrate the store database on startup\\n  -store-type string\\n    \\tThe type of database to use for store remote endpoints (default \\\"boltdb\\\")\\n  -version\\n    \\tWhether to print the version and quit\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"configuration-options","type":"basic","title":"Configuration Options"}

Configuration Options


## Configuration File [block:code] { "codes": [ { "code": "##################################################\n### Example nanoscale.io server configuration file\n### Copyright (c) 2016 AnyPresence Inc.\n### Documentation: http://devhub.nanoscale.io\n### Support: http://support.nanoscale.io, support@nanoscale.io\n##################################################\n\n## ---------- General ------------\n# The path to a valid Gateway license key, default is './license'.\n# license = ''\n\n# The license contents as a base64 encoded string. If present, license option is ignored\n# licenseContent = ''\n\n# Whether or not to run in server mode, default is false.\n# server =\n\n# Whether or not to run background jobs, default is true.\n# jobs =\n\n## ---------- Database ------------\n[database]\n# The connection string for your database, default is './gateway.db' for sqlite driver.\n# Example: postgres connectionString = 'dbname=my_db user=user sslmode=disable host=my_host password=my_password'\n# Postgres connectionString options:\n# dbname - The name of the database to connect to\n# user - The user to sign in as\n# password - The user's password\n# host - The host to connect to. Values that start with / are for unix domain sockets. (default is localhost)\n# port - The port to bind to. (default is 5432)\n# sslmode - Whether or not to use SSL (default is require, this is not the default for libpq)\n# fallback_application_name - An application_name to fall back to if one isn't provided.\n# connect_timeout - Maximum wait for connection, in seconds. Zero or not specified means wait indefinitely.\n# sslcert - Cert file location. The file must contain PEM encoded data.\n# sslkey - Key file location. The file must contain PEM encoded data.\n# sslrootcert - The location of the root certificate file. The file must contain PEM encoded data.\n#\n# Valid sslmode values:\n# * disable - No SSL\n# * require - Always SSL (skip verification)\n# * verify-ca - Always SSL (verify that the certificate presented by the server was signed by a trusted CA)\n# * verify-full - Always SSL (verify that the certification presented by the server was signed by a trusted CA and the server host name matches the one in the certificate)\n#\n# Use single quotes for values that contain whitespace:\n# \"user=pgtest password='with spaces'\"\n#\n# A backslash will escape the next character in values:\n# \"user=space\\ man password='it\\'s valid'\" (default \"gateway.db\")\n#\n# connectionString = 'dbname=my_db user=user sslmode=disable host=my_host password=my_password'\n\n# The database driver; sqlite or postgres, default is 'sqlite3'. NOTE: Use sqllite for local development only.\n# driver = 'postgres'\n\n# The maximum number of connections to use, default is 50.\n# maxConnections =\n\n# Whether or not to migrate the database on startup, default is false.\n# migrate =\n\n## --------------------------------------------------------------------------\n\n\n## ---------- Admin ------------\n[admin]\n# Whether or not to add a default environment to new APIs, default is true.\n# addDefaultEnv =\n\n# The auth key to use for sessions. 64 chars recommended. Required in server mode.\n# authKey = 'CHANGE'\n\n# Same as sessionAuthKey, to be used during key rotation.\n# authKey2 = ''\n\n# The Access-Control-Allow-Origin header value to send with admin responses, default is '*'\n# corsOrigin = ''\n\n# Set to false to disable CORS headers from being added to admin responses, default is true.\n# corsEnabled =\n\n# Whether or not to create a deafult host when an API is created, based off of the configured proxy-domain, default is true\n# createDefaultHost =\n\n# The name of the default environment to create, default is 'Development'\n# defaultEnvName = ''\n\n# Enable account enableRegistration API, default is true.\n# enableRegistration =\n\n# The encryption key to use for sessions. 32 chars recommended. If unset, encryption is disabled.\n# encryptionKey = ''\n\n# Same as sessionEncryptionKey, to be used during key rotation.\n# encryptionKey2 = ''\n\n# The host the administrative area is accessible via.\n# host = ''\n\n# The password for HTTP Basic Auth to protect the site admin functionality. Default is blank.\n# password = 'CHANGE'\n\n# The path prefix the administrative area is accessible under, default is '/admin/'\n# pathPrefix = ''\n\n# The HTTP Basic realm to use (optional).\n# realm = ''\n\n# The header to send the admin request ID back in. Not sent if blank, default is 'X-Gateway-Admin-Request'\n# requestIdHeader = ''\n\n# The domain to set on the admin session cookie, default is blank.\n# cookieDomain =\n\n# The name of the cookie to use for sessions, default is '__ap_gateway'.\n# sessionName = ''\n\n# Whether or not to expose the Gateway version to the Admin UI, default is true.\n# showVersion =\n\n# The username HTTP Basic Auth to protect the site admin functionality, default is 'admin'.\n# username = ''\n\n# Set to false to disable CORS headers from being added to admin responses.\n# corsEnabled = true\n\n# The Access-Control-Allow-Origin header value to send with admin responses.\n# corsOrigin = '*'\n\n# Run as messaging broker, default is true.\n# enableBroker = true\n\n# The address or name of the broker, default is localhost.\n# broker = 'localhost'\n\n# The port of the broker pub, default is 5555.\n# brokerPubPort = '5555'\n\n# The port of the broker sub, default is 5556.\n# brokerSubPort = '5556'\n\n# The broker transport, default is 'tcp'.\n# brokerTransport = 'tcp'\n\n# The broker websocket location, default is localhost:5000.\n# brokerWs = 'localhost:5000'\n\n# Enable account registration API, default is true. Only applies in server mode.\n# enableRegistration = true\n\n# The Base URL to use for accessing the API that will be displayed to the user in the front-end admin app after an API is created. This value can be interpolated based on the hosts configured for an API. Default is 'http://{{hosts[0]}}:5000' where '{{hosts[0]}}' the first value in the array of interpolated hosts for that API.\n# defaultAPIAccessScheme = \"http://{{hosts.[0]}}:5000\"\n\n# A Google Analytics Tracking ID to be used by the rendered Admin UI.\n# googleAnalyticsTrackingId = ''\n\n## ---------- Proxy ------------\n[proxy]\n# Whether or not to cache API data when serving proxy calls, default is false.\n# cacheApis =\n\n# The number of lines of code to show around script errors, default is 2. NOTE: this option is only available when server = true.\n# numErrorLines =\n\n# The timeout in seconds to use for proxy script code, default is 5.\n# codeTimeout =\n\n# The domain name for the proxy server. Required when running in server mode, else defaults to lvh.me (default \"lvh.me\")\n# domain = ''\n\n# Whether or not to expose the OS's ENV to proxy code, default is false.\n# enableOsEnv =\n\n# The hostname of the proxy server, default is localhost.\n# host =\n\n# The timeout in seconds to use for proxied HTTP requests, default is 60.\n# httpTimeout =\n\n# The port of the proxy server, default is 5000.\n# port =\n\n# The header to send the proxy request ID back in. Not sent if blank.\n# requestIdHeader = ''\n\n[remoteEndpoint]\n# Whether or not http remote endpoints are enabled, defaults is true.\n# httpEnabled =\n\n# Whether or not MongoDB remote endpoints are enabled, defaults is true.\n# mongoDbEnabled =\n\n# Whether or not MySQL remote endpoints are enabled, defaults is true.\n# mySqlEnabled =\n\n# Whether or not PostgreSQL remote endpoints are enabled, defaults is true.\n# postgreSqlEnabled =\n\n# Whether or not script remote endpoints are enabled, defaults is true.\n# scriptEnabled =\n\n# Whether or not soap remote endpoints are enabled, defaults is true.\n# soapEnabled =\n\n# Whether or not MS SQLServer remote endpoints are enabled, defaults is true.\n# sqlServerEnabled =\n\n# Whether or not LDAP remote endpoints are enabled, default is true.\n# ldapEnabled =\n\n# Whether or not the local store remote endpoints are enabled, default is false.\n# storeEnabled =\n\n[soap]\n# The hostname for the SOAP client, default is 'localhost'\n# soapClientHost = ''\n\n# The port number to listen on for the SOAP client, default is 19083\n# soapClientPort =\n\n# The JVM options to pass to the JVM on startup that will be used to invoke SOAP services, default is blank\n# javaOpts = ''\n\n# The home directory of your JDK 1.8 installation, default is what's in the path\n# jdkPath = ''\n\n# The number of worker threads in the JVM that will concurrently process soap requests. When set to 0, pooling is disabled (i.e. a new thread per request), defaults to 0.\n# threadPoolSize =\n\n## ---------- Logging ------------\n[bleve]\n# Number of days to keep the logs, default is 30\n# loggingDeleteAfter =\n\n# The bleve file to store logs, default is 'logs.bleve'\n# loggingFile = ''\n\n[elasticLogging]\n# Number of days to keep the logs, default is 30\n# loggingDeleteAfter =\n\n# The url of the elastic server\n# url = ''\n\n## ---------- Error Notification (optional) ------------\n[airbrake]\n# The API key to use for Airbrake notifications.\n# apiKey = ''\n\n# The environment tag under which errors are reported to Airbrake.\n# environment = ''\n\n# The ID assigned to your Airbrake project.\n# projectId =\n\n## ---------- SMTP (required if registration is enabled or password reset notification is needed) ------------\n[smtp]\n# The host to be used in email links\n# emailHost = ''\n\n# The port to be used in email links\n# emailPort =\n\n# The scheme to be used in email links, default is 'http'\n# emailScheme = ''\n\n# The password for the smtp server\n# password = ''\n\n# The port of the smtp server, default is 25\n# port = 25\n\n# The sender of emails from gateway\n# sender = ''\n\n# The address or name of the smtp server\n# server = ''\n\n# The user name for the smtp server\n# user = ''", "language": "toml" } ] } [/block] ## Command Line Options [block:code] { "codes": [ { "code": "Usage of ./gateway-darwin-amd64:\n -admin-add-default-env\n \tWhether or not to add a default environment to new APIs in dev mode (default true)\n -admin-cors-enabled\n \tSet to false to disable CORS headers from being added to admin responses. (default true)\n -admin-cors-origin string\n \tThe Access-Control-Allow-Origin header value to send with admin responses. (default \"*\")\n -admin-create-default-host\n \tWhether or not to create a deafult host when an API is created, based off of the configured proxy-domain (default true)\n -admin-default-api-access-scheme string\n \tThe Base URL to use for accessing the API that will be displayed to the user in the front-end admin app after an API is created. This value can be interpolated based on the hosts configured for an API. Default is 'http://{{hosts[0]}}:5000' where '{{hosts[0]}}' the first value in the array of interpolated hosts for that API. (default \"http://{{hosts.[0]}}:5000\")\n -admin-default-env-name string\n \tThe name of the default environment to create (default \"Development\")\n -admin-enable-registration\n \tEnable account registration API (default true)\n -admin-google-analytics-tracking-id string\n \tA Google Analytics Tracking ID to be used by the rendered Admin UI.\n -admin-host string\n \tThe host the administrative area is accessible via\n -admin-password string\n \tThe password to require with HTTP Basic Auth to protect the site admin functionality\n -admin-path-prefix string\n \tThe path prefix the administrative area is accessible under (default \"/admin/\")\n -admin-realm string\n \tThe HTTP Basic realm to use. Optional.\n -admin-request-id-header string\n \tThe header to send the admin request ID back in. Not sent if blank. (default \"X-Gateway-Admin-Request\")\n -admin-session-auth-key string\n \tThe auth key to use for sessions. 64 chars recommended. Required.\n -admin-session-auth-key-rotate string\n \tSame as admin-session-auth-key, to be used during key rotation.\n -admin-session-cookie-domain string\n \tThe domain to set on the session cookie.\n -admin-session-encryption-key string\n \tThe encryption key to use for sessions. 32 chars recommended. If unset, encryption is disabled.\n -admin-session-encryption-key-rotate string\n \tSame as admin-session-encryption-key, to be used during key rotation.\n -admin-session-name string\n \tThe name of the cookie to use for sessions. (default \"__ap_gateway\")\n -admin-show-version\n \tWhether or not to expose the Gateway version (default true)\n -admin-username string\n \tThe username to require with HTTP Basic Auth to protect the site admin functionality (default \"admin\")\n -airbrake-api-key string\n \tThe API key to use for Airbrake notifications\n -airbrake-environment string\n \tThe environment tag under which errors are reported to Airbrake\n -airbrake-project-id int\n \tThe ID assigned to your Airbrake project\n -bleve-logging-delete-after int\n \tHow long in days to keep logs (default 30)\n -bleve-logging-file string\n \tThe bleve file to store logs in (default \"logs.bleve\")\n -broker string\n \tThe address or name of the broker (default \"localhost\")\n -broker-pub-port string\n \tThe port of the broker pub (default \"5555\")\n -broker-sub-port string\n \tThe port of the broker sub (default \"5556\")\n -broker-transport string\n \tThe broker transport (default \"tcp\")\n -broker-ws string\n \tThe broker websocket location (default \"localhost:5000\")\n -config string\n \tThe path to the configuration file (default \"gateway.conf\")\n -db-conn-string string\n \tThe connection string for your database\n\n \tConnection string is of the format \"parameter=value parameter2=value2 parameter3=value3\"\n\n \tValid parameters:\n\n \t* dbname - The name of the database to connect to\n \t* user - The user to sign in as\n \t* password - The user's password\n \t* host - The host to connect to. Values that start with / are for unix domain sockets. (default is localhost)\n \t* port - The port to bind to. (default is 5432)\n \t* sslmode - Whether or not to use SSL (default is require, this is not the default for libpq)\n \t* fallback_application_name - An application_name to fall back to if one isn't provided.\n \t* connect_timeout - Maximum wait for connection, in seconds. Zero or not specified means wait indefinitely.\n \t* sslcert - Cert file location. The file must contain PEM encoded data.\n \t* sslkey - Key file location. The file must contain PEM encoded data.\n \t* sslrootcert - The location of the root certificate file. The file must contain PEM encoded data.\n\n \tValid sslmode values:\n\n \t* disable - No SSL\n \t* require - Always SSL (skip verification)\n \t* verify-ca - Always SSL (verify that the certificate presented by the server was signed by a trusted CA)\n \t* verify-full - Always SSL (verify that the certification presented by the server was signed by a trusted CA and the server host name matches the one in the certificate)\n\n \tUse single quotes for values that contain whitespace:\n\n \t\"user=pgtest password='with spaces'\"\n\n \tA backslash will escape the next character in values:\n\n \t\"user=space\\ man password='it\\'s valid'\" (default \"gateway.db\")\n -db-driver string\n \tThe database driver; sqlite or postgres (default \"sqlite3\")\n -db-max-connections int\n \tThe maximum number of connections to use (default 50)\n -db-migrate\n \tWhether or not to migrate the database on startup\n -elastic-logging-delete-after int\n \tHow long in days to keep logs (default 30)\n -elastic-logging-url string\n \tThe url of the elastic server\n -enable-broker\n \tRun as messaging broker (default true)\n -example-config string\n \tWhether to print an example gateway.conf file and quit\n -jobs\n \tRun background jobs (default true)\n -license string\n \tThe path to a valid Gateway license key\n -license-content string\n \tThe license contents as a base64 encoded string. If present, license option is ignored\n -oss-licenses string\n \tWhether to print the list of libraries and respective licenses used by this product and quit\n -proxy-cache-apis\n \tWhether or not to cache API data when serving proxy calls\n -proxy-code-error-lines int\n \tThe number of lines of code to show around script errors in dev mode. (default 2)\n -proxy-code-timeout int\n \tThe timeout in seconds to use for proxy script code. (default 5)\n -proxy-domain string\n \tThe domain name for the proxy server. Required when running in server mode, else defaults to lvh.me (default \"lvh.me\")\n -proxy-enable-os-env\n \tWhether or not to expose the OS's ENV to proxy code.\n -proxy-host string\n \tThe hostname of the proxy server (default \"localhost\")\n -proxy-http-timeout int\n \tThe timeout in seconds to use for proxied HTTP requests. (default 60)\n -proxy-port int\n \tThe port of the proxy server (default 5000)\n -proxy-request-id-header string\n \tThe header to send the proxy request ID back in. Not sent if blank.\n -remote-endpoint-http-enabled\n \tWhether or not http remote endpoints are enabled. Defaults to true. (default true)\n -remote-endpoint-ldap-enabled\n \tWhether or not LDAP remote endpoints are enabled. Defaults to true. (default true)\n -remote-endpoint-mongodb-enabled\n \tWhether or not MongoDB remote endpoints are enabled. Defaults to true. (default true)\n -remote-endpoint-mysql-enabled\n \tWhether or not MySQL remote endpoints are enabled. Defaults to true. (default true)\n -remote-endpoint-postgresql-enabled\n \tWhether or not PostgreSQL remote endpoints are enabled. Defaults to true. (default true)\n -remote-endpoint-script-enabled\n \tWhether or not script remote endpoints are enabled. Defaults to true. (default true)\n -remote-endpoint-soap-enabled\n \tWhether or not soap remote endpoints are enabled. Defaults to true. (default true)\n -remote-endpoint-sqlserver-enabled\n \tWhether or not MS SQLServer remote endpoints are enabled. Defaults to true. (default true)\n -remote-endpoint-store-enabled\n \tWhether or not Store remote endpoints are enabled. Defaults to false.\n -server\n \tWhether or not to run in server mode\n -smtp-email-host string\n \tThe host to be used in email links\n -smtp-email-port int\n \tThe port to be used in email links\n -smtp-email-scheme string\n \tThe scheme to be used in email links (default \"http\")\n -smtp-password string\n \tThe password for the smtp server\n -smtp-port int\n \tThe port of the smtp server (default 25)\n -smtp-sender string\n \tThe sender of emails from gateway\n -smtp-server string\n \tThe address or name of the smtp server\n -smtp-user string\n \tThe user name for the smtp server\n -soap-client-host string\n \tThe hostname for the soap client. Defaults to localhost. (default \"localhost\")\n -soap-client-port int\n \tThe port number to listen on for the soap client. Defaults to 19083 (default 19083)\n -soap-java-opts string\n \tThe JVM options to pass to the JVM on startup that will be used to invoke SOAP services\n -soap-jdk-path string\n \tThe home directory of your JDK 1.8 installation\n -soap-thread-pool-size int\n \tThe number of worker threads in the JVM that will concurrently process soap requests. When set to 0, pooling is disabled (i.e. a new thread per request). Defaults to 0.\n -store-conn-string string\n \tThe database connection string for the store. See: db-conn-string (default \"store.db\")\n -store-max-connections int\n \tThe maximum number of connections to use (default 50)\n -store-migrate\n \tWhether or not to migrate the store database on startup\n -store-type string\n \tThe type of database to use for store remote endpoints (default \"boltdb\")\n -version\n \tWhether to print the version and quit", "language": "shell" } ] } [/block]