Skip to content

Configuration

a2ald keeps its configuration in config.toml inside the data directory. Default data directories: %APPDATA%\a2al on Windows, ~/Library/Application Support/a2al on macOS, and ~/.config/a2al on Linux. If the file does not exist on first start, the daemon writes a default one.

MethodApplies to
Edit config.toml and restartEvery field; the change is certain to take effect
a2al config set <key> <value> or PATCH /configLive-changeable fields only; the response lists keys that still need a restart under restart_required
Command-line options (--listen, --api-addr, --bootstrap, --fallback-host, --no-open-browser, -config)Temporary overrides that take precedence over the file
KeyDefaultNotes
listen_addr:4121The UDP listen address for the DHT and direct connections. The wildcard :4121 means dual-stack (IPv4 + IPv6); an explicit IPv4 address makes it IPv4-only.
quic_listen_addremptyWhen empty, QUIC and the DHT share one UDP port; when set, QUIC listens separately.
bootstrap[]Seed nodes in host:port form (not multiaddrs). Empty joins the public network; non-empty skips public DNS and the beacons and forms a network only with the nodes given.
min_observed_peers3How many peers must report the same result before a reflexive address is accepted.
fallback_hostemptyThe address published when neither the listen address nor the reflexive observation is conclusive.
disable_upnpfalseSkip UPnP (IGD port mapping for IPv4). Reasonable on cloud hosts and routers without UPnP.
bootstrap_node_idsnoneOptional; requires bootstrap peers to have a NodeID in the given list (hexadecimal).

Port usage is 4121/UDP + 4121/TCP: UDP carries QUIC direct connections and address lookups, TCP carries the built-in ICE signalling. The administrative surface listens on 127.0.0.1:2121 by default.

KeyDefaultNotes
api_addr127.0.0.1:2121The listen address for the panel, the administrative API and the local gateway. Keeping it local is perfectly usable.
api_tokenemptyEmpty means open access (a deliberate default). Once set, non-local origins must send Authorization: Bearer.
require_local_tokenfalseWhen true, local calls need a token as well — worth enabling on a machine with several users.
open_browsertrueOpen the panel automatically at startup; turn it off for headless or service operation (or pass --no-open-browser).

The administrative surface has further protections: local-origin requests have their Host header checked to block DNS rebinding, and request bodies are capped at 1 MiB (a fetch response is capped at 4 MiB and flagged truncated beyond that).

KeyDefaultNotes
key_diremptyEmpty uses the default key directory inside the data directory.
files_rootemptyThe sandbox directory for file-object bytes handed to the daemon (CAS, the body_base64 of group_object_put). Empty means objects registered by path have no extra directory restriction.

The data directory has mode 0700 and the configuration file 0600, with keys under <data-dir>/keys/. One data directory can be used by one a2ald process at a time (an exclusive lock).

KeyDefaultNotes
log_formattexttext or json; the latter suits log aggregation.
log_levelinfodebug / info / warn / error.
log_debug_componentsnoneTurn on debugging per component when needed, for example ["ice", "punch", "natsense"].
KeyDefaultNotes
auto_publishtrueKeep address records renewed so that people who know your AID can resolve you; with it off, publish by hand with a2al agents publish.
learned_path_firsttruePrefer reusing the last working UDP path, and fall back to ICE if that fails.
[update] autotrueCheck for updates in the background; a2ald update does it by hand too (the panel offers no update entry point).
KeyNotes
ice_signal_url / ice_signal_urlsICE signalling (WebSocket) addresses; when ice_signal_urls is non-empty it takes precedence.
ice_stun_urlsstun: addresses; empty with no TURN configured means public STUN is used.
signal_listen_addrThe TCP listen address of the built-in ICE signalling hub; empty derives the same port from listen_addr, and off disables it.
disable_relayWhen true, TURN relays are not used by default; it can also be passed per call.
[[turn_servers]]External TURN servers with the fields url, username, credential, credential_type (static / hmac / rest_api). Credentials are never published.

Direct connections and ICE cover the vast majority of network combinations; only when both ends are behind symmetric NAT do you need to configure TURN yourself. A2AL runs no relays, and a relay forwards encrypted traffic only.

GoalPage
Advice on ports and access controlSecurity Practices
Running resident on LinuxDeploy with systemd
Running in a containerDeploy with Docker
The full REST configuration surfaceREST API