Synchronet v3.19b-Win32 (install) has been released (Jan-2022).

You can donate to the Synchronet project using PayPal.

This is an old revision of the document!


INI Files

Configuration

Synchronet supports a variety of configuration files of different formats. A growing majority of these configuration files are of the INI file type. Synchronet's INI configuration files are typically stored in the ctrl directory, with a .ini filename suffix/extension.

For the configuration files in the ctrl directory which are not in INI format, there are two basic groups.

Database

INI files are also sometimes used for data storage (not related to configuration). This is popular with some JavaScript modules. Such files are typically stored in the data or xtrn directory hierarchies. When INI files are used for data storage purposes, they may or may not have a .ini file suffix/extension.

Filenaming

Synchronet supports a variety of configuration files of different formats. A growing majority of these configuration files are of the INI file type. Synchronet's INI files are typically stored in the ctrl directory, with a .ini filename suffix/extension.

All of Synchronet's INI filenames support a flexible naming convention so multi-host BBSes can share the same ctrl directory, but have a subset of unique INI files particular to each host.

This flexible naming takes the normal base filename, for example, ctrl/services.ini, and allows for the local host's name (host name or host.domain name) or platform description (e.g. “linux” or “win32”) to be inserted before the .ini filename suffix/extension.

The order of preference (using ctrl/service.ini as an example base filename) is:

  1. ctrl/services.host.domain.ini
  2. ctrl/services.host.ini
  3. ctrl/services.platform.ini
  4. ctrl/services.ini

NOTE: Only one file is actually used per host.

Case Sensitivity

The INI filenames are not case sensitive.

Syntax

Synchronet uses the XPDEV library for it's INI file parsing and creation. The XPDEV INI file syntax closely matches that of the common use in Windows applications with a few minor exceptions.

Root Section

Some Synchronet INI files support the concept of a root section, that is, a virtual section that consists of a set of key=value pairs in the file before any [section] tags. The root section is typically used for global or default values for other sections in the INI file. In some INI files, the root section is the only supported section and discovery of any [section] tags will terminate the file.

Directives

INI file directives must be on a line by themselves and must begin with the ! character.

EOF

A premature end-of-file may be defined by using the !eof directive. No lines after this directive will be parsed by the INI file parser.

Example:

!eof

Include

Some INI files support the embedding of other files using the !include filename directive.

Example:

!include another.ini

Editing

When an INI file must be edited by hand, any good text file editor should work fine.

Line Termination

Lines may be terminated with a single LF character (Unix style) or CR/LF pair (DOS/Windows style).

Line Lengths

Each line in an INI file cannot be more than 2045 characters in length.

Values Lengths

The maximum length of a value that may be assigned to key (e.g. key=value) is 1023 characters.

See Also