TeaNode · Documentation · Source
servicesDeployment-wide hosted services. Omitted switches preserve existing installations; new assistant seeds write explicit false values for mail routing, mailboxes, calendar, reminders and contacts, and leave Photos on. Disabling preserves data, roles, agent grants and credentials, and refuses new operations immediately. Enabling requires a restart. The dashboard reports selected and running services.
mailRouting: SMTP, forwarding, hosted sending, domains, delivery queues
and mail DNS diagnostics.mailboxes: stored mail, IMAP, mailbox API and mailbox agent jobs.
Requires routing. Forwarding can run without mailboxes.calendar: events and CalDAV event collections. Local events need no mail;
mail invitations require an available hosted mailbox and sender.reminders: reminders and their CalDAV collections, independently of
event calendars. Assistant schedules are independent of this choice.contacts: address books and CardDAV collections.photos: the photo and video library, its uploads and the iPhone app's
backup. Its limits are in the photos section below.isEnabled: nullable boolean inside each service. Omitted means enabled
for compatibility; false makes the service unavailable. photos stays on
for an assistant-only server too, since it needs no mail.hasCompletedSetup: whether the operator completed service setup.
Legacy configurations without switches do not require this step.The existing agent.enabled setting controls the assistant independently.
Authenticated clients use GetServiceCapabilities. teanode services get
reports availability; teanode services set --contacts=true changes a choice.
TEANODE_SERVICE_PRESET seeds only an empty database: assistant disables mail
routing, mailboxes, calendar, reminders and contacts, and leaves Photos on,
mail enables routing and mailboxes, and legacy retains
historical defaults. Without a preset, seeds with a mail hostname or domain
retain historical behavior. Change a configured installation in the dashboard
or through configuration import, rather than changing its seed environment.
Everything an operator sets lives in the database, alongside the mail. The server reads it at startup and re-reads it every few seconds, so a change made in the dashboard — or by another instance — takes effect without a restart.
There is no configuration file. A server used to be described by
teanode.yaml, and moving that into the database is what lets several
instances run against one another without disagreeing about which domains
exist or which credentials are valid.
Two things cannot be kept there, and come from the environment instead: how to reach the database, and which instance this process is.
Write a starting point with:
teanode-server config env --output .env \
--hostname mail.example.com --domain example.com
One variable is required:
TEANODE_DATABASE_URL — where the configuration, the mail and the counters
are kept, for example
postgres://teanode:password@postgres:5432/teanode?sslmode=disable. The
discrete TEANODE_DATABASE_HOST, TEANODE_DATABASE_PORT,
TEANODE_DATABASE_USER, TEANODE_DATABASE_PASSWORD, TEANODE_DATABASE_NAME,
TEANODE_DATABASE_SSL_MODE and TEANODE_DATABASE_LOG_QUERIES override it
field by field. There is no default
host: an instance whose variable is missing would otherwise reach an empty
local database, decide it is a brand new server, and configure itself — which
looks like it worked.
Three are optional. The first matters once there is more than one instance:
TEANODE_INSTANCE_ID — distinguishes this process from the others sharing
that database. It is part of the key under which usage counters are
accumulated, and those are added up by reading a row and writing it back, so
two instances sharing a name lose each other's counts. Defaults to the host
name, which is what a container is already given, and is truncated to the last
32 characters if it is longer.
TEANODE_UPGRADE_DIRECTORY — where an upgrade installed from the dashboard
puts a binary it cannot write over the running one, and where the next start
looks for it. Defaults to upgrade under TEANODE_SERVER_DATA_DIRECTORY when
that is set, and to nothing when it is not — in which case a deployment that
cannot replace its own executable is told it cannot upgrade itself. It must be
an absolute path, and a relative one is refused rather than resolved: a staged
binary has to be found again by a start from any working directory.
It is a variable rather than a setting for one reason: a staged binary has to be found and run before anything opens the database, because this program reverts migrations it does not recognize and an old binary that reached the database first would undo the new one's schema. The settings are in the database. This cannot be.
For a container it should be a directory on a mounted volume — the shipped
docker-compose.yml names /var/lib/teanode/upgrade. A directory inside the
image would work until the container was recreated and then silently be the old
binary again. The directory is created private to the user the server runs as,
and a staged binary that anybody else could have written is refused at the next
start rather than run.
TEANODE_ALLOW_MIGRATION_REVERT — permits an older binary to undo
migrations a newer one applied. Off by default, and the default is the
interesting half: a start that finds migrations it does not recognize refuses
to run rather than reverting them, because reverting drops the columns they
added and everything in those columns, and the three ordinary ways to arrive
there are all accidents. See docs/coding/database-migrations.md. Set it to
true to downgrade on purpose.
The rest describe the server to create when the database has no configuration in it yet. After that the database is the answer and these are ignored — the server says so in its log when it finds them set.
| Variable | Sets |
|---|---|
TEANODE_SERVER_NAME |
server.name |
TEANODE_SERVER_DOMAIN |
a domain to serve; created on a first run, with its own signing key |
TEANODE_SERVER_DATA_DIRECTORY |
server.dataDirectory |
TEANODE_SERVER_LOG_LEVEL |
server.logLevel |
TEANODE_SERVER_MAIL_SERVERS |
server.mailServers, comma separated |
TEANODE_LISTEN_SMTP_INCOMING |
listen.smtpIncoming |
TEANODE_LISTEN_SMTP_OUTGOING |
listen.smtpOutgoing |
TEANODE_LISTEN_IMAP |
listen.imap |
TEANODE_LISTEN_IMAPS |
listen.imaps |
TEANODE_LISTEN_HTTP |
listen.http |
TEANODE_LISTEN_HTTPS |
listen.https |
TEANODE_TLS_HOSTS |
tls.hosts, comma separated; defaults to the server name |
TEANODE_TLS_ACME_ENABLED |
tls.acme.enabled |
TEANODE_TLS_ACME_EMAIL |
tls.acme.email |
TEANODE_SMTP_REQUIRE_REVERSE_DNS |
smtp.requireReverseDns |
TEANODE_SMTP_DISABLE_SEND |
smtp.disableSend |
TEANODE_S3_ENABLED |
storage.s3.enabled |
TEANODE_S3_ENDPOINT |
storage.s3.endpoint |
TEANODE_S3_BUCKET |
storage.s3.bucket |
TEANODE_S3_REGION |
storage.s3.region |
TEANODE_S3_PATH_STYLE |
storage.s3.pathStyle |
TEANODE_S3_ACCESS_KEY_ID |
storage.s3.accessKeyId |
TEANODE_S3_SECRET_ACCESS_KEY |
storage.s3.secretAccessKey |
TEANODE_PASSKEY_ENABLED |
passkey.enabled |
TEANODE_PASSKEY_RELYING_PARTY_ID |
passkey.relyingPartyId; defaults to the server name |
TEANODE_PASSKEY_ORIGINS |
passkey.origins, comma separated; defaults to https:// and the relying party |
TEANODE_PASSKEY_REDIS_ADDRESS |
passkey.redis.address; only needed for more than one instance |
TEANODE_PASSKEY_REDIS_PASSWORD |
passkey.redis.password |
A variable that is set but empty means empty, not absent — some of these turn
something off rather than change it, and TEANODE_LISTEN_HTTPS with no value
is how you say there is no HTTPS listener. So leave a key commented out rather
than blank unless you mean to clear the setting.
A first run needs at least a server name and a domain. The domain is created with a signing key of its own, so DKIM is set up before anyone has heard of it. Every domain added later gets its own key the same way. No account is created: the first person to open the dashboard chooses their own username and password.
A deployment that ran on teanode.yaml loads it once:
teanode-server config import --file /opt/teanode/teanode.yaml
Everything is carried across unchanged — domain and alias identifiers, signing
keys, the server secret, the session key — because changing any of them breaks
something that is working. Stop the server first, so that it does not adopt
half of a configuration you are still reviewing. --dry-run says what would be
loaded and writes nothing.
The reverse makes a backup, in the same format:
teanode-server config export --file backup.yaml
The listeners, TLS, the object store, the data directory and the optional integrations are read once, when the process builds what it needs. Changing one of those stores the change and nothing more until the instance restarts.
Every instance notices and says so — in its log, and on Settings → Server in the dashboard, which names the settings that are out of date and offers to restart. Restarting means the process exits and whatever supervises it starts a new one; there is no restart in place, because the point is to build those things again. Mail already accepted is on disk and is delivered afterwards, and a sender that connects during the few seconds it takes will try again.
That page also says what it thinks will start the process again — a container,
systemd, or nothing it can see. It is a guess: neither a container's restart
policy nor a unit's Restart= can be read from inside the process, so it
names the supervisor rather than promising a return, and errs towards warning.
Restarting is also a command, so a deployment can do it without a browser:
teanode server restart
teanode-server config show # with secrets redacted
teanode-server config show --show-secrets
teanode-server config validate
These read the same environment the server does, so they run where the server
runs — in its container, or with its env file. From anywhere else, the client
reads and changes the same configuration through the API: teanode settings show for the integrations, teanode domain list for the domains, and so on.
See docs/reference/command-line.md.
Neither is configuration. Both are rows in the database, alongside the mail:
session for the browsers signed in, token for the API tokens that let this
tool administer the server from elsewhere.
A cookie and a token are the same shape — an identifier, a secret, and a
signature over both — and only a hash of the secret is stored, so a copy of
the database is not a set of working logins. They are signed with different
keys: sessions with session.key, tokens with server.secret. Rotating
session.key therefore still ends every session on the server, on every
account, which is the break-glass it has always been; it leaves tokens alone.
Both record when they were last used and from where, at most once a minute, so the dashboard can show it without a database write per request. A revoked one is kept for thirty days, marked revoked, so the list can say what happened to it; an hourly sweep removes those and anything long expired.
Each account manages its own. teanode auth login issues one through the
dashboard and keeps it as a profile on the machine that asked. The console is
the exception — it authenticates with a token minted from the server secret
and is not an account at all, so teanode token create --user ziyan laptop
is how somebody gets their first one without a browser.
server.secret, session.key, the DKIM private keys, the ACME account key and
any AWS credentials are all stored with everything else. Two of them are worth
understanding before you move a server:
server.secret signs every SMTP credential password. Carry it to the new
database or every device you have configured stops being able to send.session.key signs dashboard cookies. Losing it logs everybody out,
which is all it does.Both are generated on the first start and never regenerated. A second instance starting against the same database adopts them rather than making its own.
The API never returns any of them. Fields carrying a secret are redacted on the
way out, so a token with full access still cannot read them back. config export does write them in the clear, because a backup that left them out
would not restore a working server; the file it writes is readable only by you.
Relative paths resolve against server.dataDirectory, which has to be
absolute. It used to be allowed to be relative, resolving against the directory
holding teanode.yaml; with no file there is nothing to resolve it against,
and a relative path would land wherever each process happened to be started
from.
servername — Name announced in the SMTP greeting and used as the HELO name
when sending, for example "mail.example.com". It must resolve to this host and
its reverse DNS should match, or receiving servers will distrust mail from
here.
dataDirectory — DataDirectory holds everything the server writes that is
not in the database: keys, certificates, the message spool and the secret, and,
in photo-work, the temporary copies of videos while previews are made of them,
which are emptied when the server starts. Relative paths elsewhere in this file
resolve against it.
logLevel — LogLevel is one of DEBUG, INFO, NOTICE, WARNING, ERROR,
CRITICAL.
secret — Secret signs the bounce return path on outgoing mail and the
passwords derived from SMTP credential keys. Generated on first run. Changing
it invalidates every SMTP password and orphans bounces for mail already in
flight, so when moving a server to a new machine this has to come with it.
Everything sealed in the database is sealed with it too. Started with
--secret-file (or TEANODE_SECRET_FILE), the server reads it from that file
instead and the database does not hold it; see "Keeping the server secret out
of the database" in docs/reference/deployment.md.
secretCheck — SecretCheck is derived from the secret and written in its
place when the secret is kept in a file, so that an instance given the wrong
file refuses to start. It opens nothing. Written by the server; never set by
hand.
mailServers — MailServers are the hosts to publish in every domain's MX
records, in order of preference. Optional; when empty the MX record names this
server, which is right for the single-host deployment most people run. Set it
when mail for these domains arrives at more than one name — a pair like mx1
and mx2 pointing at the same host is common, and gives somewhere to move to
without every domain having to change its DNS. The dashboard then asks each
domain for one MX record per name, at preference 10, 20 and so on in the order
given. These are names mail arrives at. They are unrelated to tls.hosts,
which is the names this server holds a certificate for.
externalAddresses — ExternalAddresses are the addresses mail reaches
this server at, when they are not the address the server discovers for
itself: a relay in front of it, a tunnel from an elsewhere, a load balancer.
The DNS advice checks each MX host's A record against the address the server
sees from outside, because for a server that faces the internet that is the
one value an operator cannot look up; a server reached through something else
fails that check for ever, on a record that is right. Listing those addresses
here makes them count as correct. Names as well as addresses are accepted,
and a name is resolved when the advice is worked out, so a forwarder whose
address moves stays right.
trustedProxies — TrustedProxies are the addresses this server is
reached through, when it is behind a CDN, a load balancer or a reverse proxy:
an address, or a range in CIDR form. A connection through a proxy comes from
the proxy, so without this every audit row and every "last used from" records
the proxy's address rather than the person's. The client's address is in
X-Forwarded-For, which the proxy adds — and which anybody who can reach
this server directly can also forge, so it is read only when the connection
came from one of these. Empty is the safe default and the right one for a
server that faces the internet, where the connection's own address is the
truth.
Behind a reverse proxy, list it here: otherwise every sign-in limiter sees the proxy's address as one caller, and one person's failed attempts lock out everybody who comes through it.
ssoSigning in through an identity provider, beside the password and passkey
forms. OpenID Connect only; every provider that matters speaks it. Each
provider is a button on the sign-in page. The redirect URL to register at
the provider is https://<web host>/api/v1/sso/<id>/callback.
providers — The identity providers offered, one button each. An empty
list means no single sign-on.
sso.providers[]id — Names the provider in the sign-in path and in each person's
identity row: lower-case letters, digits and dashes, up to 32, and stable.
Renaming a provider orphans every identity under it.
name — What the sign-in button says.
issuer — The OpenID Connect issuer URL, https only. The provider's
configuration is read from <issuer>/.well-known/openid-configuration, and
must name the same issuer. A private address is refused.
clientId — The client id the provider issued for this server.
clientSecret — The client secret that goes with it. A secret; shown
redacted, kept when a settings update leaves it blank.
groupsClaim — The claim carrying the person's group names, matched
against each group's idpGroup here. groups when empty. A person is put
in every group naming a claimed name and taken out of every group naming one
that is no longer claimed; groups without an idpGroup are never touched.
createUsers — Whether somebody with no account here gets one made when
they sign in: no password, an identity bound to the provider, a Personal
mailbox, and the groups their claims name. Off, only people whose account
already has an identity at this provider may sign in through it.
graphqlDocument limits apply before SQL work on HTTP requests, agent operations and websocket subscriptions. Changes take effect on the next request.
maximumDepth (default 32, range 1 to 256): maximum delimiter nesting
before parsing, and maximum selection depth after expanding fragments. Strings
and comments do not add nesting.
maximumTokenCount (default 20000, range 1 to 1000000): maximum lexical
tokens in one document. A quoted string is one token; the document also has a
one-megabyte byte limit.
maximumSelectionCount (default 5000, range 1 to 100000): maximum total
selections visited across operations and fragment definitions, including repeated
fragment expansion and aliases. This is a document-work limit, not a result-row
limit; individual resolvers retain their pagination bounds.
maximumListItemCount (default 1000, range 1 to 100000): largest
explicit first argument, including pagination.first. Variables and variable
defaults count too. Omitted, null and nonpositive sizes are charged as 1,000 rows,
so setting this below 1,000 requires callers to supply a smaller positive size.
Resolvers may enforce a smaller cap of their own.
maximumWorkCount (default 200000, range 1 to 100000000): maximum
pagination-weighted field selections in the selected operation. Each field is
charged once per requested item at every paginated ancestor. Aliases and repeated
fragments count separately; conditional selections count even when skipped.
This bounds pagination-driven work, not the size of unpaginated collections,
SQL scans, or model calls. Resolver-specific limits still apply.
The shared mail-audit pagination helper treats omitted and zero sizes as a 1,000-row page. They no longer request an unlimited database result.
listensmtpIncoming — SMTPIncoming receives mail from the internet. Port 25 in
production.
smtpOutgoing — SMTPOutgoing receives authenticated mail from your own
devices for relaying. Port 587 in production.
imap — IMAP serves mailboxes to mail programs, with STARTTLS required
before signing in. Port 143 in production. Empty disables it.
imaps — IMAPS serves the same over TLS from the first byte. Port 993 in
production, which is what most mail programs try first. Empty disables it.
http — HTTP serves the dashboard and answers ACME http-01 challenges.
Port 80 must be reachable from the internet when tls.acme.challenge is
http-01.
https — HTTPS serves the dashboard over TLS.
debug — Debug, when set, serves Go pprof endpoints. Bind it to localhost
only.
imapWhat a mail program is told to connect to for reading mail, which is what the mail program page in a mailbox's settings shows.
Normally it follows the server — server.name, and the ports in
listen.imap and listen.imaps — and all three can be left empty. Set them
when something in front forwards a different port: a container publishing
10993, or a router taking 993 on the outside. Without it the page hands
somebody the port the process happens to bind, which is not the one their mail
program can reach. It is smtp.submission for reading rather than sending,
and like it changes nothing about what the server does. Only what it says.
host — What to connect to. Empty means server.name.
port — The port for the connection that starts plain and turns to TLS.
Empty means the port in listen.imap.
tlsPort — The port for the connection that is TLS from the first byte,
which is what most mail programs try. Empty means the port in listen.imaps.
tlshosts — Hosts to obtain certificates for. The first is the primary name.
certificateFile — CertificateFile and PrivateKeyFile point at PEM files
you manage yourself. When both are set, ACME is not used.
privateKeyFile — See the field above; the two are set together.
acme — ACME obtains certificates automatically from Let's Encrypt or
another ACME provider.
tls.acmeenabled — See the field above; the two are set together.
email — Email is the contact address registered with the ACME provider;
it receives expiry warnings.
directoryUrl — DirectoryURL is the ACME provider. Point it at the Let's
Encrypt staging directory while testing to avoid rate limits.
challenge — Challenge is how domain control is proven: "http-01" needs
port 80 reachable, "tls-alpn-01" needs port 443, "dns-01" needs a DNS provider
below and is the only way to obtain a wildcard certificate.
perDomain — PerDomain obtains a certificate for each domain's own mail
server name, as well as the server's own. Without it every domain is served
the server's certificate, which names a domain the sender did not ask for.
Off by default, so that upgrading a server does not make it ask a certificate
authority for one certificate per domain it serves without anybody deciding
to.
accountKey — AccountKey identifies this server to the certificate
authority. Generated on first use and kept here with the other secrets; losing
it means registering again, which works but spends rate limit.
certificate — Certificate and PrivateKey hold the issued certificate, in
PEM. They are written here by the renewal, so an exported configuration is the
whole of a working server: restoring one elsewhere keeps the certificate
instead of asking the authority for another and spending rate limit. This is
the opposite choice from tls.certificateFile above, and for a reason: these
are written by this server and read by nothing else, whereas a certificate you
manage yourself is written by something else and has to stay where that
something else puts it.
privateKey — See the field above; the two are set together.
route53 — Route53 solves dns-01 challenges using an AWS hosted zone.
tls.acme.route53enabled — See the field above; the two are set together.
zoneId — ZoneID is the hosted zone that contains the records for
tls.hosts.
region — See the field above; the two are set together.
endpoint — Endpoint points at an S3-compatible service that is not AWS,
for example http://minio:9000. Empty means AWS. Self-hosting the object store
is what makes several instances able to share a spool without sharing a
filesystem, and without an account anywhere.
pathStyle — PathStyle addresses the bucket as endpoint/bucket. Implied
when an endpoint is set, and only worth stating to be explicit.
accessKeyId — AccessKeyID and SecretAccessKey are AWS credentials kept
here with the other secrets, so that one file is the whole of a working
server. Leave both empty to use the default AWS credential chain instead: the
environment, a shared credentials file, or an instance role. On EC2 an
instance role is the better answer, because there is no long-lived secret to
leak.
secretAccessKey — See the field above; the two are set together.
credentialsFile — CredentialsFile is an AWS shared credentials file, as
an alternative to the two fields above.
nameservers — Nameservers to query when checking that a challenge record
has propagated, for example "ns-1.example.net:53".
databaseNot stored with the rest — a connection to the database cannot be kept in the
database. It comes from TEANODE_DATABASE_URL and the variables beside it,
described above. The fields are listed here because they are what those
variables set, and because config show prints them.
host — See the field above; the two are set together.
port — See the field above; the two are set together.
user — See the field above; the two are set together.
password — See the field above; the two are set together.
name — See the field above; the two are set together.
sslMode — SSLMode is passed to the PostgreSQL driver: disable, allow,
prefer, require, verify-ca or verify-full. require encrypts the connection
but believes whatever answers on the port; verify-full also checks that the
certificate is signed by sslRootCertificate and names the host being dialled,
which is what stops something else on the network from answering as the
database.
sslRootCertificate — SSLRootCertificate is the PEM file the server's
certificate is checked against, for the two verify modes. The compose file
generates one and mounts it at /certs/server.crt; a managed PostgreSQL will
publish its own. Empty means the system trust store, which a self-signed
certificate is not in.
logQueries — LogQueries echoes every SQL statement to the log. Very
noisy.
smtptrustedSenders — TrustedSenders are domains whose mail skips the
greylisting delay applied to unknown senders.
maxMessageSize — MaxMessageSize is the largest message accepted, for
example "70MB".
maxRecipientsIncoming — MaxRecipientsIncoming limits recipients per
inbound message; a low value frustrates address harvesting.
maxRecipientsOutgoing — MaxRecipientsOutgoing limits recipients per
relayed message.
greylistDelay — GreylistDelay is how long an unknown sender is stalled
before the message is accepted. Zero disables the delay.
requireReverseDns — RequireReverseDNS refuses incoming mail from an
address with no reverse DNS record that resolves back to it. On by default: it
is cheap, and most spam comes from hosts that have none. Turn it off when
this server does not see the real client address — behind a load balancer, on
a private network, or in a container network during a test — because there the
check refuses everything.
socks5Proxy — SOCKS5Proxy, when set, routes outbound SMTP through a
proxy. Useful where the host's own IP address has a poor reputation or port 25
is blocked outbound.
disableSend — DisableSend stops the server from actually delivering
mail. Deliveries are recorded and left undelivered. Use on a development
machine.
authRateLimit — AuthRateLimit is how many authentication attempts one
address may make per minute on the submission port, and AuthRateBurst how many
it may make at once before that rate applies. Verifying a credential is an
HMAC and a comparison, which is fast, so without a limit an address can guess
at whatever rate the network allows. The defaults let a mail client retry a
mistyped password several times and stop a program working through a list.
Zero for either disables the limit.
authRateBurst — How many attempts one address may make at once before
authRateLimit starts applying. A mail client retrying a mistyped password
should never see this; a program working through a list should reach it in the
first second.
smtp.submissionThe address a mail client should be told to connect to, which is what the dashboard shows beside a new credential.
Normally it follows the server — server.name, and the port in
listen.smtpOutgoing — and both of these can be left empty. Set them when
something forwards a different port: a container publishing 10587, or a
firewall taking 587 on the outside. Without it the dashboard hands somebody
the port the process happens to bind, which is not the one their phone can
reach.
It changes nothing about what the server does. Only what it says.
host — What to connect to. Empty means server.name.
port — What port to connect on. Empty means the port in
listen.smtpOutgoing.
smtp.relayHands outgoing mail to one mail server instead of delivering it by looking up the recipient's MX and connecting on port 25.
Most people need this because their connection blocks outbound 25 — almost every domestic ISP and many hosting providers do, since that is how a compromised machine sends spam. A relay is reached on a submission port instead.
It is also how this server sends through a provider. Amazon SES, Postmark and Resend all offer an SMTP endpoint, so there is nothing provider-specific to configure and the message arrives carrying the DKIM signature this server already applied. Their HTTP APIs are a different matter: only SES accepts a built message as-is, and Postmark and Resend take decomposed fields, which means re-signing by them and no way to preserve yours. Use their SMTP endpoints.
| Provider | Host | Port | Security |
|---|---|---|---|
| Gmail | smtp.gmail.com |
587 | starttls |
| Amazon SES | email-smtp.<region>.amazonaws.com |
587 or 2587 | starttls |
| 465 or 2465 | tls |
||
| Postmark | smtp.postmarkapp.com |
587, 2525 or 25 | starttls |
| Resend | smtp.resend.com |
587 or 2587 | starttls |
| 465 or 2465 | tls |
SES wants SMTP credentials derived from an IAM user, not the access key
itself, and they are per region. Resend's username is the literal string
resend with your API key as the password. Postmark uses its server token as
both.
One thing to know about SES: it overwrites Message-ID and Date, so a
signature covering those breaks. This server does not sign them.
Mail forwarded by an alias of kind mailServer is not affected — that names
its own destination, which is the point of it.
enabled — Whether outgoing mail goes through the relay.
host — The mail server to hand it to.
port — Usually 587, 465 or 2525.
security — How TLS is used: starttls for 587 and 2525, tls for 465,
or none.
Unlike delivering to a stranger's MX, the certificate is checked against the
host for both encrypted modes. There is a name to check and a password about
to be sent, so accepting any certificate would mean handing that password to
whoever answered. none does not insist — STARTTLS is still used when it is
offered — and is refused outright when a password is set.
username and password — What it authenticates as. Leave both empty
for a relay that authorizes by address.
dkimselector — Selector to give a newly created domain's key. It appears in
DNS as <selector>._domainkey.<domain>, so it only has to be unique within the
domain, and changing it here does not affect domains already created.
domains[]id — ID identifies the domain in stored mail, deliveries and usage rows,
and in dashboard URLs. It is the domain name: unique already, stable for as
long as the domain is configured, and readable wherever it appears. Older
configurations carry a generated identifier here instead, and keep working —
the rows that reference it still match. Changing it means updating those rows
too, so nothing rewrites it automatically.
domain — Domain is the mail domain itself, for example "example.com".
subdomain — Subdomain is the label whose CNAME points at this server, so
that bounces and DMARC reports have somewhere to arrive. Usually "mail",
making mail.example.com a CNAME to server.name.
linkHost — LinkHost is the name in the addresses this server writes into
mail it sends — today the pictures in a template, each one an address belonging
to a single message. Empty means the domain's first mail server name, which is
right when this server answers HTTPS on it. It often does not: a mail server
name resolves to a host whose port 443 belongs to something else entirely, and
then every picture in every message is broken while the mail itself is fine.
The name here is a way to say where this domain's HTTPS actually is — the site
on the apex behind a CDN, a name pointed at this server for the purpose —
without moving where its mail arrives. It has to be a name that reaches this
server over HTTPS with a certificate a mail program will accept, and it has to
be under this domain: an address in somebody else's domain tells the reader who
runs the server, which is the thing per-domain names exist to stop.
comment — Comment is a note for the operator; it is never used in mail
handling.
dkim — DKIM is the key that signs mail sent from this domain. It is
generated when the domain is created; the matching public key has to be
published in DNS, which the dashboard shows you.
spamFilterScoreThreshold — SpamFilterScoreThreshold is the SpamAssassin
score at or above which mail is rejected. Only meaningful when antispam is
enabled.
aliases — Aliases decide where mail for this domain goes. Every alias
whose pattern matches produces a delivery, so one address can forward to
several places; an alias with an empty pattern is a catch-all and receives
only what nothing else matched.
credentials — Credentials may authenticate to the submission port and
send mail as this domain.
domains[].dkimselector — Selector this key is published under.
privateKey — PrivateKey is a PKCS#8 RSA key in PEM form.
domains[].aliases[]id — ID is generated once and never changes; stored deliveries reference
it.
pattern — Pattern is a Go regular expression matched against the local
part of the recipient address, the part before the "@", without regard to
case. Anchor it: "^hello
config import is taken as written. An empty pattern makes this a catch-all. Catch-alls are a
fallback: they receive mail only for addresses that no pattern matched, so
adding one does not duplicate mail that already has somewhere to go.
comment — Comment is a note for the operator.
kind — Kind is one of null, email, webhook or mailServer.
openai-codex is OpenAI reached with a personal sign-in rather than a key:
a ChatGPT plan, through the Codex API that the Codex command line also runs
on. It answers at a different address, speaks the responses protocol rather
than chat completions, and bills against the plan's allowance instead of
credits. It takes
refreshToken and account and no apiKey, and it offers the models the
plan lists for the account, asked each time the model list is read: every
other name is refused outright. It has no embeddings,
so models.embedding still needs a keyed provider or a local one.
The plan says how much of its allowance is used on every answer, and the Models tab of the agent settings shows what it last said under the provider: the plan's name, and a bar for each window with what is left and when it resets. Nothing asks the plan between turns, so the numbers are as of its last answer, and none are shown until it has answered once. The last reading is written to the database, so a restart shows it again rather than nothing. A window whose reset time has passed since is shown as the whole allowance, until the next answer says how much of the new one is used.
While it runs, each instance shows what the plan said in answer to its own turns. With more than one instance, the tab shows what the plan last told whichever instance served the page, which may be older than what it told another; the database keeps the newest of them, which is what every instance starts from.
email — Email is the destination address when kind is email.
webhook — Webhook is the destination URL when kind is webhook.
mailServer — MailServer is the destination server when kind is
mailServer.
disabled — Disabled stops the alias from matching without deleting it.
domains[].aliases[].mailServerhost — See the field above; the two are set together.
port — See the field above; the two are set together.
username — See the field above; the two are set together.
password — See the field above; the two are set together.
domains[].credentials[]id — ID identifies the domain in stored mail, deliveries and usage rows,
and in dashboard URLs. It is the domain name: unique already, stable for as
long as the domain is configured, and readable wherever it appears. Older
configurations carry a generated identifier here instead, and keep working —
the rows that reference it still match. Changing it means updating those rows
too, so nothing rewrites it automatically.
key — Key is the secret half of the credential.
alias — Alias, when set, restricts this credential to sending as exactly
that local part of the domain. A credential for "noreply" cannot then send as
anybody else, which limits the damage if it leaks.
comment — Comment names the device or service that holds this
credential.
disabled — Disabled refuses authentication without deleting the
credential.
users[]username — See the field above; the two are set together.
passwordHash — PasswordHash is a bcrypt hash. Generate one with "teanode
password".
email — Email receives notifications, such as a domain whose DNS records
have stopped resolving. Optional.
tokens — Tokens authenticate this person's command line client, and act
as them. Removing the account removes them with it.
sessionkey — Key signs session cookies. Generated on first run; replacing it
logs everybody out, which is the way to do that deliberately.
lifetime — Lifetime is how long a login lasts.
dnsnameserver — Nameserver to query, as host:port. A public resolver is a
reasonable default because these are public records.
checkInterval — CheckInterval is how often every configured domain is
re-checked.
externalAddressServices — ExternalAddressServices are asked what address
this server appears to come from, which is what its DNS records have to point
at. A server cannot work this out alone: the address on its interface is
usually private, and only something outside can say what a sending mail server
sees. Each is tried in turn until one answers. Empty disables the lookup, and
the dashboard then asks the operator for the address instead.
callsVoice and video calls in chats. Everybody on a call sends their audio and video to the server's media server once, and it forwards each to the others, so a call can have any number of people. The media server listens on one UDP port and one TCP port, which must be reachable from the internet: forward both on the gateway when the server is behind one, and publish both from the container. See docs/subsystems/chat-calls.md.
enabled — Whether calls are offered in chats. On by default.
publicAddress — The IPv4 address devices send a call's audio and video
to. Leave it empty to use the address the dashboard's name resolves to when
the server starts.
udpPort — The UDP port the media server listens on, 3478 by default.
tcpPort — The TCP port the media server listens on, for networks that
let no UDP through, 3478 by default.
ringSeconds — How long a call rings before whoever has not answered
missed it, from 10 to 300; 60 by default.
antivirusenabled — See the field above; the two are set together.
host — See the field above; the two are set together.
port — See the field above; the two are set together.
antispamSpam scoring. The score a message is compared against is the domain's
spamFilterScoreThreshold, not a setting here.
enabled — Whether messages are scored at all.
engine — What does the scoring: builtin for the filter inside this
server, or spamd for an external SpamAssassin daemon. Leaving it empty is
resolved rather than defaulted, so that an existing deployment keeps working
without being edited: empty with a host configured means spamd, and empty
with no host means builtin.
spamd — Where the external daemon listens, used when engine is
spamd. Its host and port are the two fields.
host, port — Deprecated: use spamd. Kept because it is what
deployments in the field have stored, and it still works.
builtin — The filter inside this server. It scores from what the server
already knows, from public block lists, from a classifier trained on your own
mail, and optionally from public pattern rules. The four groups below can be
turned on and off independently.
signals — Scoring from what the server already established about a
message: its authentication results, the sending host's confirmed reverse DNS
name, and the name it gave in HELO. Costs no lookups, because all of it is
computed before scoring begins. Its one field is enabled.
dns — Reputation lookups in public block lists. A block list is queried
with an ordinary DNS lookup, so this needs no service of its own.
timeout — Bounds the whole set of block list lookups for one message.
addressLists — The lists consulted about the connecting address. Each
entry has a zone and a weight.
domainLists — The lists consulted about domains found in the message.
Each entry has a zone and a weight.
zone — The suffix queries are built with, for example
zen.spamhaus.org.
weight — The points a listing contributes.
maximumDomains — Caps how many domains from one message are looked up,
so that a message full of links is not a burst of DNS queries.
bayes — A classifier trained on this server's own mail, from messages
marked as spam or not spam in the dashboard. It is usually the most accurate
part of a spam filter, because it learns the mail you actually get.
minimumMessages — How many messages of each kind, spam and not spam,
must have been learned before the classifier is allowed to contribute
anything. A classifier trained on four messages is confidently wrong, and one
trained on two hundred of one kind and forty of the other is confidently
wrong about everything unlike those forty. Until both counts are reached the
classifier is silent, and the dashboard's spam breakdown shows no BAYES
line.
rules — Public pattern rules, downloaded into the database and evaluated
in this process. Off by default: an upgrade should not begin downloading and
running rule files nobody asked for.
channels — The update channels to fetch, by name.
updateInterval — How often to look for a new version of the rules.
maximumEvaluationTime — Bounds one message's whole rule pass. Thousands
of patterns run over text an attacker chose, so this is a limit rather than a
target.
Rules are loaded deliberately rather than downloaded unattended:
teanode-server config rules import --file ruleset.cf --channel updates.spamassassin.org
teanode-server config rules show
They are stored in the database, not in a directory, because a server can run
as several instances and they have to evaluate the same rules; each one
notices a new version within a minute. show reports how many rules loaded
and how many were skipped — a published set contains rules implemented by
plugins this server does not have, and patterns its regular expression engine
will not compile, and both are left out rather than guessed at.
There is no automatic download. Rules are patterns this server runs against every message it receives, so fetching them unattended means verifying the publisher's signature, and the OpenPGP package that would do that is deprecated upstream. Adding a frozen cryptography dependency to a mail server is a decision worth taking deliberately.
The rule data published on updates.spamassassin.org is produced by the
Apache SpamAssassin project and licensed under the Apache License 2.0. The
built-in filter is a different program and is not SpamAssassin; it only reads
that published rule data when you enable it and load it.
geoipenabled — See the field above; the two are set together.
databaseFile — DatabaseFile is a MaxMind .mmdb file.
placesWhere the names of the places a person goes to come from, and the map they are drawn on. Place names come from OpenStreetMap: your server sends the position of each new place to the place provider to look up its name. A place is named once, right after the report that made it is stored, and the name is kept, so a server with a handful of people asks very little of the provider. The position sent is the place's own, to six decimals, which for a person's home is their home. Nothing else about the person goes with it: the request carries only the server's User-Agent, which names this server.
providerKind: nominatim (the default) or photon. Empty turns the
provider off: a place is then named after its city from a table built into the
server, nothing is sent anywhere, and a person can still name it themselves.
The same provider answers the check-in list and the agent's place search. It is
on by default because the names are what make a list of visits readable; an
operator who does not want positions to leave the server sets it empty.
providerUrl: The provider's address, without a trailing path. The
default is the OpenStreetMap Foundation's public Nominatim server, whose usage
policy allows light use from an application that identifies itself and asks for
each place once. This server sends at most one request a second whichever
provider is set, and the limit is for each instance: two instances sharing one
database send up to two a second, so give a server with several instances a
provider of your own. A caller that would wait more than a few seconds is told
the provider is busy instead. Photon is for a server you run yourself. The
address must be https; plain http is accepted only for localhost and private
addresses.
mapStyleUrl: The address of the map style the dashboard and the Android
app draw their maps from, fetched through the server so that a viewer's browser
or phone talks to nothing else; the map host sees this server's address and the
tiles it asks for, never a person. The default is OpenFreeMap's liberty style. The same address rules
apply. Only accounts that may use Location are served, up to 600 files a minute
each.
storagemode: local requires a directory and treats S3 as a best-effort mirror.
shared requires enabled S3 and an empty directory; object-store errors are
returned to the caller. Use shared mode for multiple instances. Empty preserves
existing behavior: a directory selects local storage, otherwise S3 is required.
Changing mode does not migrate existing messages or uploaded files.
directory — Directory holds the raw messages, relative to
server.dataDirectory. They are kept out of the database because they are
large, are never queried, and would make a backup expensive.
Empty is allowed when s3 is enabled, and then nothing is kept on this
machine at all. That is what several instances sharing one store want: a
directory there holds only the messages the instance that handled them wrote,
so no instance has all of them and each keeps a copy of somebody's mail that
nothing else needs. The trade is that the store must answer for a message to
be stored, where a directory keeps working while the network does not.
spoolRetention — SpoolRetention is how long a message is kept, which is
how far back the dashboard can show content and how long a stalled delivery
can still be retried. Zero keeps messages forever and eventually fills the
disk.
s3 — See the field above; the two are set together.
storage.s3enabled — See the field above; the two are set together.
bucket — See the field above; the two are set together.
region — See the field above; the two are set together.
endpoint — Endpoint points at an S3-compatible service that is not AWS,
for example http://minio:9000. Empty means AWS. Self-hosting the object store
is what makes several instances able to share a spool without sharing a
filesystem, and without an account anywhere.
pathStyle — PathStyle addresses the bucket as endpoint/bucket. Implied
when an endpoint is set, and only worth stating to be explicit.
accessKeyId — AccessKeyID and SecretAccessKey are AWS credentials kept
here with the other secrets, so that one file is the whole of a working
server. Leave both empty to use the default AWS credential chain instead: the
environment, a shared credentials file, or an instance role. On EC2 an
instance role is the better answer, because there is no long-lived secret to
leak.
secretAccessKey — See the field above; the two are set together.
credentialsFile — CredentialsFile is an AWS shared credentials file, as
an alternative to the two fields above.
photosThe photo library's limits. The library itself is switched on in services.
A photo's bytes are kept in the storage above, named by their SHA-256, and
everything known about it is in the database; a backup of the database alone
is not a backup of the library.
maxFileBytes: MaxFileBytes bounds one uploaded file: a picture, a video,
or the video of a Live Photo. The upload endpoint tells a phone this before it
sends anything, so a file over it is never started. A few minutes of video at
high quality runs to gigabytes, which is why the default, 8 GiB, is large.
maxAccountBytes: MaxAccountBytes bounds everything one person's library
holds, counting each file of each photo including those in the trash, and the
bytes of uploads that have not finished. Zero, the default, is no limit beyond
the disk; set it when several people share a disk.
trashRetention: TrashRetention is how long a photo stays in the trash
before it is deleted for good, 30 days by default. Its bytes go a little later,
in the periodic cleanup, once nothing else refers to them.
isFaceRecognitionEnabled: IsFaceRecognitionEnabled is the operator's
switch for finding faces in photos, on by default. A person can turn faces off
for themselves; this turns them off for everybody. Faces need the
teanode-faces program and its models, which the container image carries.
Places are named from a table of cities bundled with the server, made from GeoNames data (https://www.geonames.org), licensed CC BY 4.0. No place is ever looked up online.
passkeyenabled — Enabled offers passkeys on the sign-in form and in the
account's settings. Off by default: a server reached over plain HTTP, or on a
name that is about to change, is one where registering a passkey would create
something that cannot be used later.
relyingPartyId — RelyingPartyID is the domain a credential is bound to,
without a scheme or a port — mail.example.com, or example.com to let the
same passkey work on every subdomain. Empty means server.name. WebAuthn binds
a credential permanently, so a passkey registered against the wrong name is one
that will never work again and cannot be repaired, only deleted.
displayName — DisplayName is what the browser shows when it asks somebody
to create or use a passkey. Empty means server.name.
origins — Origins are where the dashboard is served from, each with its
scheme and any non-default port: https://mail.example.com. An assertion from
an origin that is not listed is refused, which is what stops a page on another
site from using these credentials. Empty means https:// and the relying
party.
maximumPerUser — MaximumPerUser bounds how many an account may register.
Zero means five, which is a phone, a laptop, a security key and room to replace
one before removing it.
passkey.redisWhere half-finished passkey sign-ins wait. A WebAuthn sign-in is two requests, and behind a load balancer the browser has no reason to come back to the instance it started with, so the challenge minted by the first has to be somewhere the second can find it. With one instance leave the address empty and the challenges stay in the process; nothing durable is kept here either way, and losing the lot costs one retry.
address — Address as host:port, for example redis:6379. Empty disables
it.
username — Username, when the server requires one.
password — Password, when the server requires one.
database — Database number, zero unless something else shares the server.
upgradeenabled — Enabled asks the release list what the newest version is, on
CheckInterval, and shows it in the dashboard. One HTTPS request to a public
endpoint, carrying nothing about this deployment. On by default: knowing that a
version exists is not the same as installing it, and an operator who is never
told is an operator running last year's bugs.
automatic — Automatic installs what it finds without being asked:
download, verify against the release's checksums, replace this binary, restart.
Off by default, because a release can change how mail is handled and nobody
installs a mail server expecting it to change underneath them. It takes any
newer release, minor and major alike — a rule that stopped at a minor version
would be a rule that quietly stopped upgrading.
It is refused, with the reason shown in the dashboard, where there is nowhere
to put the new binary: a deployment whose executable it cannot write over and
which has not been given a writable staging directory in
TEANODE_UPGRADE_DIRECTORY. A container is not refused — it stages onto its
volume and runs that at the next start, so an upgrade survives a recreate — but
a container that was never given such a volume is, and there
docker compose pull is the answer.
The restart does not need a supervisor. The process replaces its own image with the new binary, keeping the same arguments and environment, once everything has been drained and closed — so a server started by hand upgrades itself as well as one under systemd.
One limitation, and it matters most to the deployment this is easiest to turn on for. A release that crashes before it finishes starting is recovered from automatically only where the new binary is staged rather than written over the old one — a container runs the binary in its image again and says why. Where the binary was replaced in place, there is nothing left to fall back to on its own: a supervisor will restart the broken binary until somebody stops it. The binary it replaced is kept beside it, so the recovery is one command,
mv /usr/local/bin/teanode.previous /usr/local/bin/teanode
and then a restart. Automatic upgrades are worth more on a deployment that stages, and worth thinking about twice on one that does not.
checkInterval — CheckInterval is how often to look. Six hours by default:
often enough that a security release is noticed the same day, rarely enough
that it is not a request anybody would notice. Read once at startup, so
changing it takes a restart — the dashboard says so. enabled, automatic and
window are re-read every time the loop wakes and take effect without one.
The loop itself wakes more often than this and asks nothing most of the time.
That is what makes window work: a check every six hours happens at four fixed
times a day, and a two-hour window would be hit or missed depending on when the
process started.
window — Window restricts automatic upgrades to a time of day, in local
time, as 02:00-04:00. It may cross midnight. Empty means any time. An upgrade
restarts the server, which takes a few seconds during which mail is not
accepted — senders retry, but a busy hour is still a worse time than a quiet
one.
What verification means here, said plainly: the binary and the release's
SHA256SUMS are fetched over HTTPS from the repository this server was built
from, and the hash must match. That proves the bytes are the ones GitHub is
serving for that release and that the download was not corrupted. It does not
prove a human meant to publish them: anybody who can publish a release to that
repository can publish a binary, and this will install it. The repository is
compiled in rather than configured, so a stolen dashboard session cannot point
a server at somebody else's builds.
agentThe secrets in this section — provider keys, the search key, what a
connected server is reached with, the Plaid secret — are sealed with server.secret before
they are stored and opened when they are read, the way the domain table's
keys are. A database dump holds ciphertext; a server started with a
different secret cannot read them and says so.
The personal agent: which model services this server may call, which model
does which work, what a deployment offers people at all, and the limits an
operator puts on it. Off by default, and turning it on enables nothing for
anybody — a person turns their own agent on and grants it their mailbox
(docs/decisions/20260910-agents-belong-to-people.md).
enabled — Whether people may have an agent at all. Off means no model
service is ever contacted and nothing below is constructed.
instructions — House instructions: standing words for every agent on
this server, read after the fixed conduct and before a person's own —
"this is a school; never answer a parent automatically".
effort — How hard a turn somebody typed thinks and looks before it
answers: empty for the model's own default, low, medium or high for
every turn alike, or auto for a model to judge each message with the
conversation before it. A thanks is answered at once, a question about how
their own systems work is researched, and a pushback on the last answer or a
request for care gets the most.
Runs with nobody present keep their own.
providers — The model services this server may call, one entry each.
models — Which model does which work.
features — What people may turn on at all.
limits — What a run may cost.
currency — The three-letter code every amount this server shows or
caps is written in. Its own section below.
skillSecrets — The values the installed skills need. Its own section
below.
retention — How long the agent's records are kept.
search — The web search provider behind the web_search tool.
tools — The operator's policy over the tool catalog.
browser — A headless browser the operator runs beside the server.
mcp — Servers speaking the Model Context Protocol whose tools join the
catalog.
finance — Which providers people may link their banks, cards,
brokerages and loans through, and the operator's keys for those that need
them. Its own section below.
skipCertificateCheck — Hosts whose TLS certificate is not checked,
by name. A real loss and narrower than it looks: for a host named here,
anything answering at that address can pretend to be it, so it is only
for equipment that cannot be verified at all — a controller shipping a
certificate issued for 127.0.0.1, which can never be valid for the
address it is reached at. Only a skill going to the endpoint it declares
is given this; the remote image proxy, one-click unsubscribe and
web_fetch follow addresses out of somebody else's mail and always
check.
agent.providers[]name — What provider:model names. Any label, and stable: the models
section and every usage row refer to it.
kind — The API the service speaks: openai (also every compatible
server — Ollama, vLLM, llama.cpp, OpenRouter, xAI, Mistral), anthropic,
or gemini.
baseUrl — Where it listens. Empty means the service's public
endpoint; a local server is http://ollama:11434/v1.
apiKey — Authenticates this server to the service. A secret; shown
redacted, kept when a settings update leaves it blank.
billingApiKey — An OpenAI organization admin key that reads the
organization's cost and usage reports, so the prices can follow what was
billed. Only a provider of kind openai takes one. A secret; shown redacted,
kept when a settings update leaves it blank. It is never sent with a model
call.
refreshToken — Authenticates a provider that is signed in to rather
than keyed, which at present means openai-codex. A secret, shown redacted
and kept when a settings update leaves it blank.
It is the long half of a pair: the server trades it for a short-lived access
token before each run of requests, and never writes that token down. The
dashboard fills it in: Settings, Agent, Providers, a provider of kind
openai-codex, and "Sign in with ChatGPT", which shows a one-time code to
enter on OpenAI's page from any device. teanode agent signin gets one at a
browser on the machine it runs on, for pasting here instead.
Where the service rotates these, the server writes the newer one back here, so the sign-in survives a restart; a new one written here is taken up by the running provider without a restart.
account — Which of a signed-in person's accounts the work is billed
to, where the service asks for it. Not a secret: it names an account, it
does not open one.
enabled — Keeps the key while switching the provider off. Unset means
on. Work assigned to a disabled provider fails validation, so a provider
cannot be switched off from under the models section by accident.
models — A filter over what the service offers, with allow and
deny lists of patterns matched against model names the way a shell
matches file names (qwen*). Empty allow means everything; deny is applied
after allow. Only admitted models may be assigned work.
allow, deny — The two lists of the filter.
pricing — What the service charges, per million tokens, with
input, output, cacheRead, cacheWrite and audioInput. Optional; it lets the usage view show
money beside tokens, which is the number an operator budgets.
input, output, cacheRead, cacheWrite, audioInput — The five
prices. cacheWrite is what putting a prompt into the cache costs, which some
services bill above the input price and report apart from it; left unset it
costs nothing, which is right for a service that does not charge for it and
wrong for one that does. audioInput is what a million audio input tokens
cost, which a transcription model bills apart from text input; left unset,
audio is priced as text input, at input.
model — Which model a modelPricing entry prices: the name after
the provider's, matched the way allow and deny are.
modelPricing — Prices for particular models of this provider, since
one service's models rarely cost alike: a small model and a large one behind
the same key are priced apart. Each entry has a model and the same five
prices. The model is the name after the provider's, matched the way allow
and deny are, so gpt-5* prices a family; the first entry that matches a
model is the one used, so exact names belong above the patterns that would
also catch them. A model no entry matches costs what pricing above says.
providers:
- name: openai
pricing: { input: 0.15, output: 0.6, cacheRead: 0.075 }
modelPricing:
- { model: gpt-5.6-terra, input: 2, output: 12, cacheRead: 0.2 }
- { model: gpt-5.6-luna, input: 0.2, output: 1.2, cacheRead: 0.02 }
agent.modelstranscription selects an explicit provider:model for passive file
transcription with speaker labels and timestamps. Empty disables processing;
chat and realtime voice models are never a fallback. The model must advertise
the required file-transcription capabilities through the provider registry.
Every value is written provider:model, and the provider must be declared,
enabled, and admit the model.
default — The model for anything not named below. Required when the
agent is enabled.
fast — The model for the cheap kinds of work — sorting, summaries,
compaction — unless one of them is overridden. Empty means default.
quick: The model a person's typed turn starts on, in the dashboard,
the browser extension, the iPhone app and the chat apps. It answers quick
things itself (a greeting, a fact, a lookup, a simple action) and, for
anything that needs reasoning, calls think_harder, which hands the rest of
the turn to the ask model with the same conversation and tools. A large
reasoning model takes seconds to answer even "hi", so this keeps it for the
questions that need it. Empty: typed turns start on the ask model, as
before. It is not used by the command line, the API, mail, schedules, goals,
subagents or background work, by a turn whose person chose their own model, or
by a turn that is to dig (high effort), and it is skipped when it names the
model the turn would use anyway.
embedding — The model that turns text into vectors, which enables
search by meaning. Empty means no search by meaning. Changing it marks
existing vectors stale, and the two kinds catch up differently: a person's
memories are re-embedded a few per conversation turn, while mail is only
re-embedded by a backfill, which runs when a mailbox is granted with sorting
and its own backfill on. Mail vectors from the old model are left where they
are; they match nothing, so that mailbox falls back to searching by words.
embeddingDimensions — How wide a vector to ask the embedding model
for, where it takes such a request; zero, the default, is the model's own
width. Worth setting where the knowledge sources are, because that is
where the vectors are: half a million chunks at 1536 floats is three
gigabytes of table and index, and at 512 it is one. The models that
accept this argument are trained so that the first few hundred numbers
carry nearly all of the meaning, so the search is barely worse and the
store is a third the size. The width travels with the model's name
wherever a vector is kept — two widths of one model are two spaces, and
must never be ranked against each other — so changing it makes the
existing vectors stale in the same way changing embedding does.
decide — The model for a question whose answers are known in advance:
is this file worth opening, which of these folders does this page belong
under. It writes nothing and cannot be asked to, so it must name a
typesafe provider, and no other kind of work may name one except
categorize.
Empty is the whole of "off", and is the default. Every decision that can use one also has a path that asks a language model, and that is what runs when this is not set, so nothing here is needed for the agent to work.
Worth setting where the same decision is made tens of thousands of times. The answer comes back in well under a second rather than after a model has written a sentence about it, it carries how sure it is, and it cannot be a word that was not on the list — which is most of the error handling around asking a model to choose.
categorize — The model that assigns spending categories to finance
transactions. The one field that may name either kind of provider: a
typesafe provider's decision model, which picks a category from the list
directly and says how sure it is, or a chat model, which is asked to pick
one in words. Empty falls back to decide, then to scan, then to fast,
then to default.
scan — The model for bulk understanding with nobody present: filing
what a conversation taught, summarizing a document, writing a month's
page, consolidating a page from its facts. It runs over everything the
person has, so it should be the cheapest model that can follow an
instruction. Empty falls back to fast, then to default.
synthesize — The model for deciding what matters across many pages
with nobody present: writing an overview of a page or a theme, reflecting
on a theme, and answering a survey's question for one area. Fewer calls
than the scan, each a judgment. Empty falls back to research, then to
default (never to fast).
triage, research, summarize, reply, ask,
schedule — Overrides per kind of work. Resolution is the override,
else fast for triage and summarize, else default.
compact — The model that folds a long history into a note and names
a conversation. Empty means the model the conversation itself is held
with: a chat compacts on the chat's model, a dream on the scan model. Set
it to fold every conversation with one model instead.
choices — Models a person may pick for their own conversations. Empty
means no choice: everyone uses the ask model. Processing never takes a
person's choice.
agent.featuresEach is on unless set to false. A feature that is off is hidden from
every person's page, refused by the API with a message saying the operator
has not enabled it, and — if it was on for somebody — stops without
deleting anything, so turning it back on resumes.
triage — Category, priority and whether a reply is needed, on
arrival.
summaries — Conversation summaries.
draftReplies — Drafting a reply on request.
search — Search by meaning. Needs an embedding model.
research — Looking things up for a message: the web, the mailbox,
connected servers.
autoReply — Answering mail on a person's behalf.
ask — Talking to the agent.
schedules — Goals that run at set times or when mail arrives, and the
reminders they keep; off, a goal keeps its own pace only.
browser — The browser. Needs one configured.
connectedServers — Servers speaking the Model Context Protocol. Needs
one declared.
computer — A person's own computer, attached with teanode computer,
reached by the shell and filesystem tools while they are present.
chatApps — A person's own Telegram or Discord bot, through which they
talk to their agent's primary conversation.
skills — Tools installed from the skill registry. Off here, nothing
installed is offered and nothing can be installed.
remember — The run after a conversation that files what it taught
into the person's pages. Off, the agent keeps only what the person or the
model explicitly asked it to keep, which is what it did before this
existed and is measurably almost nothing.
knowledge — The places a person points their agent at — a checkout,
a chat archive, a wiki — and searching them. Off, no source is read and
none can be added.
dreaming — The nightly run that works through what arrived,
rewrites the pages it touched and tidies the graph. Off, nothing is filed
or consolidated while nobody is there; what is already in the graph stays
and is still read.
subagents — Letting a turn hand a piece of work to a run of its own.
It costs what a second run costs, against the same person's budget, so a
deployment counting tokens may want it off.
agent.skillSecretsThe values the installed skills need and do not carry. A skill declares the
keys it wants; an operator fills them in here, one entry per value with the
skill that asked for it, the key it asked under, and the value, which
is a secret. teanode agent skill list says which keys each installed skill
is waiting for. On a running server the stored configuration is changed
with teanode settings set agent 'skillSecrets:=[{"skill":"news","key":"NEWSAPI_KEY","value":"..."}]',
which merges by skill and key; a blank value removes one, and teanode settings show agent says which are filled in without showing them.
skill — Which installed skill asked for the value, by its name.
key — The key that skill asked for it under, as teanode agent skill list prints it.
value — The value itself. A secret: sealed with server.secret,
shown redacted, and kept when a settings update leaves it blank.
Only the keys a skill scoped to the operator, which is the default. A key it
scoped to the person is each person's own: they fill it in on their agent
page or with teanode agent skill secret set, it is kept sealed in a row of
their own rather than here, and a value written here for such a key is
ignored.
agent.currencyWhat the providers' prices, and so every amount this server shows or caps,
are written in: a three-letter code such as USD or EUR, and USD when it
is not set. It labels and formats; nothing is converted, so an operator whose
prices are in euros enters them in euros and says EUR here.
agent.limitsmaxBodyCharacters — How much of a message a model is given; the rest
is cut with a marker.
maxRecordingMediaBytes bounds one original recording audio/video file,
including all resumable transport parts. Zero resolves to 2GB.
maxRecordingAccountBytes bounds the total reserved original media for one
account. Incomplete uploads and recordings awaiting blob deletion count against
this limit. Zero resolves to 64GB. Neither limit changes conversation attachments.
maxAttachmentBytes — The most one upload to a conversation may carry,
across its files; 25MB by default. A picture is shown to the model, a
text file is read to it, and anything else is named.
maxChatAttachmentAccountBytes bounds the files one person may keep of those
they have sent in chats; 1GB when it is not set. A message with files stays
until somebody deletes it, and everybody in the chat reads them, so these
are not swept the way a file handed to the agent is. A send that would take a
person past it is refused, with how much they keep and what to do: delete old
messages with files to make room. Not to be confused with maxAttachmentBytes
above, which bounds one upload.
maxSentFileBytes bounds one file sent to a person's main chat: by a
program over MCP, by the agent from another conversation, or by a run nobody
is present for (share_file with to: "main_chat", teanode agent send-file); 100MB when it is not set, which takes a few minutes of a
screen recording.
maxScannedAttachmentBytes — The largest file a knowledge source
carries off a person's machine: a picture or a document that a record in a
records folder said it came with, kept in object storage so that
something can read it later. 25MB by default, which takes in every
screenshot and nearly every document while leaving out the videos and disk
images that would fill a store without teaching the agent anything.
Anything larger is named on the source's page as passed over, and never
uploaded. One source may set its own, in bytes, on its specification; this
is what the rest use. Not to be confused with maxAttachmentBytes above,
which is what a person may hand the agent in a conversation.
dailyTokensPerAgent — The default budget per person per day, which an
operator may override for one person. At the limit, processing for that
person is deferred to the next day with the reason on the run, and
conversations answer that the budget is used up. Resets at midnight in the
person's time zone. Zero means unlimited.
monthlyTokensPerServer — A cap for the whole server. The same
behaviour for everyone until the first of the month; a warning is logged at
80 %. Zero means no cap.
dailyCostPerAgent — The same budget said in money rather than tokens:
what one person's calls may cost in a day, at the prices their providers are
configured with, in agent.currency. An operator may override it for one
person. Where this and dailyTokensPerAgent are both set, whichever runs out
first stops the day. Zero means no limit of this kind.
monthlyCostPerServer — What everybody's agents may cost the deployment
in a month, beside monthlyTokensPerServer, and warned about at 80 % the
same way. Zero means no cap.
embeddingTokensPerDay — Meant to bound embedding apart from
everything else, because the first pass over a person's checkout and chat
archive is a hundred million tokens at a thousandth of the price of a
conversation, and counting it against the same daily budget would stop
the load on its first night and every night after. Zero, the default, is
no limit. Set, validated and read by nothing so far: embedding is counted
in dailyTokensPerAgent and in the money caps like every other call, and
this does not yet change that.
dreamShare — How much of the daily budget one night's run may
spend, as a fraction, so that a night never eats the day. Zero resolves
to 0.3.
scanConcurrency — How many calls the nightly reading makes at once.
One for a service metered by the call; as many as it has slots for a
model of the person's own, where the reading is bound by nothing but the
machine. Zero and one both mean one at a time.
recallTokens — How much of a turn's prompt the pages and facts
recall carries may take, in tokens, a third of it held for facts that no
carried page holds. Zero resolves to 1200, about two to four pages. More
carries more of what recall found, on every turn.
digestDocumentRunes — A bound on how much of each document a
dream's reading is shown, in characters, from its first passage on. Zero,
the default, reads every document whole: a call holds as many documents
as fit in about forty thousand characters, twenty at most, and a longer
document is read in parts of that size, in order, and marked read with
its last part. Set it to read less of each, for less reading.
rewriteConcurrency — How many pages the nightly run rewrites at once,
after the reading. One when unset. Each rewrite changes only its own page,
so pages can be rewritten side by side; on a model that answers slowly, a
few at once is what leaves the rest of the night its time.
ingestChunksPerRun — How many chunks one pass of an ingest job
embeds before it hands the queue back, so that one enormous source does
not hold the worker. Zero resolves to 2000.
maxRoundsPerAsk — How many times one conversation turn may go back to
the model. 150 by default; it was 40, which a turn working through a long
errand on the person's computer ran out of.
maxRoundsPerSubagent — How many rounds one subagent may take. Zero
resolves to 20.
goalTurnsPerDay — How many turns of its own one goal takes in a day, for a
goal at its own pace; a goal on set times is bounded by its times. Zero
resolves to 48, a turn every half hour.
goalTurnsAlone — How many of those turns a goal takes without a word
from the person before it stops and asks them. Zero resolves to 24.
goalsInProgress — How many goals at their own pace one person may have
working or waiting at once; goals on set times are not counted. Zero resolves
to 20.
backgroundWakesAlone — How many turns finished background commands and
work may wake in one conversation before the person writes there again; past
it, endings are written into the conversation and wake nothing. Zero resolves
to 20.
maxRoundsPerResearch — The same for a research run.
maxRoundsPerDream — How many turns one call of a dream may take: a
batch of documents read, a month written up, a page divided. Each is a run
of the conversation loop, and the ones that decide where something goes have
every tool the person has — including their attached computer — so a call may
look a page up, find a file and run something over it before it answers.
Twelve by default, the last of which is told it is the last and must answer.
It was four while a night could only look a page up; four left nothing for
the answer once the smallest useful errand on a machine took three rounds.
Setting it puts the pacing back wherever an operator wants it, and it also
bounds the call that describes an indexed checkout.
maxRoundsPerReply — How many turns a drafting run may take. A reply is a
run of the conversation loop now, with the thread, the mailbox, the address
book and the diary to read before it writes: "are you free Thursday" cannot be
answered from the message alone. Six by default.
maxRoundsPerTriage — How many turns a sorting run may take, three by
default. The smallest of the three on purpose: sorting happens to every
message that arrives, and nearly every message can be sorted from what is in
front of the model, so the prompt tells it to answer at once and this is the
ceiling on the exceptions.
maxToolCallsPerRun — Set, validated, and read by nothing. What actually
bounds a run is maxRoundsPerAsk, together with the rule that stops a turn
when the same call has failed three times. Kept so a stored configuration does
not fail to load.
requestTimeout — How long one call to a provider may take.
concurrency — How many runs a worker executes at once, per instance.
Read when the worker is built, so a change needs a restart of that instance,
which the status line says is owed.
agent.retentionruns — How long the record of work done without anybody watching is
kept: run transcripts, finished and dead-lettered jobs, the replies the agent
held or sent, and the files a run produced. Token and money usage is not swept
by this, or by anything: those rows stay until the agent is deleted, because
they are what a year's spending is added up from.
corrections — How long a person's corrections are kept.
agent.searchkind — The search provider: brave, or empty for no web search, in
which case the web_search tool is not offered.
apiKey — The provider's key. A secret.
agent.financeThe operator holds the provider keys; each person holds their own finance
sources, the links to their logins
(docs/decisions/20260929-the-operator-holds-the-provider-keys-the-person-holds-the-finance-source.md).
offeredProviders — The providers a person may link through: plaid,
simplefin, or both. Empty, the default, offers none. SimpleFIN needs
nothing from the operator: the person pays for the bridge and pastes their
own setup token. Plaid needs the operator's developer account below, and a
listed plaid without its keys is accepted and not offered to anybody.
agent.finance.plaidThe operator's Plaid developer account.
environment — sandbox for Plaid's fake institutions, free and for
trying it out, or production for real ones. Required once the keys are
set: keys work only in the environment they were issued for.
clientId — The developer account's client id. Set together with
secret, or neither.
secret — The developer account's secret for the environment above. A
secret.
countryCodes — The countries whose institutions Plaid Link offers, as
two-letter codes in capitals, for example US and CA. Empty means US.
products — What a finance source is linked with: transactions, and
optionally investments for brokerage holdings and liabilities for what
is owed on loans and cards. Must include transactions when set. Empty
means transactions alone. Plaid charges a monthly fee per finance source
for each product on paid plans, which is why the operator chooses.
agent.pushNotifications on people's phones, through the TeaNode app. Apple delivers notifications to an app only from a key of the developer account that publishes it, so every server sends through a relay: a TeaNode server whose operator holds that key. What a server sends is already encrypted for the phone, so the relay passes it on without being able to read it.
enabled: Whether this server sends notifications to phones. Unset
means on; nothing is sent until somebody connects a phone.
relayUrl: The relay this server sends through, an https address with
no path. Empty means https://mail.teanode.com, the relay for the published
app. A server that is itself the relay sends to itself without the network.
agent.push.relayMakes this server a relay for every TeaNode server's phones. Only for the operator who holds the TeaNode app's Apple push key or Firebase service account; everybody else leaves it off.
enabled: Serves the relay's two endpoints, /api/v1/push/registrations
and /api/v1/push/notifications. Off by default, and they answer 404.
apnsKeyId: The ten-character identifier Apple shows beside the key.
apnsTeamId: The Apple developer account's team identifier.
apnsKey: The key, the whole .p8 file Apple lets you download once,
or the base64 between its first and last lines on one line, which is how
teanode settings set reads it from a pipe. A secret. It also seals the registrations phones hand their servers, so after
it is replaced each phone is sent nothing until the app next starts and
registers again.
apnsTopic: The app's bundle identifier. Empty means com.teanode.app.
fcmServiceAccount: The Firebase project's service account, the whole
JSON file the Firebase console hands out under Project settings, Service
accounts, which lets the relay send to the Android app through Firebase Cloud
Messaging. A secret. Empty serves no Android phones. A relay needs this, the
Apple key, or both; without the Apple key it seals the registrations it hands
out with this account's key, so replacing the account makes each phone
register again when its app next starts.
agent.toolsRisk classes are the floor; this can only make the agent more cautious.
Both lists take family names — mailbox, domains, audit, people,
server, account, general, servers, browser, computer, skills,
finance — or tool names. servers is the family of the connected servers' tools, people
the family of the ones that reach accounts and access, and finance the finance tool.
disabled — Families or tools never offered to anybody.
confirm — Write tools raised to require confirmation before they run.
agent.browserenabled — Whether the headless browser is used. Off means nothing
connects to it.
cdpEndpoint — host:port of the DevTools debugger, for example
chrome:9222, which is where the compose file's browser profile puts it.
attachTabs — Whether a person may attach their own browser tab through
the extension. Unset means yes.
allowPrivateAddresses — Hosts the headless browser may reach inside
the network, which the address guard would otherwise refuse.
proxyListen — Where the guarded proxy binds. Every page this server
opens goes out through that proxy, which is what resolves names for the
browser so that nothing else does: the check then runs on the address the
connection is actually made to, rather than on a name that may resolve
differently a moment later. Empty binds an unused port on the one address Chrome
reaches this server at — its own connection says which that is, so it works
whether Chrome runs on this machine or in a container beside it, without
putting the proxy on every other network this machine is on. Set it when that guess is wrong, or to pin the port for a firewall.
The proxy requires a password that only this server and its Chrome know.
idleTimeout — How long a run's browser context outlives its last use.
maxContexts — How many contexts may be open at once.
agent.voiceTalking to the agent in the drawer. The person presses the telephone beside send; what they say streams through this server to the provider's realtime transcription as they say it, the provider says when they start and stop talking, and each finished utterance is sent as an ordinary turn, the same as if they had typed it. The answer is spoken back through the provider's text-to-speech, and stops when the person starts talking. Off by default.
enabled: whether the drawer offers the microphone. Dictation (words
spoken into a box) and the words under a voice message use it too: with it off,
a voice message still plays but has no transcript.
provider — The provider of kind openai whose key and address the
transcription uses. Empty is the first one.
transcriptionModel — The realtime transcription model. It has to be
one that detects speech itself; gpt-live-transcribe and
gpt-realtime-whisper need the application to end each turn and are refused.
Empty is gpt-4o-transcribe. The words under a voice message are written by
this model too, from the saved file, and are paid for by the sender's agent.
silenceMS — How long a pause ends what somebody is saying, in
milliseconds, up to 5000. Zero, the default, lets the provider judge from
what was said whether the person has finished, so a pause after the agent's
name or in the middle of a thought does not end the turn. A number ends every
turn after a pause that long instead: longer lets a person think in the
middle of a sentence, shorter answers sooner. A pause longer than this in the
middle of one request sends it as two turns, the second reaching the agent
while it works on the first, as a typed follow-up would.
speechModel — The text-to-speech model the answers are spoken with,
through the same provider. Empty is gpt-4o-mini-tts.
askModel — The model a spoken turn is answered with, as
provider:model; empty is the one a typed turn uses (see agent.models.quick
for a small model that typed turns start on). A call wants the first
words soon, and on a long conversation a smaller model starts speaking a second
or more before a larger one, even though it reads the conversation uncached
the first time. When this model differs from the typed one, it is given
think_harder: for a hard question it says a short line and hands the rest of
the turn to the typed model, with the same conversation and tools.
speechVoice — The provider's voice the answers are spoken in, such as
marin, cedar, alloy or coral. Empty is marin. Each person may choose
their own on their agent's settings, which this is the default for.
agent.recordingWhat the server does for a recording while it is still being captured.
isLiveTranscriptionEnabled. Whether a phone or browser that is
capturing a recording may stream its audio through this server for words as
they are spoken. This is a second transcription beside the speaker-separated
one made of the saved audio, billed by the minute to the person's agent like
voice, and it uses the provider and realtime model of agent.voice (the
first provider of kind openai when agent.voice.provider is empty), whether
or not voice itself is on. The words are kept only until the saved audio has
been transcribed. On by default.
isAccurateWordsEnabled. Whether each speaker's turn, as found by the
speaker-separating model, is transcribed a second time by the plain
transcription model of agent.voice (transcriptionModel, gpt-4o-transcribe
when empty, through the first provider of kind openai unless
agent.voice.provider names one). That model takes a prompt, so it is given the
names and terms the person's own data suggests and the end of the turn before,
and spells them better than the speaker-separating model, which takes none.
Speakers and times stay the first pass's, a person's correction still wins over
the new words, and the glossary pass starts from them. It is a second charge
for the same audio, recorded in the agent's usage, and a turn whose second pass
fails keeps the first pass's words. On by default.
agent.mcpservers — The declared servers, one entry each.
agent.mcp.servers[]A server with a command is a subprocess of this server, on its host,
which is why only the configuration can declare one
(docs/decisions/20260910-stdio-servers-are-the-operators.md).
name — Namespaces the server's tools as mcp__<name>__<tool>.
Unique.
transport — http (a URL) or stdio (a command). Empty is
inferred: stdio when a command is set and no URL, otherwise http.
url — The streamable HTTP endpoint, for the http transport.
command, args — The executable and its arguments, for the
stdio transport.
location — Location is where a command-spoken server runs: "server",
the default, is this server's own host, as this process; "computer" is the
person's own attached computer, as them. A server on the computer is reached
only while one is attached, by schedules, goals and nights as by a
conversation, and it cannot be marked headless: that flag offers a server to
the runs that read mail from strangers, which do not reach the person's
machine.
env — Variables given to the subprocess over this server's own
environment, each with a name and a value; how a stdio server is given
its secrets. The values are secrets.
value — One variable's value.
workingDir — The subprocess's working directory. Empty uses the
server's.
auth — none; static, one Authorization value the operator holds,
shared by everyone; user, each person supplies their own credential on
the Agent page; or oauth, each person authorizes through OAuth 2.1 with
PKCE. Empty is inferred: static when an authorization is set, otherwise
none.
authorization — The verbatim Authorization header value for the
static mode. A secret.
oauth — The client this server is at an OAuth-protected server:
clientId, clientSecret (a secret; optional for a public client),
scopes, and authorizationUrl and tokenUrl, which override discovery
when set. Leave clientId empty and a client is registered with the
server the first time somebody authorizes, which is how a server that
publishes no client id of its own is reached; the client is kept with that
person's authorization, so refreshing later uses the same one. Setting the
two endpoints by hand skips discovery, and then a clientId is needed.
clientId, clientSecret, scopes, authorizationUrl,
tokenUrl — The OAuth client's fields.
redirect — Where the authorization comes back to. server, the
default, is the dashboard. computer is a loopback address on the person's
attached computer, which sends the browser on to the dashboard to finish.
For a service that sends an authorization only to a loopback address, the
flow meant for a program on somebody's own machine. The person has to finish
it in a browser on that computer. Only for auth: oauth.
headless — Whether the restricted runs that read mail from strangers
(sorting, research) may use the server's read-only tools. Schedules, goals and
nights reach every connected server without it.
readOnly — The tools that only read, which need no confirmation and
are the only ones a headless run may call. Every other tool of the server
needs confirmation.
disabled — Tools never offered.
timeout — Bounds one call. Empty means 30 seconds.
enabled — Whether the server is declared at all. Unset is on; off
leaves the declaration in place and offers none of its tools.
users[].tokens[]id — ID identifies the token, and is the half of the token string that
is not secret. It appears in the log, so a token can be traced back to an
entry here and revoked.
name — Name says what holds it, for example "laptop". Not unique.
hash — Hash is the SHA-256 of the secret half, hex encoded. A token is
32 random bytes, so there is nothing for a slow hash to protect against —
unlike a password, it cannot be guessed.
created — Created records when it was issued, for the operator's
benefit.
expires — Expires, when set, is when it stops working.
Every document is also plain markdown, listed in /llms.txt.