Skip to content

Commit 382d303

Browse files
atj4mestasadev
andauthored
Update Tailscale blog post for v3.0.0 add-on changes (#451)
Co-authored-by: Stanislav Zhuk <stasadev@gmail.com>
1 parent f4f14cd commit 382d303

File tree

1 file changed

+50
-18
lines changed

1 file changed

+50
-18
lines changed

src/content/blog/tailscale-router-ddev-addon.md

Lines changed: 50 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
22
title: "Tailscale for DDEV: Simple and Secure Project Sharing"
33
pubDate: 2025-09-09
4-
modifiedDate: 2025-10-09
4+
modifiedDate: 2025-10-20
5+
modifiedComment: "Updated for v3.0.0!"
56
summary: "Tired of temporary sharing links? Learn how to use the ddev-tailscale-router add-on to get a stable, secure, and private URL for your DDEV projects."
67
author: Ajith Thampi Joseph
78
featureImage:
@@ -14,9 +15,9 @@ categories:
1415
- TechNotes
1516
---
1617

17-
I've found that DDEV's [`ddev share`](https://docs.ddev.com/en/stable/users/topics/sharing/) command is a great way to quickly share my local development environment. However, since it uses ngrok, it generates a new, random URL every time unless you use a [stable domain](https://docs.ddev.com/en/stable/users/topics/sharing/#setting-up-a-stable-ngrok-domain). As an alternative, I've created the [`ddev-tailscale-router`](https://github.com/atj4me/ddev-tailscale-router) add-on.
18+
I've found that DDEV's [`ddev share`](https://docs.ddev.com/en/stable/users/topics/sharing/) command is a great way to quickly share my local development environment. However, since it uses ngrok, it requires ngrok to be installed on the host system and generates a new, random URL every time unless you use a [stable domain](https://docs.ddev.com/en/stable/users/topics/sharing/#setting-up-a-stable-ngrok-domain). As an alternative, I've created the [`ddev-tailscale-router`](https://github.com/atj4me/ddev-tailscale-router) add-on.
1819

19-
This add-on uses [Tailscale](https://tailscale.com/), a VPN service that creates a private and secure network between your devices. It is free for personal use!
20+
This add-on uses [Tailscale](https://tailscale.com/), a VPN service that creates a private and secure network between your devices. It is free for personal use and doesn't require any additional software to be installed on your host system!
2021

2122
As a result, you get a stable, human-readable URL for each of your DDEV projects, which you can access from any device on your Tailscale network.
2223

@@ -28,7 +29,9 @@ I've found this approach to be particularly useful for:
2829

2930
### How it Works
3031

31-
The `ddev-tailscale-router` add-on works by running a Tailscale container alongside your DDEV project. This container automatically connects to your Tailscale network and securely proxies requests to your project's web container.
32+
The `ddev-tailscale-router` add-on works by installing Tailscale directly into your DDEV project's web container using userspace networking. This approach provides better macOS compatibility and improved reliability compared to running a separate container. The add-on automatically connects to your Tailscale network and securely proxies requests to your project.
33+
34+
> **Update:** Version 3.0.0 brought significant architectural improvements! The add-on now uses YAML-based configuration, improved command structure, and better error handling. If you're upgrading from an earlier version, see the [migration instructions](https://github.com/atj4me/ddev-tailscale-router/releases/tag/v3.0.0) in the release notes.
3235
3336
### Prerequisites
3437

@@ -52,11 +55,7 @@ To get started, follow these steps:
5255

5356
Replace `~/.bashrc` with `~/.zshrc` if you use Zsh, or your relevant shell configuration file.
5457

55-
Alternatively, you can set it per project (**NOT RECOMMENDED**, because `.ddev/.env.tailscale-router` is not intended to store secrets):
56-
57-
```bash
58-
ddev dotenv set .ddev/.env.tailscale-router --ts-authkey=tskey-auth-your-key-here
59-
```
58+
Alternatively, you can use interactive authentication after installation by running `ddev tailscale login` after your project starts.
6059

6160
2. Next, **install the add-on:**
6261

@@ -71,7 +70,13 @@ To get started, follow these steps:
7170

7271
### Using Your Tailscale URL
7372

74-
Once installation is complete, you can access your project using these commands:
73+
Once installation is complete, you need to start sharing your project:
74+
75+
Start sharing your project:
76+
77+
```bash
78+
ddev tailscale share
79+
```
7580

7681
Launch your project's Tailscale URL in browser:
7782
@@ -87,6 +92,8 @@ ddev tailscale url
8792

8893
Your project's permanent Tailscale URL will look like: `https://<project-name>.<your-tailnet>.ts.net`. You can also find it in your Tailscale admin console.
8994
95+
To see all available commands and options, run `ddev tailscale help`. This will show you both the DDEV-specific shortcuts and all native Tailscale CLI commands that you can use.
96+
9097
### Public vs. Private Mode
9198
9299
The add-on offers two modes for sharing your project:
@@ -96,23 +103,46 @@ The add-on offers two modes for sharing your project:
96103
97104
To switch between modes:
98105
99-
Switch to public mode (accessible to anyone on the internet):
106+
Share publicly (accessible to anyone on the internet):
107+
108+
```bash
109+
ddev tailscale share --public
110+
```
111+
112+
Share privately (default, only accessible to your Tailscale devices):
100113
101114
```bash
102-
ddev dotenv set .ddev/.env.tailscale-router --ts-privacy=public
103-
ddev restart
115+
ddev tailscale share
104116
```
105117
106-
Switch back to private mode (default):
118+
Stop sharing:
107119
108120
```bash
109-
ddev dotenv set .ddev/.env.tailscale-router --ts-privacy=private
110-
ddev restart
121+
ddev tailscale stop
111122
```
112123
113124
> **Note:** For public access, you need to configure your [Access Control List (ACL)](https://tailscale.com/kb/1223/funnel#funnel-node-attribute) to enable Funnel. See the [Tailscale Funnel documentation](https://tailscale.com/kb/1223/funnel) for details on setting up the required ACL policy.
114125
115-
I hope this add-on helps streamline your development workflow! If you run into any issues or have suggestions for improvements, feel free to open an issue on the [GitHub repository](https://github.com/atj4me/ddev-tailscale-router/issues).
126+
### Uninstalling the Add-on
127+
128+
If you need to remove the add-on from your project:
129+
130+
1. **Stop any active sharing:**
131+
132+
```bash
133+
ddev tailscale stop
134+
```
135+
136+
2. **Remove the add-on:**
137+
138+
```bash
139+
ddev add-on remove tailscale-router
140+
```
141+
142+
3. **Restart DDEV:**
143+
```bash
144+
ddev restart
145+
```
116146
117147
### Additional Resources
118148
@@ -129,6 +159,8 @@ Here are some additional resources that you might find helpful:
129159
- **Medium: [My Journey with PHP Dev Environments](https://medium.com/@josephajithampi/my-journey-with-php-dev-environments-1da9f2806ee9)**: A blog post on setting up a PHP development environment.
130160
- **LinkedIn: [The Day My Development Environment Nearly Broke Me](https://www.linkedin.com/pulse/day-my-development-environment-nearly-broke-me-how-i-thampi-joseph-ildhc/)**: An article on the importance of a reliable development environment.
131161
162+
I hope this add-on helps streamline your development workflow! If you run into any issues or have suggestions for improvements, feel free to open an issue on the [GitHub repository](https://github.com/atj4me/ddev-tailscale-router/issues).
163+
132164
---
133165
134-
_This blog post was written with the assistance of Amazon Q and Google Gemini. I used them to help simplify the language, improve the flow, and proofread the text._
166+
_This blog post was updated with the assistance of GitHub Copilot (Claude). I used it to help update the content based on the latest add-on changes, improve accuracy, and maintain consistency. The original version was written with assistance from Amazon Q and Google Gemini._

0 commit comments

Comments
 (0)