# forge example configuration. Copy to forge.toml and adjust. # Development defaults; production values belong in /etc/forge/forge.toml. # SQLite/Turso database file. database = "./data/forge.db" # Root for repos, instance key, gitconfig, hooks and sockets. data_dir = "./data" # HTTP listen address for the web UI and smart-HTTP. listen = "127.0.0.1:7660" # Public base URL used in links and clone URLs. base_url = "http://127.0.0.1:7660" # Separate origin for raw user content (Milestone 2). user_content_base_url = "http://127.0.0.1:7661" # Listener for raw user files. It is served on a separate origin, so in production # user_content_base_url should use a separate registrable domain (not a subdomain of # base_url), which keeps user-uploaded content from running with the main site's cookies. user_content_listen = "127.0.0.1:7661" # SSH listen address for git over SSH. ssh_listen = "0.0.0.0:2222" # Host and port shown in SSH clone URLs. ssh_public_host = "127.0.0.1" ssh_public_port = 2222 # Self-registration: "closed" | "invite" | "open". registration = "closed" # Proxies whose X-Forwarded-For is trusted for client IPs (login and git throttling). Addresses or CIDRs. # Set to ["127.0.0.1"] when running behind a local reverse proxy. Empty: the TCP peer is the client. trusted_proxies = [] # Outbound webhooks. Internal destinations (loopback, private, link-local, CGNAT, ...) are refused. # [webhooks] # Allow http:// hook URLs (https only by default). # allow_http = false # Exact hostnames or CIDR networks that may be reached even if they resolve to internal addresses. # allowed_hosts = ["hooks.internal.example", "10.20.0.0/16"] # Scheduled backups (see docs/backup.md). Empty dir disables the scheduler. # [backup] # Directory that receives the backup sets. Ship it off-site with restic or rclone. # dir = "/var/backups/forge" # Hours between full backup sets. # interval_hours = 24 # Newest complete sets kept in dir. Older complete sets are deleted after a good run. # keep = 7 # Optional healthchecks.io style URL: pinged with /start, then the URL on success or /fail on error. # The URL may hold a token, so the admin page shows only its host. # healthcheck_url = "" # Days between git fsck of every repo and the database integrity check. # fsck_interval_days = 7 # Release settings. # [releases] # Largest accepted release asset, in MiB. # max_asset_mb = 512 # Standby replication (see docs/backup.md). Empty target disables it. When target is set, # identity_file and known_hosts_file are required. # [replication] # [user@]host:/absolute/base of the standby account. Empty disables replication. # target = "" # SSH port of the standby host. # ssh_port = 22 # Private key of the standby account (mode 0600). Required when target is set. # identity_file = "" # Pinned host keys of the standby. Required when target is set. StrictHostKeyChecking is always yes. # known_hosts_file = "" # Minutes between database snapshots shipped to the standby. Must be at least 1. # db_snapshot_minutes = 15 # Minutes between reconcile passes (refs checksums, deleted repos, healthcheck). Must be at least 1. # reconcile_minutes = 60 # Optional URL pinged after each reconcile pass. Empty disables it. # healthcheck_url = "" # Git LFS limits. # [lfs] # Largest accepted LFS object, in MiB. # max_object_mb = 2048 # CI limits and retention. # [ci] # Whether CI runs at all. When false, pushes and pull requests create no runs. # enabled = true # Largest job log, in MiB. Past it the log is truncated. # max_log_mb = 16 # Largest artifact, in MiB. # max_artifact_mb = 512 # Artifacts a single job may upload. # max_artifacts_per_job = 50 # Days a job log is kept. # log_retention_days = 90 # Days an artifact is kept. # artifact_retention_days = 30 # Hours a runner registration token stays valid. # registration_token_hours = 24 # Security advisories (opt-in). When enabled, the forge downloads the OSV dumps for ecosystems and scans each repo's lockfiles. # [advisories] # Whether the advisory download and the lockfile scans run at all. # enabled = false # OSV ecosystems to download and scan: any of "crates.io", "npm", "Go". # ecosystems = ["crates.io", "npm", "Go"] # Hours before a downloaded dump is fetched again. # refresh_hours = 24 # Outgoing mail transport. The SMTP server, sender and password are set on /admin/mail and stored in the database. # [mail] # smtp sends through the configured server. log writes each message to /mail-log/ instead, for development and tests. # transport = "smtp" # Organization rules. # [orgs] # Who may create organizations: "all" (any signed-in person) or "admin" (instance admins only). # creation = "all" # Self-update (off by default). When enabled, a successful push run of `repo` on `branch` replaces # the running binary with the artifact of `job` and restarts. Run under systemd with Restart=on-failure, # because the process exits with code 75 after the swap. A sha256 listed in `.bad` is never installed. # [self_update] # Whether a green run deploys its artifact. # enabled = false # The repo whose runs deploy, as owner/name. # repo = "Tahinli/forge" # The branch whose push runs deploy. # branch = "main" # The CI job that produces the artifact. # job = "build" # The artifact name produced by job. A single file. CI flattens paths, so dist/forge is stored as dist_forge. # artifact = "dist_forge"