Local tunnel

# Summary

This article covers the case when a service needs to be exposed to the internet to test for example a webhook or a callback while running the service locally.

# Install cloudflared

Follow up instructions from the (official documentation) (opens new window)

# Login to cloudflared

cloudflared login

# List the available tunnels

cloudflared tunnel list

Make sure avantus-test is in the list

# Create a config file under ~/.cloudflared/config.yml

nano ~/.cloudflared/config.yml

ingress:
  # Rules map traffic from a hostname to a local service:
  - hostname: test.avantus.dev
    service: http://localhost:8000
  # An example of a catch-all rule:
  - service: http_status:404

# Run the tunnel

cloudflared tunnel run avantus-test
Last Updated: 4/8/2021, 8:49:55 AM