On your server
The runtime at a name of yours, with https, in one command: pinecall-runtime setup --domain.
The whole runtime on one machine of yours, at a name of yours, with https: the same verb as
on your machine, given the name. Everything runs in Docker and comes back after a
reboot. Your agents run there, and you and your team reach it from your own laptops with pinecall login.
Before you start#
- A Linux machine with a public address: a VPS, or a cloud VM. 4 vCPUs and 8 GB of memory serve a few calls at once on vendors' models; a machine with an NVIDIA card serves the open models too. Each environment's worker takes four spoken calls at once (see How many calls).
- Docker with the compose plugin, and uv. Your own user must reach
Docker's daemon (
docker infowithoutsudo:sudo usermod -aG docker $USER, then sign in again). With an NVIDIA card, its driver and NVIDIA's container toolkit too:docker run --rm --gpus all ubuntu nvidia-smishows the card. - A name whose A record points at the machine (
voice.example.com → 203.0.113.7). - Open ports: 80 and 443 (https, and Let's Encrypt proving the name), 7881/tcp and 7882/udp (the calls' audio). With phone calls, 5060 and 10000-10019/udp, to your carrier alone.
- Your vendors' keys as environment variables (
DEEPGRAM_API_KEY,ANTHROPIC_API_KEY,CARTESIA_API_KEY…), or exported in~/.bashrc; a machine with a GPU needs none.
Run it#
Install the runtime#
uv tool install --python 3.13 "pinecall-runtime[voice]"
Set it up at your name#
pinecall-runtime setup --domain voice.example.com
Pinecall runtime · voice.example.com
name voice.example.com → 203.0.113.7 — this machine ✓
https certificate from Let's Encrypt, renews itself
keys anthropic · cartesia · deepgram — found in the environment, lent to every org
models none served here — calls run on the keys above
Who signs in to the console?
email ana@example.com
password ••••••••
again ••••••••
services Postgres · Redis · LiveKit
phone off — `--phone` turns it on
✓ ready https://voice.example.com
✓ ana@example.com runs this runtime and is admin of org default
From your laptop:
npm i -g pinecall
pinecall login https://voice.example.com
pinecall new acme --agent front-desk && cd acme && npm install
pinecall start # the agent, held here: leave it running
pinecall chat # in another terminal: talk to it
More orgs: the console → Box → Organizations · logs: pinecall-runtime local logs
It checks the name points at this machine, puts Caddy in front with a certificate it renews itself, starts LiveKit with a key pair drawn for this machine, and runs two gateways (one answers while the other is started again) and, for the sandbox and for production, a worker and an overflow. The first run downloads the images (and, on a GPU, the models): some minutes. Then it returns; the runtime keeps running.
Sign in from your laptop#
npm i -g pinecall
pinecall login https://voice.example.com
pinecall new acme --agent front-desk && cd acme && npm install
pinecall start # holds the agent: leave it running
pinecall chat # in another terminal: talk to it
login opens the browser, where you sign in with the email and password above. Every pinecall
command in the project then runs on your server; the console is at https://voice.example.com.
Keys, and who pays#
The keys setup found are the runtime's, and the runtime lends them to every org on it: an org
made later runs its calls on them with nothing to add, and pinecall limits says so (lent by the
runtime). An org that should pay its own vendors brings its key — pinecall providers add deepgram
— and its calls run on it from then on. To stop lending to one org:
pinecall-runtime orgs lends <org> --env production none
Every call is priced at the vendors' list prices the package ships, so the console shows what each call cost, and a monthly budget per org stops new calls once spent (Limits). Charging your customers for it is yours: Charging for it.
More orgs and people#
Only you make orgs here: the console's Box → Organizations → New organization → Invite, or
pinecall-runtime orgs add clinica --name "Clínica Norte"
pinecall-runtime orgs invite clinica ana@clinica.es --name "Ana" --role admin
The person invited signs in with pinecall login https://voice.example.com. A pinecall-runtime
verb runs on the server itself, after eval "$(pinecall-runtime local env)".
Your own LiveKit#
LiveKit Cloud, or a LiveKit you already run, instead of the one setup starts:
pinecall-runtime setup --domain voice.example.com --livekit wss://acme.livekit.cloud
It asks the LiveKit's API key and secret, tries them, and ends with the one step left in LiveKit:
its webhook, https://voice.example.com/v1/livekit/webhook, signed with that key (LiveKit Cloud:
Settings → Webhooks). LiveKit tells the runtime when a caller arrives through it, so it must reach
your server: this is why a LiveKit of yours goes with a server, never a laptop. Phone calls then go
through your LiveKit's own SIP. pinecall-runtime setup --livekit here puts the one setup starts
back.
Phone calls#
pinecall-runtime setup --phone
LiveKit's SIP on 5060; open it, and 10000-10019/udp, to your carrier alone. A number is then imported or bought as on any runtime: Phone numbers.
How many calls#
The server runs one worker for the sandbox and one for production, both on this machine and on one
LiveKit. Each worker takes four spoken calls at once, a seat a call. To change it, write each
environment's seats in ~/.pinecall-runtime/local/env and apply them:
# in ~/.pinecall-runtime/local/env
PINECALL_PRODUCTION_MAX_JOBS=12
PINECALL_SANDBOX_MAX_JOBS=4
pinecall-runtime local up
A spoken call was measured at about a third of a core, so size the machine by the seats you give. The seats never grow by themselves. When an environment's worker is full, its overflow answers the next phone caller with one sentence and offers a call back, and a browser call is refused before its room is made, so a page can offer a call back too. Written calls run in the gateway and are not counted against those seats. For fleets that grow with the calls, run the runtime on Kubernetes.
Keep it running#
| update to a new release | uv tool upgrade pinecall-runtime && pinecall-runtime setup |
| follow the logs | pinecall-runtime local logs (or one: local logs gateway) |
| stop it | pinecall-runtime local down (the database is kept) |
| start it again | pinecall-runtime local up |
| start from nothing | pinecall-runtime local down --volumes: the database is deleted, and Caddy's certificates with it, so the next setup asks Let's Encrypt again |
| back the database up | PINECALL_BACKUP_URL=s3://<bucket>/<path> (or gs://…) in ~/.pinecall-runtime/local/env, then pinecall-runtime local up |
| bring a database from another machine | pinecall-runtime local restore <dump> |
Run setup again any time: what is done is skipped, the name, the LiveKit and the phone are kept,
and the schema moves to the new release. The name answers all through an update: the two gateways
are started again one after the other, and a worker ends once the calls it holds have ended.
With no
PINECALL_BACKUP_URLa server keeps no backup: its database is one Docker volume on this machine. With one, the database can be restored to any moment of the last 35 days: The runtime CLI, "A server's backups".
Next steps#
setup, orgs, keys, the fleet.