Answer: Run the Agent SDK under Node 22.13 or newer (never Bun), serve agents with `agent-sdk serve` bound to 127.0.0.1, and keep the bearer token unless a proxy authenticates every caller. Before exposing the host, put TLS or an authenticating proxy in front, keep `--state-root` on a backed-up persistent volume outside the repository, and enable schedules in only one process per project. Status: Confirmed Entry: tool/cursor/permissions-and-security/self-host-securely Revision: 1 Digest: sha256:2fcd4463476de02c (changes whenever the content changes) Timeline: Created: 2026-11-13T03:08:26Z Last changed: 2026-11-13T03:08:26Z Last verified: 2026-11-20T12:32:37Z Next check: 2026-11-21T12:32:37Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Node version | 22.13 | [1] | 2026-11-20 Bind host | 127.0.0.1 | [1] | 2026-11-20 Port | 3000 | [1] | 2026-11-20 State root | /var/lib/agent-sdk | [1] | 2026-11-20 Bearer token generation | openssl rand -hex 32 | [1] | 2026-11-20 Container host | 0.0.0.0 | [1] | 2026-11-20 TLS/proxy requirement | Put TLS or an authenticating proxy in front of the server. | [1] | 2026-11-20 Schedules rule | Turn on schedules in only one process per project. | [1] | 2026-11-20 Sources: [1] Anysphere. "cursor.com/docs/agent-sdk/deployment.md". https://cursor.com/docs/agent-sdk/deployment.md Role: primary. Accessed: 2026-11-20T12:32:37Z Quote: "Run Agent SDK under Node 22.13 or newer, never Bun." (Supports: Node version) Quote: "--host 127.0.0.1" (Supports: Bind host) Quote: "--port 3000" (Supports: Port) Quote: "--state-root /var/lib/agent-sdk" (Supports: State root) Quote: "export AGENT_SDK_BEARER_TOKEN="$(openssl rand -hex 32)"" (Supports: Bearer token generation) Quote: "In a container, use `--host 0.0.0.0` behind an authenticating network" (Supports: Container host) Quote: "Put TLS or an authenticating proxy in front of the server." (Supports: TLS/proxy requirement) Quote: "Turn on schedules in only one process per project." (Supports: Schedules rule) Snapshot SHA-256: 6449cddd4ec0b82f524c68cc6842b18bd19b9444433b57550bfab2074ef729b7 (captured 2026-11-13T03:08:25Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T03:08:26Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:32:37Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:32:37Z Last attempt: 2026-11-20T12:32:37Z Notes and limitations: Extracted automatically from a single official source (section "Self-host securely"). Related: https://latestn.com/tool/cursor/permissions-and-security/separate-callers-cloud-agents How do I keep callers' Cursor cloud agents separate when they share a bearer token? https://latestn.com/tool/cursor/permissions-and-security/shared-responsibility-controls Which security controls does Cursor handle versus which do I configure myself? https://latestn.com/tool/cursor/permissions-and-security/shell-command-permissions How do I allow or deny shell commands in Cursor CLI using Shell permission tokens? https://latestn.com/tool/cursor/permissions-and-security/revoke-user-token How do I revoke an installation user token in Cursor Origin? https://latestn.com/tool/cursor/permissions-and-security/rotate-service-account-api-key How do I rotate an API key for a Cursor service account? https://latestn.com/tool/cursor/permissions-and-security/security-model-differences What are the security model differences between Cursor-hosted and self-hosted Cloud Agents? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:08:26Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/cursor/permissions-and-security/self-host-securely/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/cursor/permissions-and-security/self-host-securely POST: https://latestn.com/dispute/tool/cursor/permissions-and-security/self-host-securely with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/cursor/permissions-and-security/self-host-securely?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I self-host a Cursor Agent SDK deployment securely? Revision 1, last verified 2026-11-20T12:32:37Z. https://latestn.com/tool/cursor/permissions-and-security/self-host-securely (accessed 2026-11-21T09:58:40Z). @misc{LatestN_tool_cursor_permissions_and_security_self_host_securely_r1, title = {How do I self-host a Cursor Agent SDK deployment securely?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/cursor/permissions-and-security/self-host-securely}}, note = {Revision 1; digest sha256:2fcd4463476de02c; last verified 2026-11-20T12:32:37Z; accessed 2026-11-21T09:58:40Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/cursor/permissions-and-security/self-host-securely