Run your own Twring server: a voice for your agents, on your machine
Twring is open source, and one command, curl -fsSL https://twring.com/install.sh | sh, sets up your own Twring server on the Linux machine where your agents run, with your own Deepgram or xAI speech key. Your chats, files and agents stay on that server, and so do your calls unless your server uses Twring's audio service; rings to a locked phone still go through Twring's ring service, because only Apple and Google can make a locked phone ring.
Who this is for, and who doesn't need it
Twring is a phone app for calling the AI agents you already run, such as Claude Code, Codex or Hermes. Twring only handles the voice: speech to text, text to speech, turn-taking and interruptions. Your agent keeps its own model, memory, tools and permissions.
Self-hosting is for developers and teams who already run agents on a VPS (a rented server) or in a cloud sandbox, and want Twring right next to them.
If you just want to call your agent, you don't need any of this. Get an invite and use Twring as it is. Nothing in this post is required for that.
One honest note first: the app update is coming
You use the same Twring app on your phone. But as the self-hosting page says today, the app update that connects to your own server is coming. Until it ships, you can install a server, but plan on the phone side arriving with that update.
What you need
- A Linux machine, x86_64 or arm64, with Docker and the Docker Compose plugin. The installer never installs Docker for you.
- Ports 80 and 443 reachable from the internet. A domain is optional: without one, the installer uses an sslip.io name for your public IP.
- For your own call audio, 7881 (TCP) and 7882 (UDP) open too. If you can't open them, as in most cloud sandboxes, Twring's audio service carries your calls instead.
- A speech account key from Deepgram or xAI. This is what turns speech into text and text into speech.
- An email address, for one confirmation link from Twring's ring service.
- Node.js 20 or newer, only if you want the installer to link the agents on that machine.
What the one command does
On the Linux machine where your agents run, as root (or with sudo in front of sh):
curl -fsSL https://twring.com/install.sh | sh
- It asks for your email address and your speech key. The key is hidden as you type, and neither answer reaches your shell history.
- It checks the server image and installer kit against published checksums.
- It writes its settings to
/opt/twring, keeps keys in a data volume, and installs thetwringcommand. - It starts the server and shows a code to scan with the Twring app.
- It links the agents on that machine for you, as a normal user, never as root.
Want to give your answers ahead of time with sudo? Export them and keep them with -E:
export TWRING_EMAIL=you@example.com
export TWRING_SPEECH_KEY=your-deepgram-key
curl -fsSL https://twring.com/install.sh | sudo -E sh
Don't put the key on the command line itself (sudo TWRING_SPEECH_KEY=... sh): other people on the machine can see it there. For an xAI key, also set TWRING_SPEECH_PROVIDER=xai.
One more thing to know: a machine links to one server at a time. Linking its agents to your own server replaces that machine's link to Twring's service.
Where your call audio goes
There are two ways a call's audio can travel, and the installer picks one automatically by checking whether your audio ports can be reached:
- Your server. Audio goes only between your server and the phones.
- Twring's audio service. Audio passes through Twring, encrypted in transit, and is never stored. Twring counts minutes, with daily limits.
The choice is made at install. Changing it later means uninstalling and installing again, which deletes people, phones, chats and keys. Usually it's simpler to open the ports and keep what you have. twring audio check tells you whether phones can reach your audio.
What stays on your server, and what Twring receives
Your agents, chats, files, people and phones, and your speech key stay on your server. Twring's ring service receives only:
- The email address you gave at install, to confirm the server is yours and tell you about changes, and whether you want news.
- Your server's address, so the ring service can check it can be reached.
- Your phones' push tokens, so Apple and Google can deliver rings.
- Counts of rings, notifications and call minutes, to keep fair limits.
- Notification contents sealed on your server for your phone. Twring passes them on and can't read them.
- If you use Twring's audio service, the call audio passing through (never stored), and a record of each call's time and length, kept for 90 days.
Running twring uninstall asks the ring service to delete what it keeps for your server. The privacy notice has the details.
Why rings still go through Twring
When your phone is locked, only Apple and Google can make it ring, and they deliver those rings only to Twring's app, sent with Twring's keys. A server you run yourself can't hold those keys. So rings for every self-hosted server go through a ring service that Twring runs.
Your server and chats work without it while the app is open, and so do calls on a server with its own call audio. What the ring service adds is your phone ringing when it's locked or the app is closed. If your server uses Twring's audio service, calls need the ring service too.
The ring service needs your email confirmed. If it isn't confirmed within 7 days, rings pause (and so do calls through Twring's audio service) until you click the link.
The planned yearly charge
Self-hosting will have a yearly charge, paid in the app. It pays for keeping the ring service running and keeping the app working with your server. Right now it's free while we launch. Before any charge starts, you'll be told in the app and by email, with the price. Nothing is charged without your OK.
Sharing agents with your team
Agents are shared only if you choose to. Before you do, know what sharing means:
- A shared agent runs as the computer login that linked it. People you add can ask it to read files and use anything it can use without asking, as that login.
- So use a separate login made just for shared agents, with no SSH or cloud keys and none of your personal files.
- Each person has their own conversation, but the agent's own memory is shared: something one person tells it may come up for others.
- Whoever runs the computer can read everyone's conversations with its agents.
Tell your team before you share.
When something doesn't work
- Ports 80 or 443 already in use. Another web server holds them. The installer names it and stops; stop that server and run the installer again.
- Calls connect but there's no sound. The audio ports are closed somewhere. Run
twring audio check --fullwhen nobody is on a call (it briefly stops call audio), then open 7881/tcp and 7882/udp. - Phones don't ring when locked. Confirm the email the ring service sent at install, and check spam.
- Anything else. Run
twring logs, then write to support@twring.com. A person reads every email.
The full server guide covers updates, backups, removing people and phones, and moving to a new machine. Twring is open source at github.com/saasagelabs/twring.
Questions
Do I need to self-host to use Twring?
No. If you just want to call your agent, get an invite and use Twring as it is. Self-hosting is for people who want the server right next to agents they already run on their own machine.
Can my server make a locked phone ring on its own?
No. Only Apple and Google can ring a locked phone, and only for Twring's app with Twring's keys, so rings go through Twring's ring service.
Which speech providers can a self-hosted server use?
Deepgram or xAI. You give your own key at install, and it stays on your server.
Does a self-hosted server cost anything?
It is free while we launch. A yearly charge is planned for the ring service, and before any charge starts you'll be told in the app and by email, with the price. Nothing is charged without your OK.