Skip to content
Merged
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
52d083d
feat: add ddev-tailscale-router add-on documentation for enhanced dev…
atj4me Aug 26, 2025
514b7f8
docs: clarify private and public mode descriptions in ddev-tailscale-…
atj4me Aug 26, 2025
2c80b8f
feat: add author and blog post for ddev-tailscale-router add-on docum…
atj4me Aug 26, 2025
3b2d56e
feat: update author bio to include PHP-based applications and modern …
atj4me Aug 27, 2025
d62a160
fix: add missing newline at end of author bio file
atj4me Aug 27, 2025
8dba949
feat: update documentation for ddev-tailscale-router add-on with clea…
atj4me Aug 27, 2025
a5720ec
fix: improve clarity and consistency in ddev-tailscale-router add-on …
atj4me Aug 27, 2025
1c6a146
feat: add DDEV Tailscale Router flowchart and update blog post with i…
atj4me Aug 27, 2025
0a17fbb
Add AI Attribution
atj4me Aug 27, 2025
58f1c04
fix: update title and improve clarity in Tailscale for DDEV blog post
atj4me Aug 27, 2025
4b23ff0
fix: add exclamation mark for clarity in Tailscale add-on description
atj4me Aug 27, 2025
662b61b
Adding a note that it isn't been tested on MacOS
atj4me Aug 27, 2025
c8e6c19
Addon support added for macos
atj4me Aug 27, 2025
c40e131
Updating the article based on the suggestions
atj4me Sep 3, 2025
da22897
feat: add ddev-tailscale-router add-on documentation for enhanced dev…
atj4me Aug 26, 2025
4788ed8
docs: clarify private and public mode descriptions in ddev-tailscale-…
atj4me Aug 26, 2025
1e2f669
feat: add author and blog post for ddev-tailscale-router add-on docum…
atj4me Aug 26, 2025
5b55bb5
feat: update author bio to include PHP-based applications and modern …
atj4me Aug 27, 2025
db78fd7
fix: add missing newline at end of author bio file
atj4me Aug 27, 2025
c461342
feat: update documentation for ddev-tailscale-router add-on with clea…
atj4me Aug 27, 2025
e7ebe8d
fix: improve clarity and consistency in ddev-tailscale-router add-on …
atj4me Aug 27, 2025
7c4486e
feat: add DDEV Tailscale Router flowchart and update blog post with i…
atj4me Aug 27, 2025
dc6364e
Add AI Attribution
atj4me Aug 27, 2025
68ec269
fix: update title and improve clarity in Tailscale for DDEV blog post
atj4me Aug 27, 2025
5b34d66
fix: add exclamation mark for clarity in Tailscale add-on description
atj4me Aug 27, 2025
27f859b
Adding a note that it isn't been tested on MacOS
atj4me Aug 27, 2025
8b970fe
Addon support added for macos
atj4me Aug 27, 2025
cb6bb9b
Updating the article based on the suggestions
atj4me Sep 3, 2025
d7c8181
Adding Prerequisites section to make things clear
atj4me Sep 4, 2025
7889aa5
Fix Merge Conflicts
atj4me Sep 4, 2025
20405c7
Adding relevant resources
atj4me Sep 4, 2025
358ab1b
Adding section about new commands
atj4me Sep 4, 2025
aa98995
Changing URLs and adding new resources
atj4me Sep 5, 2025
00165dc
Adding a note to mention Tailscale ACL for funnel
atj4me Sep 9, 2025
88ec5d2
Updating the blog to reflect the addon readme changes
atj4me Sep 9, 2025
2f00c7e
Replacing admin panel urls with documentations
atj4me Sep 9, 2025
b835dc2
Fixing typos
atj4me Sep 9, 2025
c0aaaa6
Update pubdate
rfay Sep 9, 2025
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
149 changes: 149 additions & 0 deletions public/img/blog/2025/08/ddev_tailscale_flowchart.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions src/content/authors/ajith-thampi-joseph.md
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.
133 changes: 133 additions & 0 deletions src/content/blog/tailscale-router-ddev-addon.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
---
title: "Tailscale for DDEV: Simple and Secure Project Sharing"
pubDate: 2025-08-26
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`](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.

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!

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.

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.

### Prerequisites

Before installing the add-on, you need to set up Tailscale:

1. **Install Tailscale** on at least two devices (phone, tablet, or computer) by following the [installation guide](https://tailscale.com/download). This is required to generate an auth key.
Copy link
Member

Choose a reason for hiding this comment

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

I tested removing all devices, and it didn't ask me to add more again, so it's really first time setup, that can block people.

2. **Enable HTTPS** by following the [Tailscale HTTPS documentation](https://tailscale.com/kb/1153/enabling-https). This is required for TLS certificate generation.
3. **Generate an auth key** by following the [Tailscale auth keys documentation](https://tailscale.com/kb/1085/auth-keys). Ephemeral, reusable keys are recommended.

### Installation

To get started, follow these steps:

1. First, **set up your auth key** (recommended approach):
Add the auth key to your shell environment:

```bash
echo 'export TS_AUTHKEY=tskey-auth-your-key-here' >> ~/.bashrc
source ~/.bashrc
```

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

Alternatively, you can set it per project (**NOT RECOMMENDED**, because `.ddev/.env.tailscale-router` is not intended to store secrets):

```bash
ddev dotenv set .ddev/.env.tailscale-router --ts-authkey=tskey-auth-your-key-here
```

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

```bash
ddev add-on get atj4me/ddev-tailscale-router
```

3. Finally, **restart DDEV:**
```bash
ddev restart
```

### Using Your Tailscale URL

Once installation is complete, you can access your project using these commands:

Launch your project's Tailscale URL in browser:

```bash
ddev tailscale launch
```

Get your project's Tailscale URL:

```bash
ddev tailscale url
```

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.

### Public vs. Private Mode

The add-on offers two modes for sharing your project:

- **Private (default):** Your project is only accessible to devices on your Tailscale network.
- **Public:** Your project is accessible to anyone on the internet.

To switch between modes:

Switch to public mode (accessible to anyone on the internet):
Copy link
Member

Choose a reason for hiding this comment

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

Since this requires extra config ("For public access", hidden below!), it should be stated here in advance. (You don't have to fix this right now, but it would be nice to fix it later maybe.)

And I haven't found a way to enable funnel, I got lost at this point:

Image


```bash
ddev dotenv set .ddev/.env.tailscale-router --ts-privacy=public
ddev restart
```

Switch back to private mode (default):

```bash
ddev dotenv set .ddev/.env.tailscale-router --ts-privacy=private
ddev restart
```

> **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.
Copy link
Member

Choose a reason for hiding this comment

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

BTW, it is not clear in their documentation where the "Add funnel to policy" button is located.

But I don't think it's our problem to solve.

You have to:

  1. Open https://login.tailscale.com/admin/acls
  2. Click on "JSON editor"
    image
  3. Scroll down in the right sidebar to see "Add Funnel to policy"
    image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They added that UI very recently. It wasn't there in July. I guess they still haven't updated the Readme, since this is still in Beta


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).

### Additional Resources

Here are some additional resources that you might find helpful:

- **[Tailscale](https://tailscale.com/)**: A VPN service that creates a private and secure network between your devices.
- **[Tailscale Download](https://tailscale.com/download)**: Installation guide for Tailscale on various platforms.
- **[Tailscale: Enabling HTTPS](https://tailscale.com/kb/1153/enabling-https)**: Official documentation on enabling HTTPS for TLS certificate generation.
- **[Tailscale Auth Keys](https://tailscale.com/kb/1085/auth-keys)**: Detailed information about creating and managing auth keys.
- **[Tailscale Funnel](https://tailscale.com/kb/1223/funnel)**: Documentation on enabling public access to your Tailscale services.
- **[Tailscale DNS](https://tailscale.com/kb/1054/dns)**: DNS in Tailscale
- **[DDEV dotenv](https://ddev.readthedocs.io/en/latest/users/usage/commands/#dotenv)**: Documentation on managing environment variables with DDEV.
- **[DDEV Docs: Sharing](https://ddev.readthedocs.io/en/latest/users/usage/sharing/)**: The official DDEV documentation on how to share your projects.
- **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.
- **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.

---

_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._