Running Cape
This page covers what is specific to running Cape, the calls app, on your server: its phone provider, its call engine, its recordings and how to keep them, and why it never updates by itself.
Where it runs
| Folder | /opt/cape |
| Address | calls.<your-domain> |
| On the server | 127.0.0.1:3430 |
| Services | app, engine (the call engine), db, migrate, updater |
| Settings | Cape settings |
Its smallest disk size leaves the recordings out. A recorded hour of calls takes about 29 MB, so plan the disk for the hours you keep. Put recordings on a disk of their own with the CAPE_DATA_DIR setting.
The phone provider
Cape makes and takes calls through your own account at Telnyx or Twilio. You connect it in Cape, not on the server:
- Open Cape and go to Settings › Provider.
- Connect your Telnyx account (API key, public key and account ID) or your Twilio account.
- Follow the checks on the page until each one passes.
- Attach your phone numbers to Cape on Settings › Numbers.
The provider sends each call's events to https://calls.<your-domain>, so that address must be reachable from the internet. See Set up Cape for your team for the rest of Cape's own setup.
The provider's keys can instead be set on the server (TELNYX_API_KEY, TWILIO_ACCOUNT_SID and the others); Cape's Provider page then says the account is managed by the server's environment.
Updates are always by hand
Cape never updates itself: an update restarts the call engine, which would cut live calls. New installs leave its automatic updates off. Update it when no calls are running, from Server › Products or with foxden update --product cape. The update waits until the engine runs the new build and takes calls again before it reports healthy.
Its data
- Database: calls, lists, campaigns and settings.
- Recordings: the audio of recorded calls, in Cape's data folder (
cape-data, or the diskCAPE_DATA_DIRnames).
The nightly backup at 01:45 holds the database only. The recordings are not in it: to keep them off the server, set up the separate recordings copy described in Back up and restore. Until you do, foxden backup says Cape's recordings are not backed up.
The secret that must not change
Cape's APP_SECRET seals stored documents and the phone account saved on the Provider page. With a different one, neither can be opened. Keep a copy off the server, and on a new server put it back before you restore Cape.
After a restore or a domain move
The provider still sends calls to the old address until you change it:
- Telnyx: Cape's Provider page repairs the webhooks.
- Twilio: the Provider page attaches the numbers to Cape again; change the URLs of the two TwiML Apps in the Twilio Console yourself.
Email and AI
Cape sends no email. Call transcripts, summaries and spoken prompts use AI through Admin's AI gateway; without a provider key there, calls and recordings work and those features are off.
Sign-in and people
With Admin on the server, people sign in to Cape through Admin. On its own, the hand-over screen prints a setup link (/setup?token=...) that creates Cape's first account; foxden console link --product cape prints it again until that account exists.