-
Notifications
You must be signed in to change notification settings - Fork 0
Command Line Arguments
This wiki is no longer maintained and should not be used. Read the Event Store docs at docs.geteventstore.com.
The latest version of the page you are currently viewing is available here.
The Event Store supports many configuration points. There are three distinct ways to set any parameter in the system. Items can be set via command line, environment variables, or put into YAML files. Each of these configuration options has its own trade offs.
To pass a configuration value over the command line you just add the configuration to the line executing the Event Store eg EventStore.ClusterNode.exe --log ~/logs
While command line arguments tend to be very useful in development scenarios, they are often not the prefered way to handle configuration in a production system.
All arguments can also be set as environment variables. This mechanism is often used in UNIX based systems.
The last way that arguments can be set is to put them into one or more config files. To tell the Event Store to use a config file you pass the files on the command line with --config=filename. The basic format of the YAML config file is as follows:
---
Log: "/home/Ouro/logs"
IntHttpPort: 2111
---Files can be much nicer for large installations as they can easily be distributed/managed centrally, or generated by a configuration management system such as Puppet.
The order of precedence between the multiple config sources is also important as you could feasibly set them in multiple ways. The command line is the highest priority followed by environment variables. Files are the lowest precedence and are processed in the order they are given on the command line. When starting up the Event Store the major parameters are listed in the log (including where they were set from).
ES VERSION: 1.0.3 (dev/5488fa34228e283bad985966b700e1fc48a0780a, Tue, 2 Jul 2013 12:39:02 +0300)
OS: Linux (Unix 3.2.0.27)
RUNTIME: 3.0.10 (master/1166156 Tue Apr 23 14:56:42 EEST 2013) (EventStore build) (64-bit)
GC: 2 GENERATIONS
LOGS: /home/greg/foo
SHOW HELP: False (<DEFAULT>)
SHOW VERSION: False (<DEFAULT>)
LOGS DIR: /home/greg/foo (--logsdir from command line)
CONFIGS: <empty> (<DEFAULT>)
DEFINES: <empty> (<DEFAULT>)
IP: 127.0.0.1 (<DEFAULT>)
TCP PORT: 1113 (<DEFAULT>)
SECURE TCP PORT: 0 (<DEFAULT>)
HTTP PORT: 2113 (<DEFAULT>)
STATS PERIOD SEC: 30 (<DEFAULT>)
CACHED CHUNKS: -1 (<DEFAULT>)
CHUNKS CACHE SIZE: 536871424 (<DEFAULT>)
DB PATH: /tmp/foo (--db from command line)
SKIP DB VERIFY: False (<DEFAULT>)
RUN PROJECTIONS: True (<DEFAULT>)
PROJECTION THREADS: 3 (<DEFAULT>)
WORKER THREADS: 5 (<DEFAULT>)
HTTP PREFIXES: <empty> (<DEFAULT>)
ENABLE TRUSTED AUTH: False (<DEFAULT>)
CERTIFICATE STORE: <empty> (<DEFAULT>)
CERTIFICATE NAME: <empty> (<DEFAULT>)
CERTIFICATE FILE: <empty> (<DEFAULT>)
CERTIFICATE PASSWORD: <empty> (<DEFAULT>)
PREPARE TIMEOUT MS: 2000 (<DEFAULT>)
COMMIT TIMEOUT MS: 2000 (<DEFAULT>)
The following parameters are supported by the Event Store
| Parameter | Environment *(all prefixed with EVENTSTORE_)* | Json | Description | Default |
|---|---|---|---|---|
--help, -?
|
na | na | Show command line parameter help. | na |
--version |
na | na | Show version. | na |
--log--logsdir=VALUE
|
LOGSDIR | logsdir | Path on which to keep log files. | ./logs |
--cfg--config=VALUE
|
CONFIGS | configs | Configuration files. | na |
--force |
Allow running in questionable environments (like boehm gc in mono) | false | ||
-i, --ip=VALUE
|
IP | ip | The IP address to bind to. | 127.0.0.1 |
-st--sec-tcp-port=VALUE
|
SEC_TCP_PORT | secureTcpPort | The port to run the secure (SSL) TCP server on. | na |
-h--http-port=VALUE
|
HTTP_PORT | httpPort | The port to run the HTTP server on. | 2113 |
-t, --tcp-port=VALUE
|
TCP_PORT | tcpPort | The port to run the TCP server on. | 1113 |
defdefine=
|
DEFINES | defines | Run-time conditionals. | na |
-s--stats-period-sec=VALUE
|
STATS_PERIOD_SEC | statsPeriodSec | The number of seconds between statistics gathers. | 15 |
-c--chunkcache--cached-chunks=VALUE
|
CACHED_CHUNKS | cachedChunks | The number of chunks to cache in unmanaged memory. | 0 |
-c--chunk-cache-size, --cached-chunks=VALUE
|
CHUNKS_CACHE_SIZE | chunksCacheSize | The amount of unmanaged memory (in MB) to use for caching chunks. | 0 |
-d--db=VALUE
|
DB | db | The path the db should be loaded/saved to. | temporary db |
--do-not-verify-db-hashes-on-startup, --skip-db-verify
|
SKIP_DB_VERIFY | skipDbVerify | Bypasses the checking of file hashes of database during startup (allows for faster startup). | false |
--run-projections=NONE--run-projections=SYSTEM--run-projections=ALL
|
RUN_PROJECTIONS | runProjections | Enables the running of JavaScript projections (experimental). Can be either none, system, or all | system |
--projection-threads=VALUE |
PROJECTION_THREADS | projectionThreads | The number of threads to use for projections. | 3 |
--worker-threads=VALUE |
WORKER_THREADS | workerThreads | The number of threads in pool for worker services. | 5 |
--http-prefixes--http-prefixes=VALUE
|
HTTP_PREFIXES | httpPrefixes | The prefixes that the http server should respond to. To specify multiple prefixes use the format --http-prefixes="http://prefix1:port/,http://prefix2:port/". No spaces between the prefixes. |
na |
--pt--prepare-timeout=VALUE
|
PREPARE_TIMEOUT_MS | prepareTimeoutMs | The timeout in milliseconds of a prepare. | 2000 |
--ct--commit-timeout=VALUE
|
COMMIT_TIMEOUT_MS | commitTimeoutMs | The timeout in milliseconds of a commit. | 2000 |
certificate-store=VALUE |
CERTIFICATE_STORE | certificateStore | The name of certificate store to use. | na |
--certificate-name=VALUE |
CERTIFICATE_NAME | certificateName | The name of the certificate to use | na |
--certificate-file=VALUE |
CERTIFICATE_FILE | certificateFile | The file of the certificate to use | na |
--certificate-password=VALUE |
CERTIFICATE_PASSWORD | certificatePassword | The password to certificate in file. | na |
--mem-db |
MEM_DB | MemDb | Start the server in in-memory mode. The --mem-db flag can be passed at the command line, MemDb: true can be specified in the configuration file, or the EVENTSTORE_MEM_DB environment variable can be set to true or 1. |
na |
--min-flush-delay=VALUE |
MIN_FLUSH_DELAY | minFlushDelay | The minimum flush delay to be added when writing under heavy load. Not normally set | na |
| In high availability version only | ||||
--int-ip--internal-ip=VALUE
|
INT_IP | internalIp | Internal IP Address. (eg for replication, ui, and internal communications) | 127.0.0.1 |
--ext-ip--external-ip=VALUE
|
EXT_IP | externalIp | External IP Address. (eg for clients to talk to) | 127.0.0.1 |
--int-http-port--internal-http-port=VALUE
|
INT_HTTP_PORT | internalHttpPort | Internal Http Port. (eg for Gossip and UI) | 2112 |
--ext-http-port--external-http-port=VALUE
|
EXT_HTTP_PORT | externalHttpPort | External Http Port. (eg for clients over ATOM) | 2113 |
--int-tcp-port--internal-tcp-port=VALUE
|
INT_TCP_PORT | internalTcpPort | Internal Tcp Port (eg for replication) | 1112 |
--int-sec-tcp-port--internal-secure-tcp-port=VALUE
|
INT_SEC_TCP_PORT | internalSecureTcpPort | Internal Secure Tcp Port (eg for replication over SSL) | na |
--ext-tcp-port--external-tcp-port=VALUE
|
EXT_TCP_PORT | externalTcpPort | External Tcp Port (eg for clients) | 1113 |
--ext-sec-tcp-port--external-secure-tcp-port=VALUE
|
EXT_SEC_TCP_PORT | externalSecureTcpPort | External Secure Tcp Port (eg for clients SSL) | na |
--cluster-dns=VALUE |
CLUSTER_DNS | clusterDns | The DNS to use for cluster discovery | na |
--nodes-count--cluster-size=VALUE
|
CLUSTER_SIZE | clusterSize | The overall size of the cluster (active nodes) | 3 |
--prepare-count=VALUE |
PREPARE_COUNT | prepareCount | The count of prepares before continuing (should be set to a quorum of nodes) | 2 |
--commit-count=VALUE |
COMMIT_COUNT | commitCount | The count of commits before continuing (should be set to a quorum of nodes) | 2 |
--max-memtable-size=VALUE |
MAX_MEMTABLE_SIZE | maxMemtableSize | The maximum size of a memory table before it should be moved to disk. | 1000000 |
--f |
FAKE_DNS | fakeDns | Used to do discovery without a dns setup for the cluster | na |
--fake-dns-ip=VALUE |
FAKE_DNS_IP | fakeDnsIp | Used to do discovery without a dns setup for the cluster | na |
--manager-ip--int-manager-ip--internal-manager-ip=VALUE
|
INT_MANAGER_IP | internalManagerIp | The internal ip address of the node manager | 127.0.0.1 |
--ext-manager-ip--external-manager-ip=VALUE
|
EXT_MANAGER_IP | externalManagerIp | The external ip address of the node manager | 127.0.0.1 |
--manager-port--int-manager-http-port--internal-manager-http-port=VALUE
|
INT_MANAGER_HTTP_PORT | internalManagerHttpPort | The internal http port of the node manager | 30777 |
--admin-on-ext |
ADMIN_ON_EXT | adminOnExt | Whether or not to run the admin ui on the external http endpoint | true |
--gossip-on-ext |
GOSSIP_ON_EXT | gossipOnExt | Whether or not to accept gossip requests on the external http endpoint | true |
--stats-on-ext |
STATS_ON_EXT | statsOnExt | Whether or not to accept statistics requests on the external http endpoint. This option is needed if you run the admin UI on external endpoint | true |
--ext-manager-http-port--external-manager-http-port=VALUE
|
EXT_MANAGER_HTTP_PORT | externalManagerHttpPort | The external http port of the node manager | 30778 |
--use-internal-ssl |
USE_INTERNAL_SSL | useInternalSsl | If true will attempt to use secure replication | false |
--ssl-target-host=VALUE |
SSL_TARGET_HOST | sslTargetHost | The target host of the server's ssl certificate | na |
--ssl-validate-server |
SSL_VALIDATE_SERVER | sslValidateServer | Whether to validate that the server's certificate is trusted | true |