# Deployment overview

> Where a pipedog voice agent can run in production, and which transport each host allows.

Source: https://polvallverdu.github.io/pipedog/docs/deployment/



A voice agent is a long-lived session: it holds a pipeline, a conversation and a connection for the
whole call. That shapes where it can run. The transport decides most of it:

* **SmallWebRTC** sends media over UDP. It needs a long-lived server process with UDP reachable:
  Bun, Node or Deno on a VM, a container or a bare-metal host.
* **WebSocket** sends audio frames over TCP. It runs on the same servers, and also on Cloudflare
  Workers and Durable Objects, and on Vercel's Bun runtime.
* **Cloudflare Realtime** lets users connect over WebRTC to Cloudflare's SFU, which streams their
  audio to the bot as PCM over WebSockets. The bot can then run in a Worker or Durable Object (see
  [Cloudflare Realtime](https://polvallverdu.github.io/pipedog/docs/transports/cloudflare-realtime.md)).

| Host                                    | Runtime         | SmallWebRTC                                                                                   | WebSocket | Page                                                                       |
| --------------------------------------- | --------------- | --------------------------------------------------------------------------------------------- | --------- | -------------------------------------------------------------------------- |
| VM, container, bare metal               | Bun, Node, Deno | Yes                                                                                           | Yes       | [Servers](https://polvallverdu.github.io/pipedog/docs/deployment/servers.md), [Bundling](https://polvallverdu.github.io/pipedog/docs/deployment/bundling.md) |
| Cloudflare Workers + Durable Objects    | workerd         | No (no UDP); WebRTC users through [Cloudflare Realtime](https://polvallverdu.github.io/pipedog/docs/transports/cloudflare-realtime.md) | Yes       | [Cloudflare Workers](https://polvallverdu.github.io/pipedog/docs/deployment/cloudflare-workers.md)                  |
| Vercel Functions                        | Bun runtime     | No (no UDP)                                                                                   | Yes       | [Vercel](https://polvallverdu.github.io/pipedog/docs/deployment/vercel.md)                                          |
| Serverless functions without WebSockets | any             | No                                                                                            | No        | Signalling only                                                            |

On a server, [`@pipedog/runner`](https://polvallverdu.github.io/pipedog/docs/runner.md) gives you Pipecat's runner routes (the prebuilt
client, WebRTC signalling, telephony webhooks and WebSockets) as one fetch handler:
`createRunnerApp()` builds it and `serve()` listens on Bun, Node or Deno. See
[Servers](https://polvallverdu.github.io/pipedog/docs/deployment/servers/#the-development-runner).

Pipecat's own deployment guides (Fly.io, Cerebrium, Modal, Pipecat Cloud) assume a Python process
per session. The same patterns apply to a pipedog server: one process (or one Durable Object) per
session, and a cap on concurrent sessions.

## Before you deploy [#before-you-deploy]

* **Authenticate the endpoints.** pipedog's endpoints don't authenticate. Put a check in front of
  them, as in [Frameworks: Authentication](https://polvallverdu.github.io/pipedog/docs/frameworks/#authentication).
* **Provider keys stay on the server.** Services read their keys from options you pass; read them
  from the environment or the host's secret store, never from the client.
* **Turn detection and size.** Local Silero VAD and Smart Turn load ONNX models (about 100 MB of
  runtime and models). On Workers, use provider-side turn detection instead. See
  [Turn detection](https://polvallverdu.github.io/pipedog/docs/concepts/turn-detection.md).
* **Tracing.** Set `OTEL_EXPORTER_OTLP_ENDPOINT` to export spans. See
  [Metrics & tracing](https://polvallverdu.github.io/pipedog/docs/concepts/metrics-and-tracing.md).
* **Runtimes.** The [compatibility table](https://polvallverdu.github.io/pipedog/docs/guides/runtimes.md) lists where each package is
  verified.

<Cards>
  <Card title="Servers" href="/docs/deployment/servers">
    Bun, Node or Deno, with SmallWebRTC and WebSocket.
  </Card>

  <Card title="Cloudflare Workers" href="/docs/deployment/cloudflare-workers">
    One Durable Object per session, over WebSocket.
  </Card>

  <Card title="Fully on Cloudflare" href="/docs/deployment/cloudflare-workers-ai">
    Flux, a Workers AI LLM and Aura, with the agent in a Durable Object.
  </Card>

  <Card title="Vercel" href="/docs/deployment/vercel">
    WebSocket sessions on Vercel Functions with the Bun runtime.
  </Card>
</Cards>
