Exposing DDEV projects to a Tailnet
I am now mainly working on a remote development server setup with Herdr, mise and Tailscale, with Zed as my main editor with its remote development features.
Most of our projects run with DDEV and I wanted to be able to run them on my development server and expose them to my Tailnet for private access. I first tried ddev-tailscale-router, but it is a per-project DDEV addon which is too complex to maintain and setup.
I instead explored the idead of adding one proxy in front of DDEV: it would discover running projects, assign stable ports, and exposes them through the server's Tailnet hostname.
After a few iterations with Claude, i ended up with a stable enough solution to share it publicly: ddev-tailnet-proxy is available for testing.
Try it now
mise use -g github:titouanmathis/[email protected]
sudo "$(mise which ddev-tailnet-proxy)" service install
The service refreshes every two minutes. It adds new running projects and removes stopped ones from the active proxy configuration.
$ ddev-tailnet-proxy status
Node DNS: server.some-name.ts.net
PROJECT PORT URL
foehn-demo 19009 https://server.some-name.ts.net:19009/
Disclaimer
I use it with simple DDEV projects and it works fine, but I haven't tried it with more advanced DDEV network configurations.