Skip to content

Configuration for Advanced Users

Benjamin Paine edited this page Dec 31, 2023 · 8 revisions

There are numerous configuration options available to power users to cater their Enfugue installation as they wish.

Environment Overrides

All configuration that is present in configuration files can be overridden using environment variables. The name of an environment variable that corresponds to a given configuration key is the same text in uppercase, with underscore separations between dictionaries, preceded by ENFUGUE_. For example, the configuration server.port can be overridden with the environment variable ENFUGUE_SERVER_PORT.

Where to find Configuration

There are two different methods recommended for editing configuration, depending on your installation:

  1. If you are using a portable installation, edit the configuration files directly in the installation directory at enfugue/config/.
  2. If you are managing your own environment, first run enfugue dump-config to write the default configuration set to the console. Execute enfugue dump-config --help for options on this command.

How to Run with Custom Configuration

  1. If you are using a portable installation and modified the configuration as recommended above, you need only restart your server.
  2. If you are managing your own environment, instead of simply executing enfugue run, you should pass the configuration file with -c, i.e., enfugue run -c ./my_config.yml. Note that your file must indicate it's format by having a proper extensions; JSON and YAML are supported.

Configuration Keys and Values

Configuration keys are the same whether it is in multiple files (as in the default configuration, which uses !include to break up configuration) or in a single file (as dumped by command line.)

Note: There are many additional configuration values in addition to the ones specified here. It is not recommended to change anything else, but most of them are self-explanatory in what they do if you would like to explore.

Server

Keys under 'server' control how the backend listens to and responds to requests.

  • server.host is the IP address to listen on for connections. Use 0.0.0.0 to listen to all addresses. There is an additional IP-address allowlist that can be used for IP address filtering if desired.
  • server.port is the integer port to listen on, which defaults to 45554. You are free to specify as you wish, but it should be understood:
    1. Ports 1024 and below are privileged, and your system will likely not let you select them.
    2. If you accidentally select a port occupied by other software, it is possible that Enfugue could conflict with them.
  • server.domain is the domain the server will listen to. It is set to app.enfugue.ai, which is a loopback address resolving to 127.0.0.1. This value can contain an IP address or a domain.
  • server.secure enables or disables SSL/HTTPS. When this is true, and server.domain is set to app.enfugue.ai, the server will fetch a valid SSL certificate for this domain from Enfugue's content delivery network. If server.domain is anything else, you must provide your own SSL certificates. These can be configured in server.key, server.cert and server.chain as paths to files containing the appropriate certificates.
  • server.allowlist controls network addresses that are permitted to communicate with the backend. By default, all 127.0.0.x and 192.168.x.y are on the allowlist, and anything else is considered 'offlist.' Use a / to indicate significant bits of an address for masking.
  • server.blocklist controls network addresses that are explicitly NOT permitted to communicate with the backend.
  • server.offlist controls what behavior occurs when an IP address does not match any IP mask on the allowlist. The default behavior is accept. Set this to reject to be restrictive by default.

When deploying multiple servers, you can specify any or all of the keys host, port, secure and domain to arrays. When any of these are arrays, ENFUGUE will deploy multiple servers, equivalent to the maximum length of any of the input arrays. See the following example:

Configuration Servers
host: 0.0.0.0
domain: [app.enfugue.ai, null]
port: [45554, 45555, 45556]
secure: [True, False]
https://app.enfugue.ai:45554
http://127.0.0.1:45555
http://127.0.01:45556

CMS

Keys under server.cms (content management system) control details regarding how the front-end is configured to communicate with the backend. By default, these paths are assembled based on the values for secure, domain and port, such that URLs start with https if secure is true, followed by the value for domain, followed by the value for port.

  • server.cms.path.root Is the root path to your installation. The default value is https://app.enfugue.ai:45554/, following the default settings.
  • server.cms.path.static Is the path to static files in your installation. This should always be equal to ${server.cms.path.root}/static, except in circumstances where Enfugue is being deployed in a shared server environment.
  • server.cms.path.api Is the path to API in your installation. This should always be equal to ${server.cms.path.root}/api, except in circumstances where Enfugue is being deployed in a shared server environment.