Fractal Server Config

This page documents the valid options for the YAML file inputs to the Config File. This first section outlines each of the headers (top level objects) and a description for each one. The final file will look like the following:

    option_1: value_for1
    another_opt: 42
    option_for_server: "some string"

Command Invocation

qcfractal-server config [<options>]

Command Description

Show the current config file at an optional location.

Looks in the default location if no arg is provided


--base-folder [<folder>]

The QCFractal base directory to attach to. Default: ~/.qca/qcfractal

Config File Complete Options

The valid top-level YAML headers are the parameters of the FractalConfig class.

class qcfractal.config.FractalConfig(*, base_folder: str = '/home/docs/.qca/qcfractal', database: qcfractal.config.DatabaseSettings = DatabaseSettings(port=5432, host='localhost', username=None, password=None, directory=None, database_name='qcfractal_default', logfile='qcfractal_postgres.log', own=True), view: qcfractal.config.ViewSettings = ViewSettings(enable=True, directory=None), fractal: qcfractal.config.FractalServerSettings = FractalServerSettings(name='QCFractal Server', port=7777, compress_response=True, allow_read=True, security=None, query_limit=1000, logfile='qcfractal_server.log', loglevel='info', cprofile=None, service_frequency=60, max_active_services=20, heartbeat_frequency=1800, log_apis=False, geo_file_path=None))[source]

Top level configuration headers and options for a QCFractal Configuration File

  • base_folder (str, Default: /home/docs/.qca/qcfractal) – The QCFractal base instance to attach to. Default will be your home directory

  • database (DatabaseSettings, Optional)

  • view (ViewSettings, Optional)

  • fractal (FractalServerSettings, Optional)


class qcfractal.config.DatabaseSettings(_env_file: Optional[Union[pathlib.Path, str]] = '<object object>', _env_file_encoding: Optional[str] = None, _secrets_dir: Optional[Union[pathlib.Path, str]] = None, *, port: int = 5432, host: str = 'localhost', username: str = None, password: str = None, directory: str = None, database_name: str = 'qcfractal_default', logfile: str = 'qcfractal_postgres.log', own: bool = True)[source]

Postgres Database settings

  • port (int, Default: 5432) – The postgresql default port

  • host (str, Default: localhost) – Default location for the postgres server. If not localhost, qcfractal command lines cannot manage the instance.

  • username (str, Optional) – The postgres username to default to.

  • password (str, Optional) – The postgres password for the give user.

  • directory (str, Optional) – The physical location of the QCFractal instance data, defaults to the root folder.

  • database_name (str, Default: qcfractal_default) – The database name to connect to.

  • logfile (str, Default: qcfractal_postgres.log) – The logfile to write postgres logs.

  • own (bool, Default: True) – If own is True, QCFractal will control the database instance. If False Postgres will expect a booted server at the database specification.


class qcfractal.config.FractalServerSettings(_env_file: Optional[Union[pathlib.Path, str]] = '<object object>', _env_file_encoding: Optional[str] = None, _secrets_dir: Optional[Union[pathlib.Path, str]] = None, *, name: str = 'QCFractal Server', port: int = 7777, compress_response: bool = True, allow_read: bool = True, security: str = None, query_limit: int = 1000, logfile: str = 'qcfractal_server.log', loglevel: str = 'info', cprofile: str = None, service_frequency: int = 60, max_active_services: int = 20, heartbeat_frequency: int = 1800, log_apis: bool = False, geo_file_path: str = None)[source]

Fractal Server settings

  • name (str, Default: QCFractal Server) – The QCFractal server default name.

  • port (int, Default: 7777) – The QCFractal default port.

  • compress_response (bool, Default: True) – Compress REST responses or not, should be True unless behind a proxy.

  • allow_read (bool, Default: True) – Always allows read access to record tables.

  • security (str, Optional) – Optional user authentication. Specify ‘local’ to enable authentication through locally stored usernames. User permissions may be manipulated through the qcfractal-server user CLI.

  • query_limit (int, Default: 1000) – The maximum number of records to return per query.

  • logfile (str, Default: qcfractal_server.log) – The logfile to write server logs.

  • loglevel (str, Default: info) – Level of logging to enable (debug, info, warning, error, critical)

  • cprofile (str, Optional) – Enable profiling via cProfile, and output cprofile data to this path

  • service_frequency (int, Default: 60) – The frequency to update the QCFractal services.

  • max_active_services (int, Default: 20) – The maximum number of concurrent active services.

  • heartbeat_frequency (int, Default: 1800) – The frequency (in seconds) to check the heartbeat of workers.

  • log_apis (bool, Default: False) – True or False. Store API access in the Database. This is an advanced option for servers accessed by external users through QCPortal.

  • geo_file_path (str, Optional) – Geoip2 cites file path (.mmdb) for resolving IP addresses. Defaults to [base_folder]/GeoLite2-City.mmdb


class qcfractal.config.ViewSettings(_env_file: Optional[Union[pathlib.Path, str]] = '<object object>', _env_file_encoding: Optional[str] = None, _secrets_dir: Optional[Union[pathlib.Path, str]] = None, *, enable: bool = True, directory: str = None)[source]

HDF5 view settings

  • enable (bool, Default: True) – Enable frozen-views.

  • directory (str, Optional) – Location of frozen-view data. If None, defaults to base_folder/views.