Skip to content
Arbinel

Configuration

The tables below list every app.ini setting that Arbinel adds, and every Forgejo setting whose default or behaviour Arbinel changes. All other settings are Forgejo’s, and Forgejo’s configuration cheat sheet documents them. The defaults below are the values the code uses when a key is absent.

Some keys only take effect together with another one. The Needs column names it.

Several section names still use Arbinel’s former name, such as [codefloe.ratelimit.<name>]. Write them exactly as shown, because the names are part of the configuration format.

These keys configure CI time accounting on platform runners. See CI quota.

Key Default Needs Description
ENABLED false [quota] ENABLED Record CI time and enforce the time: quota rules.
PLATFORM_RUNNERS empty Billed Forgejo Actions runners, by scope and name: instance:<name>, repo:<repository-id>:<name> or owner:<owner-id>:<name>.
PLATFORM_RUNNER_IDS empty Billed Forgejo Actions runners, by database ID. Re-registering a runner changes its ID.
RECORD_RETENTION_PERIODS 12 Monthly periods of individual run records to keep. Monthly totals are never dropped. The minimum is 1.
NOTIFY_THRESHOLDS 80,100 [quota] ENABLED Percentages of a CI time limit at which the owner gets a mail. An empty value turns the mails off.

When both runner lists are empty, no Actions runner is billed.

Key Default Needs Description
TOTAL -1 [quota.ci] ENABLED CI time limit for an owner whose quota groups have no time: rule, as a duration such as 600m. A negative value means unlimited.

See CI quota.

Add one section for each external CI system that reports the time it spent. The section name becomes the source of its usage records. It may contain lower-case letters, digits, - and _, may not start with - or _, is at most 40 characters long, and may not be actions. See CI quota.

Key Default Needs Description
TOKEN_HASH none, required [quota.ci] ENABLED Hex-encoded SHA-256 of the reporter’s token.
DISPLAY_NAME the section name Label shown in usage breakdowns.
PLATFORM_RUNNER_IDS empty The reporter’s own IDs of its billed agents, comma-separated.

Arbinel ignores a section with an invalid name or TOKEN_HASH, or one that repeats another reporter’s TOKEN_HASH, and logs an error.

These keys configure the mails that warn owners when their storage quota is filling up. See Quotas.

Key Default Needs Description
NOTIFY_THRESHOLDS 80,100 [quota] ENABLED Percentages of a storage limit at which the owner gets a mail. An empty value turns the mails off.
NOTIFY_HYSTERESIS 5 Percentage points usage must fall below a threshold before that mail can be sent again, from 0 to 99.

These keys limit what a single push may bring in. See Push limits.

Key Default Needs Description
MAX_FILE_SIZE 0 Refuse a push that brings in a file larger than this, such as 100 MiB. 0 sets no limit.
FILE_SIZE_WARNING 0 Accept the push, but warn about every file larger than this. 0 turns the warning off.
CHECK_QUOTA false [quota] ENABLED Refuse a push whose new data needs more space than the owner’s storage quota has left.

These keys configure the record of download traffic per owner and month. See Egress quota.

Key Default Needs Description
RETENTION_PERIODS 24 Monthly periods of traffic records to keep, counting the current one. The minimum is 1.
ENFORCED false Set when the edge proxy blocks downloads past the limit. The Add-ons page only says downloads stop when it is set.
NOTIFY_THRESHOLDS 80,100 [quota] ENABLED Percentages of a download traffic limit at which the owner gets a mail. An empty value turns the mails off.

These keys configure the extra quota that integrations add for an owner. See Quota grants.

Key Default Needs Description
ENABLED false [quota] ENABLED, an [integration.<name>] with the quota.grants scope Apply stored grants and serve the grant API.

Add one section for each external system that uses the integration API at /api/v1/integrations. The section name follows the same rules as a CI reporter’s name. See Quota grants.

Key Default Needs Description
TOKEN_HASH none, required Hex-encoded SHA-256 of the integration’s token.
SCOPES empty What the integration may do, comma-separated. The only scope is quota.grants.

Arbinel ignores a section with an invalid name or TOKEN_HASH, or one that repeats another integration’s TOKEN_HASH, and logs an error. It drops scopes it does not know.

See Billing.

Key Default Needs Description
ENABLED false [quota] ENABLED, [billing.creem] keys, at least one product Sell add-ons. A product with time: subjects also needs [quota.ci] ENABLED.
Key Default Needs Description
TEST_MODE true Send every request to Creem’s test environment.
API_KEY empty Creem API key. Required when [billing] ENABLED is true.
WEBHOOK_SECRET empty Secret of the Creem webhook for <ROOT_URL>/-/billing/creem/webhook. Required when [billing] ENABLED is true.

Add one section for each add-on. The key may contain lower-case letters, digits, - and _, and must start with a letter or digit. The database stores the key, so a product can move to another Creem product without a migration.

Key Default Description
CREEM_PRODUCT_ID none, required The Creem product. Two sections cannot use the same one.
NAME the key Name shown to customers.
TYPE fixed fixed for add-ons sold in units, or metered for usage-based bandwidth. At most one product can be metered.
SUBJECTS none, required for fixed Quota subjects each unit raises, comma-separated. All time: subjects or all size subjects.
AMOUNT none, required for fixed What one unit adds: a duration such as 1000m for time subjects, a size such as 10GiB for size subjects.
MAX_UNITS 20 The most units an owner can buy. Only for fixed.

A metered product takes these keys instead of AMOUNT and MAX_UNITS:

Key Default Description
SUBJECTS egress:all Must be egress:all.
EVENT_NAME none, required Event name of the Creem meter.
PRICE_PER_GIB none, required Price per GiB in cents, excluding VAT.
INCLUDED none Traffic the product’s monthly price includes beyond the free egress limit, such as 20GiB.
MIN_CAP 500 Lowest monthly budget an owner can set, in cents, excluding VAT.
DEFAULT_CAP 1000 Monthly budget in cents, excluding VAT, for a subscription without a setup.
MAX_CAP 100000 Highest monthly cap an owner can set, in cents, excluding VAT.
MIN_CHARGE 500 Usage in cents that builds up before Arbinel reports it to Creem.

Arbinel checks product sections even while billing is off, and refuses to start when one is invalid.

Add one section for each policy. Arbinel uses four policy names: archive, code-search, compare-diff and issue-filters. See Request budgets.

Key Default Description
ENABLED false Enforce the policy.
OBSERVE_ONLY false Count requests without refusing any.
AUTHENTICATED_REQUESTS 60 Requests per account and window, from 1.
ANONYMOUS_REQUESTS 0 Requests per IP address and window for signed-out visitors. 0 sets no limit.
WINDOW_SECONDS 60 Length of the window, from 1 to 31536000.
EXEMPT_ACCOUNTS empty Account names the policy does not limit, comma-separated. Site administrators are always exempt.

Arbinel refuses to start when a value is out of range or not a number. Counters shared between nodes need a Redis-compatible [cache].

Limits each signed-in account’s API requests and server time per window. See API rate limit.

Key Default Description
ENABLED false Enforce the limit.
OBSERVE_ONLY false Count requests without sending headers or refusing any.
WINDOW_SECONDS 3600 Length of the window, from 1 to 86400.
REQUESTS_PER_WINDOW 15000 Requests per account and window, from 1.
SERVER_SECONDS_PER_WINDOW 1800 Seconds of request handling per account and window, from 1.
MAX_CHARGED_SECONDS_PER_REQUEST 60 The most seconds one request is charged, from 1 to 3600.
EXEMPT_ACCOUNTS empty Account names the limit does not apply to, comma-separated.

A section [arbinel.api_ratelimit.account.<name>] sets REQUESTS_PER_WINDOW and SERVER_SECONDS_PER_WINDOW for one account.

Bounds what one issue or pull request list query may ask for, on the web and in the API. It applies even when the issue-filters budget is off.

Key Default Description
MAX_LABELS 10 The most labels one labels filter may name. Arbinel answers a longer filter with 400. 0 sets no limit.

These keys configure running several nodes behind a load balancer. See High availability.

Key Default Description
ENABLED false Run as one node of a cluster. Arbinel refuses to start unless the cache, sessions, queues, storage and indexers are shared or node-safe.
NODE_ID <hostname>-<pid>-<random> Name of this node.
LEASE_TTL 30s How long the leader’s lease stays valid without renewal.
RENEW_INTERVAL 10s How often the leader renews its lease. If it is not below half of LEASE_TTL, Arbinel uses a third of LEASE_TTL.
LEADER_ELIGIBLE true Whether this node can become the leader. A node with false never takes the leader lease, so it never runs scheduled cron tasks.
HOOK_APP_PATH empty Binary that the git hooks of repositories created by this node run. Empty means the node’s own binary.
HOOK_CONFIG_PATH empty Config that the git hooks of repositories created by this node pass to the binary. Empty means the node’s own config.

These keys configure live updates on issue and pull request pages. See Live updates.

Key Default Needs Description
ENABLED false Push updates to open pages.
CONN_STR empty Redis connection string that carries events between nodes. Empty means one node, in memory. With [high_availability] ENABLED and [queue] TYPE = redis, it defaults to the queue’s CONN_STR.
MAX_CONNECTIONS 10000 Most open live connections per node.
HEARTBEAT_INTERVAL 25s Interval of keep-alive messages. Values below 1s fall back to 25s.

These keys configure a signed cookie that tells a reverse proxy that a browser recently held a signed-in session. See Proxy sign-in cookie.

Key Default Description
ENABLED false Set the cookie.
SECRET none, required Standard base64 of at least 32 random bytes, shared with the proxy.
SECRET_URI none A file: URI to read SECRET from, instead of SECRET.
COOKIE_NAME arbinel_signed_in Name of the cookie. It must differ from the session and remember-me cookies.
MAX_AGE 1h How long the cookie stays valid without activity. At least 1m.

Arbinel leaves the cookie off when a value is missing or invalid, and logs an error.

Add one section for each external CI system whose checks users can cancel from a pull request. The section name follows the same rules as a CI reporter’s name. See Cancel checks.

Key Default Description
TARGET_URL none, required Prefix of the target URL of the checks this system reports. An http or https URL.
URL none, required Endpoint that receives cancel requests. An http or https URL.
SECRET none, required Secret that signs the requests, at least 16 characters.
SECRET_URI none A file: URI to read SECRET from, instead of SECRET.
TIMEOUT 10s Time limit of one request.

Arbinel ignores a section with a missing or invalid value, and logs an error. Cancelling Forgejo Actions runs needs no section.

These keys let supporters of the instance show it on their profile. See Instance supporters.

Key Default Description
ENABLED false Show the support section in the profile settings and the label on supporters’ profiles.
FUNDING_REPO empty Public repository, as <owner>/<repo>, whose FUNDING.yml lists the ways to support the instance. Arbinel then adds a Support button to the navbar. Arbinel logs an error and ignores a value of another form.
NAME APP_NAME What the supporter label and the support dialog call the instance, as in Example supporter.
Section Key Default Description See
[actions] LOG_MAX_SIZE 100 MiB Largest log one job may write. Arbinel drops further output and ends the log with a line that says it was truncated. 0 sets no limit.
[actions] LOG_MAX_LINES 1000000 The most lines one job’s log may have, with the same truncation as LOG_MAX_SIZE. 0 sets no limit.
[actions] RUNNER_REQUEST_MAX_SIZE 32 MiB Largest request a runner may send. Arbinel refuses a larger one, and the runner can then no longer report that job. 0 sets no limit.
[database] CONNECT_TIMEOUT 10s Connection timeout for PostgreSQL, passed as connect_timeout in seconds. 0 leaves it out, and a connect_timeout in NAME wins. Database
[database] REPLICA_STICKY_DURATION 5s How long a client keeps reading the primary after it writes, on every node. 0 turns it off. Only applies with HOST_REPLICA. Database
[indexer] ISSUE_INDEXER_TYPE bleve Also accepts typesense, with ISSUE_INDEXER_CONN_STR such as http://apikey@localhost:8108 and ISSUE_INDEXER_NAME. Search
[indexer] REPO_INDEXER_MAX_REPO_SIZE 0 Leave out of the code index a repository whose default branch has more indexable content than this, such as 128 MiB. 0 sets no limit. Search
[indexer] REPO_INDEXER_EXCLUDE_PRIVATE false Leave private repositories out of the code index. Search
[indexer] REPO_INDEXER_COMPACT_SHARDS 64 Rebuild a repository’s code index once it has more shards than this. Search
[indexer] REPO_INDEXER_SHARED false In high availability mode, keep one zoekt index that only the leader writes. REPO_INDEXER_PATH must then be on the same filesystem as the repositories. High availability
[ui] FILE_ICON_SET devicon Default icon set of the file list: basic, material or devicon. Users can choose their own. Appearance
[ui] FEED_MIRROR_SYNC true Record a feed entry when a pull mirror syncs. With false, delete_old_actions also deletes the ones recorded before. Activity feed
[picture] PLACEHOLDER_AVATAR identicon Generated avatar for accounts and repositories without one: identicon or monogram. Appearance
[service] DEFAULT_WATCH_EVENTS 7 Events a newly watched repository notifies about, as a sum: 1 issues, 2 pull requests, 4 releases, 8 only where the user takes part. Users can set their own default. Notifications
[webhook] BACKOFF_AFTER_FAILURES 3 Failed deliveries in a row before the next delivery to a webhook waits. 0 turns off waiting and pausing. Webhook delivery
[webhook] BACKOFF_MIN 1m First wait, doubled after each further failure. Webhook delivery
[webhook] BACKOFF_MAX 1h Longest wait. Webhook delivery
[webhook] PAUSE_AFTER_FAILURES 20 Failed deliveries in a row before a webhook can be paused. Webhook delivery
[webhook] PAUSE_AFTER 24h How long a webhook must keep failing before Arbinel pauses it. 0 never pauses. Webhook delivery
[service.explore] ENABLE_RUNNERS_PAGE false Lists the global runners in Explore for signed-in users. Runners in Explore
[service] HIDE_IDLE_ACCOUNTS false Leave idle accounts and their repositories out of Explore and show strangers only their name and avatar. Idle accounts
[service] NEW_ACCOUNT_LINK_DELAY 0 How old an account must be before it can save a website or link. 0 turns the check off. Links from new accounts
[repository.pull-request] DEFAULT_ALLOWED_MERGE_STYLES all Merge styles new repositories allow, comma-separated: merge, rebase, rebase-merge, squash, fast-forward-only, manually-merged. Unknown entries are dropped, and an empty result allows all.
[repository.pull-request] DEFAULT_DELETE_BRANCH_AFTER_MERGE false Default of “Delete pull request branch after merge” in new repositories.
[repository.pull-request] DEFAULT_ALLOW_MAINTAINER_EDIT false Default of “Allow edits from maintainers” in new repositories.
[packages] ENABLE_TERRAFORM_STATE false Turn on the OpenTofu and Terraform state backend. Terraform state
[packages] LIMIT_SIZE_TERRAFORM_STATE -1 Maximum size of one state upload, such as 10 MiB. -1 sets no cap. Terraform state
[repository] ARCHIVE_MAX_WAIT 1m How long a source archive download waits for its archive. Past it Arbinel answers 503 with a Retry-After header and keeps generating the archive. 0 waits as long as the client stays connected.
[repository] ARCHIVE_JOB_TIMEOUT 30m How long one archive job may run before Arbinel cancels it. 0 sets no limit.
[repository] ARCHIVE_ABANDON_AFTER 2m Drop a queued archive job that nobody asked for within this time. 0 generates every queued job. With several nodes on a Redis queue, it needs a [cache] with ADAPTER = redis or memcache.
[repository] ARCHIVE_BUNDLE_REQUIRE_SIGNIN false Refuse .bundle downloads to signed-out visitors. Zip and tar.gz archives stay available.
[migrations] MAX_RUNNING_PER_USER 0 The most migrations one user may have queued or running at once, on the web and in the API together. Site administrators are not limited. 0 sets no limit.

The three [repository.pull-request] keys apply only to repositories created after you set them. After you change PLACEHOLDER_AVATAR, run forgejo doctor check --run regenerate-avatars --fix, because Arbinel caches generated avatars.

Forgejo keys with a different default or behaviour

Section titled “Forgejo keys with a different default or behaviour”
Section Key Forgejo Arbinel See
[ui] DEFAULT_THEME forgejo-auto codefloe-tide-auto Appearance
[ui] THEMES Forgejo’s themes Forgejo’s themes, after the codefloe-*, codefloe-tide-* and codefloe-tide-ice-* themes in auto, light and dark Appearance
[repository.issue] MAX_PINNED 3 6
[database] HOST_REPLICA One connection per replica host, and every read outside a transaction can use a replica With PostgreSQL, all replica hosts in one multi-host connection, which skips a host that does not answer. Only GET, HEAD and OPTIONS requests read from replicas Database
[repository.signing] SIGNING_EMAIL Commits signed with the instance SSH key show a placeholder Those commits link to the account that owns this address Commit signing

The site administration stores these settings in the database, not in app.ini:

Arbinel adds these tasks. Configure them in [cron.<task>] sections with Forgejo’s keys, such as ENABLED and SCHEDULE, as Forgejo’s cron settings describe. With [high_availability] ENABLED, only the leader runs scheduled tasks.

Task Schedule Registered when Purpose
cleanup_quota_ci_records @midnight [quota.ci] ENABLED Drop CI run records older than RECORD_RETENTION_PERIODS.
quota_storage_notify @midnight always Send storage quota mails.
cleanup_quota_egress_usage @midnight always Drop traffic records older than RETENTION_PERIODS.
pages_teardown_sweep @every 10m always Unpublish Pages sites whose repository was deleted, and retry failed removals.
owner_domain_verify @every 1h always Check the TXT records of organizations’ verified domains again. See Verified domains.
requeue_undelivered_hook_tasks @every 5m always, enabled with [high_availability] ENABLED Put undelivered webhook deliveries back on the queue, so a delivery the shared queue lost still goes out.
billing_reconcile @midnight [billing] ENABLED Bring add-ons in line with Creem, in case a webhook got lost.
billing_report_usage @every 1h [billing] ENABLED and a metered product Report metered bandwidth to Creem.
report_idle_accounts @every 24h, off by default always Email the site administrators about idle accounts that publish a website, bio or placeholder repository and became due since the last run: older than OLDER_THAN, default 720h, and not signed in for as long. It never deletes an account. See Idle accounts.
cleanup_artifact_rows @midnight, off by default always Delete the rows of deleted, abandoned and expired Actions artifacts. See Table retention.
cleanup_commit_statuses @midnight, off by default always Delete commit statuses that a newer status of the same context replaced. See Table retention.