Configuration methods
Meilisearch supports three configuration methods. When used simultaneously, command-line options take the highest precedence, followed by environment variables, and finally the configuration file.Command-line options and flags
Pass command-line options and their respective values when launching a Meilisearch instance:--. They take precedence over environment variables.
Environment variables
Set environment variables prior to launching the instance:- UNIX
- Windows
n, no, f, false, off, and 0 as false. An absent environment variable is also considered false. Any other value is considered true.
Environment variables are always identical to the corresponding command-line option, but prepended with MEILI_ and written in all uppercase.
Configuration file
Meilisearch accepts a configuration file in.toml format. Configuration files can be easily shared, versioned, and allow you to define multiple options.
Download a default configuration file:
config.toml file in the working directory. You can override this with the MEILI_CONFIG_FILE_PATH environment variable or the --config-file-path CLI option:
- CLI
- Environment variable
--import-dump would be written as import_dump.
Configuring cloud-hosted instances
To configure Meilisearch with command-line options in a cloud-hosted instance, edit its service file. The default location of the service file is/etc/systemd/system/meilisearch.service.
To configure Meilisearch with environment variables in a cloud-hosted instance, modify Meilisearch’s env file. Its default location is /var/opt/meilisearch/env.
After editing your configuration options, relaunch the Meilisearch service:
Next steps
Configuration reference
Complete list of all instance configuration options.
Index settings
Configure search behavior for individual indexes.