Skip to content
This repository was archived by the owner on Aug 18, 2025. It is now read-only.

Commit 7da3386

Browse files
authored
feat: add TUN device documentation (#843)
1 parent cf01c94 commit 7da3386

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
title: TUN device enablement
3+
description: Learn how to enable TUN devices for VPN usage within Coder.
4+
state: alpha
5+
---
6+
7+
By default, Coder workspaces do not contain a TUN device, making it difficult to
8+
run a VPN. However, Coder offers an admin configuration setting that, when
9+
enabled, automatically creates a TUN device within all Kubernetes [CVM-enabled
10+
workspaces](cvms/index.md).
11+
12+
> At this time, Coder does not support TUN devices for other workspace types
13+
> (such as EC2 or Docker).
14+
>
15+
> If you're working with EC2 workspaces, we recommend enabling privileged mode
16+
> in the workspace provider settings, which will allow users to create their own
17+
> TUN device.
18+
19+
## Enable TUN devices in Coder
20+
21+
To enable TUN devices for Kubernetes [CVM-enabled workspaces](cvms/index.md):
22+
23+
1. Log into Coder, and go to **Manage** > **Admin**.
24+
1. On the **Infrastructure** page, scroll down to the **Workspace container
25+
runtime** section.
26+
1. Under **Enable TUN device**, click the toggle to switch this feature **On**.
27+
1. Click **Save workspaces**.
28+
29+
![Enabling TUN devices](../../assets/admin/tun.png)
30+
31+
The new setting will apply to workspaces **after** you rebuild them.
32+
33+
Users running workspaces with TUN devices should be able to run VPN clients
34+
within their workspace as long as they have root (or `sudo`) access within their
35+
workspace.
36+
37+
> We've tested this feature using the [Tailscale](https://tailscale.com/) VPN
38+
> within Coder.

assets/admin/tun.png

17.9 KB
Loading

manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,9 @@
297297
{
298298
"path": "./admin/workspace-management/ssh-access.md"
299299
},
300+
{
301+
"path": "./admin/workspace-management/tun-device.md"
302+
},
300303
{
301304
"path": "./admin/workspace-management/process-logging.md"
302305
}

0 commit comments

Comments
 (0)