# Server Configuration
# Using Command Line Arguments
Command line arguments can be passed to the server as
|Path to the configuration file. If you use this argument, you can define all of the other command line arguments in a configuration file. See the "Configuring Typesense" section for more details.
|A bootstrap admin API key that allows all operations. Be sure to create additional keys with specific ACLs using the key management API.
NOTE: Don't expose this admin API key to your browser JS client: use the key management API to create search-only or scoped API keys.
|Path to the directory where data will be stored on disk.
|Address to which Typesense API service binds. Default:
|Port on which Typesense API service listens. Default:
|Internal IP address to which Typesense peering service binds. If this parameter is not specified, Typesense will attempt to use the first available internal IP.
|Port on which Typesense peering service listens. Default:
|Path to file containing comma separated string of all nodes in the cluster.
|By default, Typesense logs to stdout and stderr. To enable logging to a file, provide a path to a logging directory.
|Path to the SSL certificate file. You must also define
ssl-certificate-key to enable HTTPS.
|Path to the SSL certificate key file. You must also define
ssl-certificate to enable HTTPS.
|The threshold at which a follower is deemed to have caught up with leader and will allow requests. Default:
NOTE: This threshold is used only when the lag between the follower and leader is more than 1,000 operations.
|Frequency of replication log snapshots. Default:
3600 follower recovery.
NOTE: Frequent snapshotting helps in faster recovery from a cold start. However, if this value is too low for a large dataset, repeated snapshotting can actually slow down follower recovery.
# Using a Configuration File
As an alternative to command line arguments, you can also configure Typesense server through a configuration file or via environment variables.
Command line arguments are given the highest priority, while environment variables are given the least priority.
Our Linux DEB/RPM packages install the configuration file at
The configuration file uses a simple INI format:
# Using Environment Variables
If you wish to use environment variables, you can do that too. The environment variables map to the command line arguments documented above: just use CAPS and underscores instead of hyphens, and prefix the variable names with
For example, use
TYPESENSE_DATA_DIR for the