From 295292cfba42576049448ee9e4a285931f310c36 Mon Sep 17 00:00:00 2001 From: Ajith Thampi Date: Mon, 20 Oct 2025 17:07:33 +0000 Subject: [PATCH 1/2] Update Tailscale add-on documentation for v3.0.0, including new features and installation instructions --- .../blog/tailscale-router-ddev-addon.md | 69 ++++++++++++++----- 1 file changed, 50 insertions(+), 19 deletions(-) diff --git a/src/content/blog/tailscale-router-ddev-addon.md b/src/content/blog/tailscale-router-ddev-addon.md index cb0cf440..73a41091 100644 --- a/src/content/blog/tailscale-router-ddev-addon.md +++ b/src/content/blog/tailscale-router-ddev-addon.md @@ -1,8 +1,8 @@ --- title: "Tailscale for DDEV: Simple and Secure Project Sharing" pubDate: 2025-09-09 -modifiedDate: 2025-10-09 -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." +modifiedDate: 2025-10-20 +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. Updated for v3.0.0!" author: Ajith Thampi Joseph featureImage: src: /img/blog/2025/08/ddev_tailscale_flowchart.svg @@ -14,9 +14,9 @@ categories: - 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. +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. -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! +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! 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. @@ -28,7 +28,9 @@ I've found this approach to be particularly useful for: ### 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. +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. + +> **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. ### Prerequisites @@ -52,11 +54,7 @@ To get started, follow these steps: 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 - ``` + Alternatively, you can use interactive authentication after installation by running `ddev tailscale login` after your project starts. 2. Next, **install the add-on:** @@ -71,7 +69,13 @@ To get started, follow these steps: ### Using Your Tailscale URL -Once installation is complete, you can access your project using these commands: +Once installation is complete, you need to start sharing your project: + +Start sharing your project: + +```bash +ddev tailscale share +``` Launch your project's Tailscale URL in browser: @@ -87,6 +91,8 @@ ddev tailscale url Your project's permanent Tailscale URL will look like: `https://..ts.net`. You can also find it in your Tailscale admin console. +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. + ### Public vs. Private Mode The add-on offers two modes for sharing your project: @@ -96,23 +102,46 @@ The add-on offers two modes for sharing your project: To switch between modes: -Switch to public mode (accessible to anyone on the internet): +Share publicly (accessible to anyone on the internet): + +```bash +ddev tailscale share --public +``` + +Share privately (default, only accessible to your Tailscale devices): ```bash -ddev dotenv set .ddev/.env.tailscale-router --ts-privacy=public -ddev restart +ddev tailscale share ``` -Switch back to private mode (default): +Stop sharing: ```bash -ddev dotenv set .ddev/.env.tailscale-router --ts-privacy=private -ddev restart +ddev tailscale stop ``` > **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. -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). +### Uninstalling the Add-on + +If you need to remove the add-on from your project: + +1. **Stop any active sharing:** + + ```bash + ddev tailscale stop + ``` + +2. **Remove the add-on:** + + ```bash + ddev add-on remove tailscale-router + ``` + +3. **Restart DDEV:** + ```bash + ddev restart + ``` ### Additional Resources @@ -129,6 +158,8 @@ Here are some additional resources that you might find helpful: - **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. +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). + --- -_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._ +_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._ From a62dad4170ea5646332da5ecfd5c639fd92d83a8 Mon Sep 17 00:00:00 2001 From: Ajith Thampi Joseph Date: Mon, 20 Oct 2025 15:02:29 -0400 Subject: [PATCH 2/2] Update src/content/blog/tailscale-router-ddev-addon.md Co-authored-by: Stanislav Zhuk --- src/content/blog/tailscale-router-ddev-addon.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/content/blog/tailscale-router-ddev-addon.md b/src/content/blog/tailscale-router-ddev-addon.md index 73a41091..5643c394 100644 --- a/src/content/blog/tailscale-router-ddev-addon.md +++ b/src/content/blog/tailscale-router-ddev-addon.md @@ -2,7 +2,8 @@ title: "Tailscale for DDEV: Simple and Secure Project Sharing" pubDate: 2025-09-09 modifiedDate: 2025-10-20 -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. Updated for v3.0.0!" +modifiedComment: "Updated for v3.0.0!" +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