Skip to content

docs: add guide for self-hosting a STUN server - #31802

Closed
coder[bot] wants to merge 1 commit into
mainfrom
superblink/docs-310-self-hosted-stun
Closed

coder[bot] wants to merge 1 commit into
mainfrom
superblink/docs-310-self-hosted-stun

Conversation

@coder

@coder coder Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Adds a how-to guide for self-hosting a STUN server with coturn (recommended) or Tailscale's stund, and pointing CODER_DERP_SERVER_STUN_ADDRESSES at it. The guide is linked from the STUN and NAT page, the networking overview, and the air-gapped comparison table.

Refs #16537, DOCS-310

Verification

  • Each install path was run on an Ubuntu 24.04 VM and checked with coder netcheck against a v2.39.0 deployment configured with only self-hosted STUN servers: the coturn 4.6 package under systemd with the documented config, the coturn/coturn:4.18.0 container with a published UDP port, and stund built with Go under the documented systemd unit. Hostname and IP entries in CODER_DERP_SERVER_STUN_ADDRESSES both worked.
  • A client on a separate home NAT network got p2p connections from coder ping, and the STUN servers logged requests from both the client and the agent. With the STUN servers stopped, connections fell back to DERP and coder ping printed the "could not connect to STUN over UDP" hints. Running workspaces picked up the new STUN list without a restart.
  • Source-verified only: the setting is ignored when the built-in relay is disabled (cli/server.go passes a nil region to tailnet.NewDERPMap), and each address becomes its own STUN-only region (tailnet.STUNRegions), which backs the "at least 2 servers" advice.
  • Not tested: Kubernetes or ingress setups. The VM-only guidance follows Spike's comment on docs: Self hosting a STUN server #16537.

Paraphrased identifiers

stund replied only to binding requests that carry a FINGERPRINT attribute (it counted plain RFC 5389 requests as not_stun). The page describes this as ignoring requests from generic STUN test tools.

Vale's remaining AbbreviationFirstUse warning is on the front matter title, the same as on stun.md. The doc-check skill wasn't run; the page was self-reviewed against the docs style guide and passes markdownlint, lint/emdash, lint/docs-manifest, and lint/docs-html.

Adds a how-to for running coturn or Tailscale's stund as a self-hosted STUN server and pointing CODER_DERP_SERVER_STUN_ADDRESSES at it, and links it from the STUN, networking, and air-gapped pages.
@linear-code

linear-code Bot commented Nov 5, 2026

Copy link
Copy Markdown

DOCS-310

@github-actions github-actions Bot added the community Pull Requests and issues created by the community. label Nov 5, 2026
@coder
coder Bot requested review from matifali and spikecurtis November 5, 2026 19:57
@matifali
matifali requested a review from jtslear November 7, 2026 12:29
@spikecurtis

Copy link
Copy Markdown
Collaborator

@nickvigilante if this is your PR it needs to come through your own user account in GitHub.

@spikecurtis
spikecurtis temporarily deployed to main November 10, 2026 09:37 — with GitHub Actions Inactive
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 10, 2026
@nickvigilante
nickvigilante temporarily deployed to main November 10, 2026 16:07 — with GitHub Actions Inactive
@nickvigilante
nickvigilante temporarily deployed to main November 10, 2026 16:07 — with GitHub Actions Inactive
@nickvigilante
nickvigilante temporarily deployed to main November 10, 2026 16:07 — with GitHub Actions Inactive
@nickvigilante
nickvigilante temporarily deployed to main November 10, 2026 16:10 — with GitHub Actions Inactive

This branch was previously deployed

1 inactive deployment
main — 8026b8f5 Deployed Nov 10, 2026 by nickvigilante via cla #253519
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

community Pull Requests and issues created by the community.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants