TeaNode · Documentation · Source
Quick start
Start with the assistant alone, which needs no domain and no mail ports.
Mail at your own domain can be added later without losing anything.
What you need
- A computer that stays on: a Linux server, a spare PC, or a Mac with Docker
Desktop. On Linux the install command adds Docker if it is missing, and
PostgreSQL comes with it.
- A model to think with: an API key from OpenAI, Anthropic or Gemini, a
ChatGPT plan you already pay for, or an Ollama or vLLM of your own.
- For the phone apps, or to use it away from that computer, an HTTPS address
in front of it, from any reverse proxy.
1. Start the server
curl -fsSL https://teanode.com/get.sh | sh
It puts the compose file and a fresh database password in /opt/teanode
(~/teanode when you are not root), starts the containers and waits for the
dashboard. Running it again keeps the password and the data. To read it
first, open teanode.com/get.sh. The same
by hand:
mkdir -p /opt/teanode && cd /opt/teanode
curl -LO https://raw.githubusercontent.com/ziyan/teanode/main/deploy/docker-compose.assistant.yml
echo "POSTGRES_PASSWORD=$(openssl rand -hex 24)" > .env
chmod 600 .env
docker compose -f docker-compose.assistant.yml up -d
It listens on port 8080 of the computer's own loopback address, and on
nothing else.
2. Claim the dashboard
Open http://127.0.0.1:8080/. If TeaNode runs on a server rather than the
computer in front of you, reach it through an SSH tunnel first:
ssh -L 8080:127.0.0.1:8080 you@your-server
The first visitor creates the only account, an administrator, so do this
right away.
3. Start the assistant
Once the account is made, TeaNode asks one thing: the model service your
assistant thinks with. Choose OpenAI, Anthropic or Gemini and paste its API
key, or choose Your own server and give the address of your Ollama or
vLLM as the server reaches it. Press Start my assistant. It checks the
key, chooses a model (on OpenAI, the newest sol, with luna for quick answers), restarts itself and opens
your conversation, where the assistant introduces itself.
What it chose can be changed under Manage → Agents → Models; mail,
calendars and contacts are under Manage → Server → Setup. Somebody
else on the server turns on their own agent under Settings → Your
agent.
4. Reach it from your phone
Put port 8080 behind a reverse proxy with an HTTPS address, add the proxy's
address to the trusted proxies in the server's settings, and open the
dashboard there. The iPhone and Android apps connect to that address.
With your own mail
To receive and send mail at your own domain, run the mail compose file
instead, or add mail to this server later under Manage → Server → Setup.
What mail needs
- A domain, and the ability to edit its DNS records.
- A host with a stable public address, reachable from the internet on ports
25, 80, 443 and 587, and on 993 if you want to read the mail in a mail
program.
- Docker with the compose plugin, as above.
Start it with mail
mkdir -p /opt/teanode && cd /opt/teanode
curl -LO https://raw.githubusercontent.com/ziyan/teanode/main/deploy/docker-compose.yml
docker run --rm ghcr.io/ziyan/teanode:latest config env --output - \
--hostname mail.example.com --domain example.com > .env
chmod 600 .env
docker compose up -d
Replace mail.example.com with the name of your server and example.com
with the domain you want mail for. The host name is what your MX record will
point at, so it has to be a name you can add a DNS record for.
Before starting, open .env and set TEANODE_TLS_ACME_EMAIL to an address
where the certificate authority can reach you. Everything else has a working
default. The file holds the database password, which is why it is chmod 600. The server obtains its certificate over HTTP-01 on the first start,
which needs port 80 reachable from the internet.
The compose file also starts ClamAV, which is optional; remove it from the
file if you do not want it, since it alone wants about 2GB of memory. Spam is
scored by a filter inside the server, so nothing else is needed for that.
Create the account
Open https://mail.example.com/. The first visitor creates the only account,
and that account is an administrator with a mailbox of its own, so do this
right away. If you would rather not race, create the account from the shell
instead:
docker compose exec teanode teanode user create you
Publish the DNS records
The dashboard lists every DNS record your domain needs, checks them
periodically, and shows which are still missing. Publish them at your DNS
provider. The MX record is the one that makes mail arrive; the SPF, DKIM and
DMARC records are what make it trusted.
Point an address at your mailbox
A mailbox receives nothing until an address points at it. On the domain's
Aliases tab, add one with the kind Deliver into a mailbox and pick
yours: the pattern ^you$ makes you@example.com yours. Send a message to
it from another account and watch it arrive in your Inbox, unread.
An address that should go somewhere else forwards instead: a pattern such as
^hello$ sends hello@example.com to an inbox you already read, to a
webhook, or to another mail server, and an empty pattern is a catch-all for
everything nothing else matched. One domain can do both.
Read it in a mail program
Make an app password on Mailbox settings → Mail programs, name it for the
device, and type it into Apple Mail, Thunderbird or your phone along with
your address. The program reads over IMAP on port 993 and sends on 587, and
most of them find both from the address on their own. The password is shown
once.
Where to go next
- Deploying covers the container image, upgrades and what
to back up.
- Agents says what the assistant does and what to weigh before
turning it on.
- Getting started explains the mail DNS records one by
one, and what to check when mail does not arrive.
- Configuration documents every setting.
Documentation
Getting started
- What is TeaNode: Send and receive mail at your own domains: mailboxes read here or over IMAP, forwarding, what it does, and what you need to run it.
- Quick start: TeaNode running with docker compose in a few minutes: the assistant first, with no domain, then mail at your own domain if you want it.
- Getting started: Standing up a mail server for one domain, from nothing to mail arriving in a mailbox you can read in a mail program, including the DNS records and the port 25 problem.
Running it
- Deploying: The container image and the compose file, what runs beside the server, how it upgrades itself, and what to back up.
- Configuration: Where the settings live, the environment variables that say how to reach them, and every field an operator can set.
- Agents: The personal agent: what it needs, what it does with a mailbox, and what to weigh before turning it on.
- Memory: What your agent keeps between conversations: a graph of pages it writes without being asked, the places it reads from, and what it does with all of it in its dreams.
- Voice: Call your agent from the chat drawer: say what you want, hear the answer as it is written, and cut in when you like. On a laptop or a phone.
- Coding sessions: Your Claude Code and Codex sessions in herdr, on every computer you attached: your agent reads them, types into them where you can see, and brings you their questions to answer from anywhere.
- Memory in coding sessions: Claude Code and Codex shown what your agent knows about the checkout they run in: the project page and the last session when one starts, recall kept to the project before each prompt, and the transcript read within a minute.
- Model Context Protocol: TeaNode on both ends of the protocol: answering it, so your editor can use your agent's tools and ask it questions, and connecting out to servers of your own.
- Finance: Your banks, cards and brokerages linked through Plaid or SimpleFIN: transactions in your own categories, budgets that say where the month is heading, savings targets, net worth, and a tax year put together from your paystubs, W-2s, 1099s and 1098s, all kept in your own database.
- Circles and chats: The people on one server in circles: chats with each other in the drawer and the app, with voice messages and voice and video calls, with or without their agents, and calendars, albums, memory pages, skills, finance and location shared at the level each owner picks.
- Photos: Photos and videos on your own server: backed up from the phone in the background, found by place, date or what is in them, faces grouped into people you name, and albums shared with your circle.
- Location: Visits to named places recorded by the phone app, the trips between them and how you traveled, a map of your day, where you are shared with the people in your circle, and what leaves the server to name a place.
- Passwords: Logins, passkeys, one-time codes, cards and notes, encrypted on your own devices: filled in Chrome and on iPhone and Android, shared with your circle, and used by your agent only on the logins you turn on.
- Journal: A page for each day that links everything that happened, with your words, your mood and the weather, and the story your agent writes of it; weeks, months and years above the days.
- Shopping lists: Lists shared with your circle, shopped store by store and aisle by aisle, checked off live and by the receipt, with pictures, prices and a reminder at the store.
- The command line: The two programs: the server and the few things only its host can do, and the client that administers it from anywhere through the API.
Security
- Reporting a security problem: Where to report something exploitable, what is in scope, and what is not.
- Security review: A review of the whole program: what was examined, what was found, what was fixed, and what is still open.
Contributing
- Contributing: Naming, comments, the invariants that bite, tests, commits and the changelog that cuts a release.
- Local development: Getting a working build and a database to point it at, a development server that cannot send mail, and the optional scanners.
- Project structure: What each package is for and which way the dependencies point.
Every document is also plain markdown, listed in /llms.txt.