-
-
Notifications
You must be signed in to change notification settings - Fork 35
blog: Tailscale for DDEV: Simple and Secure Project Sharing #423
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
Changes from 9 commits
52d083d
514b7f8
2c80b8f
3b2d56e
d62a160
8dba949
a5720ec
1c6a146
0a17fbb
58f1c04
4b23ff0
662b61b
c8e6c19
c40e131
da22897
4788ed8
1e2f669
5b55bb5
db78fd7
c461342
e7ebe8d
7c4486e
dc6364e
68ec269
5b34d66
27f859b
8b970fe
cb6bb9b
d7c8181
7889aa5
20405c7
358ab1b
aa98995
00165dc
88ec5d2
2f00c7e
b835dc2
c0aaaa6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| name: Ajith Thampi Joseph | ||
| firstName: Ajith | ||
| avatarUrl: https://gravatar.com/avatar/3381b988b59552300f08ff9f6d8918f2?s=128 | ||
| --- | ||
|
|
||
| [Ajith](https://www.linkedin.com/in/thampiajit) is a Software Engineer specializing in PHP-based applications (WordPress, Drupal, Laravel) and modern frontend technologies (React, TypeScript). He has extensive experience with Linux web servers, Docker, CI/CD pipelines, and DevOps practices across multiple Git platforms. His work focuses on creating developer tools that eliminate workflow friction and improve team collaboration efficiency. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| --- | ||
| title: "A Simple and Secure Way to Share Your DDEV Projects with Tailscale" | ||
atj4me marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| pubDate: 2025-08-26 | ||
rfay marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 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." | ||
| author: Ajith Thampi Joseph | ||
| featureImage: | ||
| src: /img/blog/2025/08/ddev_tailscale_flowchart.svg | ||
| alt: "DDEV Tailscale Router Cover Image" | ||
| caption: "The ddev-tailscale-router add-on enables cross-device testing, stable webhook URLs, and team collaboration." | ||
| credit: "Image by Claude AI :)" | ||
| categories: | ||
| - Guides | ||
| - TechNotes | ||
| --- | ||
|
|
||
| I've found that DDEV's `ddev share` 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, which can be a hassle. For a more permanent and secure solution, I've created the `ddev-tailscale-router` add-on. | ||
atj4me marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| This add-on uses Tailscale, a service that creates a private and secure network between your devices. 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. | ||
atj4me marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| I've found this approach to be particularly useful for: | ||
|
|
||
| - **Cross-device testing:** I can easily test my sites on my phone or tablet without being on the same Wi-Fi network. | ||
| - **Stable webhook URLs:** I can use the permanent Tailscale URL as a reliable endpoint for webhooks, such as those from payment gateways. | ||
| - **Team collaboration:** I can share my development environment with team members so they can see my work in progress. | ||
|
|
||
| ### How it Works | ||
|
|
||
| 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. | ||
|
|
||
| ### Installation | ||
|
|
||
| To get started, follow these steps: | ||
atj4me marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| 1. First, install the add-on: | ||
| ```bash | ||
| ddev add-on get atj4me/ddev-tailscale-router | ||
| ``` | ||
atj4me marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 2. Next, get a Tailscale auth key from the [Tailscale admin console](https://login.tailscale.com/admin/settings/keys). | ||
|
||
| 3. Then, configure the auth key in your DDEV project: | ||
| ```bash | ||
| ddev dotenv set .ddev/.env.tailscale-router --ts-authkey=tskey-auth-your-key-here | ||
| ``` | ||
| 4. Finally, restart your DDEV project: | ||
| ```bash | ||
| ddev restart | ||
| ``` | ||
|
|
||
| After restarting, you can find your project's permanent Tailscale URL in the [Tailscale admin console](https://login.tailscale.com/admin/machines). It will look something like this: `http://<project-name>.<your-tailnet>.ts.net`. | ||
|
|
||
| ### Public vs. Private Mode | ||
|
|
||
| The add-on offers two modes for sharing your project: | ||
|
|
||
| - **Private (default):** In this mode, your project is only accessible to devices on your Tailscale network. | ||
| - **Public:** Alternatively, you can make your project accessible to anyone on the internet. | ||
|
|
||
| To switch between modes, you can set the `ts-privacy` variable in your `.ddev/.env.tailscale-router` file: | ||
|
|
||
| ```bash | ||
| # Switch to private mode | ||
| ddev dotenv set .ddev/.env.tailscale-router --ts-privacy=private | ||
| ddev restart | ||
|
|
||
| # Switch to public mode | ||
| ddev dotenv set .ddev/.env.tailscale-router --ts-privacy=public | ||
| ddev restart | ||
| ``` | ||
|
|
||
| If you have any questions or problems, please file an issue in the [GitHub repository](https://github.com/atj4me/ddev-tailscale-router/issues). | ||
|
||
|
|
||
| --- | ||
|
|
||
| _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._ | ||


Uh oh!
There was an error while loading. Please reload this page.