# 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"] # Mirror sync timing. A push mirror runs this many seconds after the last ref update. # [mirrors] # push_debounce_secs = 10 # Seconds a failed SSH login waits before it is refused (brute-force damping). Default 1. # ssh_auth_rejection_secs = 1 # 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 # Where release assets and CI artifacts are stored (see docs/backup.md, "Blob storage backends"). # [storage] # "fs" keeps blobs under /blobs (the default). "r2" stores them in a Cloudflare R2 bucket, # the recommended off-host option. "s3" stores them in any other S3-compatible bucket (AWS, MinIO, Garage). # backend = "fs" # [storage.r2] # Only read when backend = "r2". account_id, bucket, access_key_id and secret_access_key_file are required. # The endpoint is derived from account_id, so there is no endpoint or region to set. # Cloudflare account id, the 32-character hex string from the dashboard. # account_id = "0123456789abcdef0123456789abcdef" # Name of the R2 bucket that holds the blobs. # bucket = "forge-blobs" # Jurisdiction the bucket was created in: "eu", "fedramp", or empty for the global default. # jurisdiction = "" # Key prefix inside the bucket. Empty stores keys at the bucket root. # prefix = "" # Access key id of an R2 API token with object read and write on this bucket. # access_key_id = "forge" # File holding the token's secret access key, mode 0600. Its contents are trimmed. # secret_access_key_file = "/etc/forge/r2-secret" # [storage.s3] # Only read when backend = "s3". Bucket, region, access_key_id and secret_access_key_file are required. # Name of the bucket that holds the blobs. # bucket = "forge-blobs" # Signing region, such as "eu-central-1". MinIO and Garage accept any value. # region = "us-east-1" # Full URL of a non-AWS endpoint. Empty uses AWS. # endpoint = "https://minio.internal:9000" # Key prefix inside the bucket. Empty stores keys at the bucket root. # prefix = "" # Access key id. # access_key_id = "forge" # File holding the secret access key, mode 0600. Its contents are trimmed. # secret_access_key_file = "/etc/forge/s3-secret" # Permit an http:// endpoint. Only for a store on a trusted private network. # allow_http = false # Use bucket.host addressing instead of host/bucket. Off suits MinIO, Garage and most self-hosted stores. # virtual_hosted_style = false # 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 # 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" # Admin alerts. The site admins hear about trouble before it breaks: a silent CI runner, a failed # or overdue backup, low disk space, a CI job killed for memory, a self-update, a lagging standby. # Each is told once until it resolves. Delivered as an inbox row, an email, and a banner on /admin/health. # All of these can also be changed live on /admin/server. # [alerts] # enabled = true # Also email admins with a verified address. # email = true # Minutes without a heartbeat before a runner counts as offline. # runner_offline_minutes = 10 # Alert under this percent of free space in data_dir, or under disk_free_gib GiB (0 turns that off). # disk_free_percent = 10 # disk_free_gib = 0 # Per-kind switches. # on_runner_offline = true # on_backup = true # on_disk = true # on_ci_killed = true # on_self_update = true # on_replication = true