Skip to main content

Configuration Reference

Angos is configured via a TOML file (default: config.toml). The configuration is automatically reloaded when the file changes.

Hot Reloading

Most configuration changes take effect immediately without restart. The following options require a restart:

  • server.bind_address
  • server.port
  • observability.tracing.sampling_rate
  • Enabling or disabling TLS
  • Changing storage backend type (filesystem ↔ S3)

TLS certificate files are also automatically reloaded when they change.


Server (server)

OptionTypeDefaultDescription
bind_addressstringrequiredAddress to bind (e.g., "0.0.0.0", "127.0.0.1")
portu168000Port number
query_timeoutu643600Query timeout in seconds
query_timeout_grace_periodu6460Grace period for queries in seconds

TLS (server.tls)

When omitted, the server runs without TLS (insecure).

OptionTypeDefaultDescription
server_certificate_bundlestringrequiredPath to server certificate (PEM)
server_private_keystringrequiredPath to server private key (PEM)
client_ca_bundlestring-Path to client CA bundle for mTLS

Global Options (global)

OptionTypeDefaultDescription
max_concurrent_requestsusize64Tokio worker threads (see Performance Tuning)
max_concurrent_cache_jobsusize4Maximum concurrent cache jobs
update_pull_timeboolfalseTrack pull times for retention policies
enable_redirectbooltrueAllow HTTP 307 redirects for blob downloads
immutable_tagsboolfalseGlobal immutable tags default
immutable_tags_exclusions[string][]Regex patterns for mutable tags
authorization_webhookstring-Name of webhook for authorization

Global Access Policy (global.access_policy)

OptionTypeDefaultDescription
default_allowboolfalseDefault action when no rules match
rules[string][]CEL expressions for access control

Global Retention Policy (global.retention_policy)

OptionTypeDefaultDescription
rules[string][]CEL expressions for retention

Cache (cache)

Token and key cache configuration. Defaults to in-memory (not suitable for multi-replica).

Redis Cache (cache.redis)

OptionTypeDefaultDescription
urlstringrequiredRedis URL (e.g., "redis://localhost:6379")
key_prefixstring-Prefix for cache keys

Blob Storage (blob_store)

Choose one: blob_store.fs or blob_store.s3.

Filesystem (blob_store.fs)

OptionTypeDefaultDescription
root_dirstringrequiredDirectory for blob storage
sync_to_diskboolfalseForce fsync after writes

S3 (blob_store.s3)

OptionTypeDefaultDescription
access_key_idstringrequiredAWS access key ID
secret_keystringrequiredAWS secret key
endpointstringrequiredS3 endpoint URL
bucketstringrequiredS3 bucket name
regionstringrequiredAWS region
key_prefixstring-Prefix for S3 keys
multipart_part_sizestring"50MiB"Minimum multipart part size
multipart_copy_thresholdstring"5GB"Threshold for multipart copy
multipart_copy_chunk_sizestring"100MB"Chunk size for multipart copy
multipart_copy_jobsusize4Max concurrent multipart copy jobs
max_attemptsu323Retry attempts for S3 operations
operation_timeout_secsu64900Total operation timeout
operation_attempt_timeout_secsu64300Per-attempt timeout

Metadata Storage (metadata_store)

Optional. Defaults to same backend as blob store.

Filesystem (metadata_store.fs)

OptionTypeDefaultDescription
root_dirstring-Directory for metadata (defaults to blob store)
sync_to_diskboolfalseForce fsync after writes

S3 (metadata_store.s3)

Same options as blob_store.s3.

Distributed Locking (metadata_store.*.redis)

Required for multi-replica deployments.

OptionTypeDefaultDescription
urlstringrequiredRedis URL
ttlusizerequiredLock TTL in seconds
key_prefixstring-Prefix for lock keys
max_retriesu32100Max lock acquisition retries
retry_delay_msu6410Delay between retries

Authentication (auth)

Basic Auth (auth.identity.<name>)

OptionTypeDefaultDescription
usernamestringrequiredUsername
passwordstringrequiredArgon2 password hash

OIDC (auth.oidc.<name>)

GitHub Provider

OptionTypeDefaultDescription
providerstringrequiredMust be "github"
issuerstring"https://token.actions.githubusercontent.com"Issuer URL
jwks_uristring"https://token.actions.githubusercontent.com/.well-known/jwks"JWKS URI
jwks_refresh_intervalu643600JWKS refresh interval (seconds)
required_audiencestring-Required audience claim
clock_skew_toleranceu6460Clock skew tolerance (seconds)

Generic Provider

OptionTypeDefaultDescription
providerstringrequiredMust be "generic"
issuerstringrequiredOIDC issuer URL
jwks_uristring-Custom JWKS URI (auto-discovered if not set)
jwks_refresh_intervalu643600JWKS refresh interval (seconds)
required_audiencestring-Required audience claim
clock_skew_toleranceu6460Clock skew tolerance (seconds)

Webhooks (auth.webhook.<name>)

OptionTypeDefaultDescription
urlstringrequiredWebhook URL
timeout_msu64requiredRequest timeout in milliseconds
bearer_tokenstring-Bearer token for authentication
basic_auth.usernamestring-Basic auth username
basic_auth.passwordstring-Basic auth password
client_certificate_bundlestring-Client cert for mTLS
client_private_keystring-Client key for mTLS
server_ca_bundlestring-CA bundle for server verification
forward_headers[string][]Headers to forward from client
cache_ttlu6460Response cache duration (0 to disable)

Repository (repository."<namespace>")

OptionTypeDefaultDescription
immutable_tagsboolinheritsOverride global immutable tags
immutable_tags_exclusions[string]inheritsOverride global exclusions
authorization_webhookstringinheritsWebhook name (empty to disable)

Upstream (repository."<namespace>".upstream)

Array of upstream registries for pull-through cache.

OptionTypeDefaultDescription
urlstringrequiredUpstream registry URL
max_redirectu85Maximum redirects to follow
server_ca_bundlestring-CA bundle for server verification
client_certificatestring-Client certificate for mTLS
client_private_keystring-Client key for mTLS
usernamestring-Basic auth username
passwordstring-Basic auth password

Access Policy (repository."<namespace>".access_policy)

Same as global.access_policy.

Retention Policy (repository."<namespace>".retention_policy)

Same as global.retention_policy.


Observability

Tracing (observability.tracing)

OptionTypeDefaultDescription
endpointstringrequiredOpenTelemetry endpoint
sampling_ratef64requiredSampling rate (0.0 - 1.0)

Web UI (ui)

OptionTypeDefaultDescription
enabledboolfalseEnable web interface
namestring"angos"Registry name in UI header

Performance Tuning

max_concurrent_requests

Controls the number of Tokio worker threads handling HTTP requests. Default: 64.

Registry operations are likely I/O-bound (network transfers, storage I/O), so more threads than CPU cores typically improves throughput.

Rule of thumb: Start with 8-16x your CPU core count and adjust based on monitoring.


Example Configuration

[server]
bind_address = "0.0.0.0"
port = 5000

[server.tls]
server_certificate_bundle = "/tls/server.crt"
server_private_key = "/tls/server.key"

[global]
update_pull_time = true
immutable_tags = true
immutable_tags_exclusions = ["^latest$"]

[blob_store.fs]
root_dir = "/var/registry/blobs"

[metadata_store.fs]
root_dir = "/var/registry/metadata"

[metadata_store.fs.redis]
url = "redis://localhost:6379"
ttl = 10

[cache.redis]
url = "redis://localhost:6379"

[auth.identity.admin]
username = "admin"
password = "$argon2id$v=19$m=19456,t=2,p=1$..."

[auth.oidc.github-actions]
provider = "github"

[global.access_policy]
default_allow = false
rules = ["identity.username != ''"]

[repository."docker-io"]
[[repository."docker-io".upstream]]
url = "https://registry-1.docker.io"

[ui]
enabled = true
name = "My Registry"