8000 chore(docs): add requirements re ports and stun server to docs by johnstcn · Pull Request #12026 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

chore(docs): add requirements re ports and stun server to docs #12026

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Feb 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions docs/networking/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,37 @@ user <-> workspace connections are end-to-end encrypted.

[Tailscale's open source](https://tailscale.com) backs our networking logic.

## Requirements

In order for clients and workspaces to be able to connect:

- All clients and agents must be able to establish a connection to the Coder
server (`CODER_ACCESS_URL`) over HTTPS (`tcp/443`).
- Any reverse proxy or ingress between the Coder control plane and clients must
support WebSockets.

In order for clients to be able to establish direct connections:

> **Note:** Direct connections via the web browser are not supported. To improve
> latency for browser-based applications running inside Coder workspaces,
> consider deploying one or more
> [workspace proxies](../admin/workspace-proxies.md).

- The client is connecting using the CLI (e.g. `coder ssh` or
`coder port-forward`).
- The client and workspace agent are both able to connect to a specific STUN
server.
> The STUN server needs to tell the client and workspace their respective
> `address:port` pairs from its perspective so that they can establish a
> direct connection with each other. If the client and agent are only able to
> connect to STUN servers on different networks, then a direct connection will
> not be possible. For an in-depth technical explanation, see
> [How NAT traversal works (tailscale.com)](https://tailscale.com/blog/how-nat-traversal-works).
- Outbound UDP traffic must be allowed for both the client and the agent from
source ports `udp/3478` and `udp/41641` to all destination ports.
> For more detailed information, see
> [What firewall ports should I open to use Tailscale? (tailscale.com)](https://tailscale.com/kb/1082/firewall-ports).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should probably be some details about NATs and stuff but I really don't know what to write without getting super technical :/

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly I'd prefer to just link to Tailscale's docs on this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IDK how well Tailscale's docs cut it, this one doesn't really explain much about NAT just about firewalls.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I link to https://tailscale.com/blog/how-nat-traversal-works a bit above in the STUN section.

8000

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good blog post but it's not very good documentation since it's 9000 words long. We should probably dumb it down

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I added a fairly high-level overview.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've Slack'd you some diagrams. If we're going to explain it, then those are my suggested examples.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added and moved to a separate page as this one is getting plenty big already.

## coder server

Workspaces connect to the coder server via the server's external address, set
Expand Down
0