Browse documentation
Fountain handbook

Extension configuration reference

Every key in the [extensions] section of app.ini, with its default, accepted values and effect, plus the environment variable that sets it in the container image.

On this page

Syntax

[extensions]
ENABLED = true
PATH = /var/lib/fountain/data/extensions
CATALOG_PATH = /etc/fountain/catalog.json
REQUIRED_IDS = policy

In the container image, set any key as FORGEJO__extensions__KEY, for example FORGEJO__extensions__ENABLED=true. The image's setup step writes it into app.ini on every start. Fountain reads the section at startup; restart the forge after changing it.

Keys and defaults

Key Default Accepted values Effect
ENABLED false Boolean Starts the extension host. While false, no packages run and REQUIRED_IDS must be empty.
PATH extensions under [server] APP_DATA_PATH Directory path Package directory holding installed packages, private data, the archive cache and requested state. A relative path is resolved against the work path. In the container image the default is /data/gitea/extensions.
CATALOG_PATH Empty Absolute path to a file Trusted catalog of installable packages. Empty means no catalog packages, which is allowed only when REQUIRED_IDS is empty. The file must be a regular file owned by root or the forge's user and not writable by group or others.
REQUIRED_IDS Empty Comma-separated package IDs Required packages. Must match the catalog's required entries exactly. Requires ENABLED = true.
SERVICE_CALLBACK_PATH Empty Absolute, clean path for a Unix socket Shared service callback socket for packages that declare native.service.bridge. Fountain creates the socket with mode 0660 but does not create its parent directory or change ownership; provision the parent and group access yourself. Empty disables the socket, and a package declaring native.service.bridge then cannot start.
SERVICE_BRIDGE_PEERS Empty UID:PACKAGE pairs separated by commas Maps each service process's Unix user ID to the one package it may act for on the service callback socket. Each UID may appear once. Empty admits no service peers.
MAINTENANCE_DIRECTORY Empty Directory path Shared directory whose lock serializes requested-state changes, catalog downloads and lifecycle work with external maintenance tools. Empty means no external maintenance coordination.

Behavior and constraints

  • The forge refuses to start when REQUIRED_IDS is set while ENABLED is false, when a configured catalog cannot be read or validated, when the catalog's required entries differ from REQUIRED_IDS, when SERVICE_CALLBACK_PATH is relative, unclean, has no existing parent directory or is already in use, or when SERVICE_BRIDGE_PEERS is malformed.
  • A stale socket left at SERVICE_CALLBACK_PATH by an unclean shutdown is replaced.
  • Settings outside [extensions] also matter. [server] ROOT_URL must match the address browsers use, because extension requests that change data must come from that origin. [server] APP_DATA_PATH sets the default package directory and the location of the native operation offline marker.

Examples

A single forge with locally installed packages:

[extensions]
ENABLED = true

A forge that installs packages from a catalog and requires one of them:

[extensions]
ENABLED = true
CATALOG_PATH = /etc/fountain/catalog.json
REQUIRED_IDS = policy

The same in a container:

-e FORGEJO__extensions__ENABLED=true \
-e FORGEJO__extensions__CATALOG_PATH=/etc/fountain/catalog.json \
-e FORGEJO__extensions__REQUIRED_IDS=policy

A forge whose package hello has a separate service running as Unix user 1500:

[extensions]
ENABLED = true
SERVICE_CALLBACK_PATH = /run/fountain/service.sock
SERVICE_BRIDGE_PEERS = 1500:hello