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.