You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/blog/share-providers.md
+52-19Lines changed: 52 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
-
title: "New `ddev share` Provider System Brings Free Sharing Options"
3
-
pubDate: 2026-01-22
4
-
summary: "DDEV v1.25.0 introduces a flexible provider system for `ddev share`, bringing free Cloudflare tunnel support, automation capabilities, and extensibility for custom sharing solutions."
2
+
title: "New `ddev share` Provider System: Cloudflare tunnel with no login or token"
3
+
pubDate: 2026-02-10
4
+
summary: "DDEV v1.25.0 introduces a flexible provider system for `ddev share`, adding free Cloudflare tunnel support, automation capabilities, and extensibility for custom sharing solutions."
5
5
author: Randy Fay
6
6
#featureImage:
7
7
# src: /img/blog/2026/01/ddev-share-providers.png
@@ -12,65 +12,98 @@ categories:
12
12
- DevOps
13
13
---
14
14
15
-
Sharing your local development environment with clients, colleagues, or testing services has always been a valuable DDEV feature. DDEV v1.25.0 makes this easier and more flexible than ever with a complete redesign of `ddev share`. The biggest news? You can now share your projects for free using Cloudflare Tunnel—no account signup or token setup required.
15
+
Sharing your local development environment with clients, colleagues, or testing services has always been a valuable DDEV feature. DDEV v1.25.0 makes this easier and more flexible than ever with a complete redesign of `ddev share`. The biggest news is that you can now share your projects for free using Cloudflare Tunnel—no account signup or token setup required.
16
16
17
17
## What Changed in `ddev share`
18
18
19
19
Previous versions of DDEV relied exclusively on ngrok for sharing. While ngrok remains a solid choice with advanced features, v1.25.0 introduces a modular provider system that gives you options. DDEV now ships with two built-in providers:
20
20
21
-
-**ngrok**: The traditional option (requires account and authtoken)
21
+
-**ngrok**: The traditional option (requires free account and authtoken)
22
22
-**cloudflared**: A new, cost-free option using Cloudflare Tunnel (requires no account or token)
23
23
24
-
You can select providers via command flags, project configuration, or global defaults—whichever fits your workflow. Existing projects using ngrok continue working unchanged; ngrok remains the default provider.
24
+
You can select providers via command flags, project configuration, or global defaults. Existing projects using ngrok continue working unchanged, and ngrok remains the default provider.
25
25
26
26
## Free Sharing with Cloudflare Tunnel
27
27
28
-
Cloudflare Tunnel provides production-grade infrastructure for sharing your local environments at zero cost. After [installing the client](https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/do-more-with-tunnels/local-management/create-local-tunnel/), getting started is as simple as:
28
+
Cloudflare Tunnel provides production-grade infrastructure for sharing your local environments at zero cost. After [installing the `cloudflared`client](https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/do-more-with-tunnels/local-management/create-local-tunnel/), getting started is:
29
29
30
30
```bash
31
-
ddev share -providercloudflared
31
+
ddev share --provider=cloudflared
32
32
```
33
33
34
34
No account creation, no authentication setup, no subscription tiers—just immediate access to share your work. This removes barriers for individual developers and teams who need occasional sharing without the overhead of managing service accounts.
35
35
36
-
When should you use cloudflared vs ngrok? Use cloudflared for quick, free sharing during development and testing. Choose ngrok if you need stable subdomains, custom domains, or advanced features like IP allowlisting and OAuth protection.
36
+
When should you use cloudflared vs ngrok? Use cloudflared for quick, free sharing during development and testing. Choose ngrok if you need stable subdomains, custom domains, or advanced features like IP allowlisting and OAuth protection. (However, if you control a domain registered at Cloudflare you can use that for stable domains. This will be covered in a future blog.)
37
37
38
38
## Configuration Flexibility
39
39
40
40
You can set your preferred provider at multiple levels:
41
41
42
42
```bash
43
43
# Use a specific provider for this session
44
-
ddev share -providercloudflared
44
+
ddev share --provider=cloudflared
45
45
46
46
# Set default provider for the current project
47
-
ddev config --share-provider=cloudflared
47
+
ddev config --share-default-provider=cloudflared
48
48
49
49
# Set global default for all projects
50
-
ddev config global --share-provider=cloudflared
50
+
ddev config global --share-default-provider=cloudflared
51
51
```
52
52
53
53
This flexibility lets you use different providers for different projects or standardize across your entire development setup.
54
54
55
-
## Automation with DDEV_SHARE_URL
55
+
## Automation for difficult CMSs using `pre-share` hooks and $DDEV_SHARE_URL
56
56
57
57
When you run `ddev share`, DDEV now exports the tunnel URL as the `DDEV_SHARE_URL` environment variable. This enables automation through hooks, particularly useful for integration testing, webhooks, or CI workflows that need the public URL.
58
58
59
-
A practical example: sharing WordPress or TYPO3 sites used to require manual database updates to replace localhost URLs with the share URL. Now you can automate this with pre-share hooks that run before the tunnel starts:
59
+
### WordPress Example
60
+
61
+
WordPress is always difficult because it embeds the URL right in the database. For site moves to new URLs the `wp search-replace` tool is the classic way to deal with this, so the hook demonstration below can be used to make `ddev share` work even when the URL is dynamic.
This approach works for any CMS that stores base URLs in its configuration or database. The pre-share hook updates URLs automatically, and you can use post-share hooks to restore them when sharing ends. This eliminates the manual configuration work that sharing previously required for many CMSs.
73
84
85
+
### TYPO3 Example
86
+
87
+
TYPO3 usually puts the site URL into config/sites/*/config.yaml as `base: <url>`, and then it won't respond to the different URLs in a `ddev share`. The hooks here temporarily remove teh `base:` element:
- exec-host: echo "changes to config/sites reverted"
104
+
105
+
```
106
+
74
107
## Extensibility: Custom Share Providers
75
108
76
109
The new provider system is script-based, allowing you to create custom providers for internal tunneling solutions or other services. Place Bash scripts in `.ddev/share-providers/` (project-level) or `~/.ddev/share-providers/` (global), and DDEV will recognize them as available providers.
0 commit comments