There are many features of Jetpack that are only available when its connection to WordPress.com is active. This affects the Jetpack development environment, where enabling the Jetpack connection may not always be straightforward. To overcome firewalls and network limitations, tools like ngrok or reverse SSH tunnels are usually used to expose a service to the internet. An alternative that is both easier and faster will be explained in this article.
Cloudflare Tunnel offers a faster and efficient solution for that. It routes traffic via Cloudflare’s global network of data centers in over 300 cities across more than 120 countries. This significantly reduces latency – they aim be within 50ms from nearly everybody in the world – and considerably improves performance. It is also free to use with a Cloudflare account if your domain’s DNS is managed by Cloudflare. Even without an account, the service works but generates random subdomains ending in .trycloudflare.com, which may not be ideal for activating Jetpack.
Setting Up Cloudflare Tunnel
Here’s a simple guide to setting up Cloudflare Tunnel for your Jetpack environment.
Start by navigating to the Cloudflare Zero Trust dashboard and creating a new tunnel:

Select the tunnel type as “Cloudflared”:

Name your tunnel and save the configuration:

Follow the instructions to install the Cloudflare Tunnel client: cloudflared. The installation process provides an authentication token to associate the client with your Cloudflare account:

Once the client is installed, configure the tunnel to route traffic to your local Jetpack development environment. Provide the subdomain to be created and the domain you’ve set up. Select HTTP as the service type, and set the service URL to localhost. No port is required if you are developing Jetpack using the Docker setup (which binds to HTTP port 80):

When everything is in place, your WordPress site with Jetpack will be accessible via the custom subdomain, complete with HTTPS:

Security Considerations
Since your local environment is now publicly accessible over the internet, it’s important to take steps to secure it. Avoid using default credentials like wordpress/wordpress, and set a strong admin password. For added protection, consider enabling Jetpack Single Sign-On (SSO).
Conclusion
Setting up a Cloudflare Tunnel provides a streamlined solution for connecting a Jetpack development environment, bypassing the complexities of traditional tools such as reverse SSH tunnels. Leveraging its global network of data centers, Cloudflare Tunnel minimizes latency and enhances performance while offering a simple, cost-effective approach. Following the outlined setup guide ensures the secure and reliable configuration of a connection, making the local Jetpack development environment site accessible over the internet via HTTPS.
Keep reading.
More from Jetpack News, newest first.
Tell us what Jetpack should build next
Jetpack now has a public feature request board. It’s one place to tell us what you want Jetpack to do next, see what other people are…
2 min read
The new Jetpack.com, one month in
A month after launch, here's what changed on Jetpack.com, how we built it as a WordPress block theme with its content in git, and what that…
4 min read
Jetpack Social Just Got a Major Upgrade: Customize, Preview, and Share with Confidence
Jetpack Social has been revamped in version 15.6 to enhance WordPress social media sharing. Users can now customize posts for each platform, enjoy a streamlined sharing…
4 min read
Run your WordPress site the AI-first way.
Free to start, and AI agents are free to connect. Money back within 14 days on yearly plans.


