Ngrok for Local Development with Docker

Go to ngrok.com and log in.

Then edit the docker-compose.yml and add:

  ngrok:
    image: wernight/ngrok
    container_name: "${PROJECT_NAME}_ngrok"
    ports:
      - '4040:4040' # http://localhost:4040/
    environment:
      NGROK_PORT: nginx:80
      NGROK_AUTH: 'xxxxxxxxxxxxxxx'
      NGROK_REGION: 'eu'
    links:
      - nginx

Where NGROK_AUTH: xxxxx should be the token you see when you log in to your account on ngrok.com.

With this, it works for me locally with Docker4Drupal.

Need a Drupal Expert?

Senior Drupal developer, freelance, specialized in what's hardest: migrations, multilingual sites, SaaS platforms and Stripe integration. I leverage AI to cut delivery times and costs, with expert review on every line of code.

No agency, no middlemen. Direct contact with the one who does the work.