Tech Tips

Easily Start a Localtunnel for Your DDEV Sites

Every time I needed a public tunnel for local development, I was repeating the same handful of steps. Localtunnel is a great free alternative to ngrok, and it deserves a proper DDEV command. Follow the steps to make one:

Step 1: Create this file in your project’s directory: .ddev/commands/host/localtunnel

Step 2: chmod +x .ddev/commands/host/localtunnel

Step 3: Use it like this: ddev lt adam-mysite

Of course, this will only work if you have localtunnel installed ( brew install localtunnel ).

When you run the command it’ll show you the resulting URL (e.g., https://adam-mysite.local.lt).

When finished, hit CTRL-C (on a Mac, at least) to close the session.

Leave a Reply

Your email address will not be published. Required fields are marked *