- As a service: Run a small side process called the ngrok agent as a background OS service.
- As an interactive CLI: Run the ngrok agent interactively from the command line while developing and testing.
- As an SDK embedded in your app: Include a small Agent SDK library directly into your application software that returns a socket-like object.
- As a Kubernetes Controller: Run the ngrok Kubernetes Operator in a Kubernetes environment.
How does ngrok's Gateway work?
Learn how ngrok’s global cloud service and agent software work together to provide secure ingress to your applications.
ngrok operates a global network of servers called the ngrok cloud service where it accepts traffic to your upstream services from clients on the internet.
The URLs that it receives traffic on are your endpoints.
You configure modules that ngrok uses to authenticate, transform, and accelerate that traffic as it’s sent to your upstream service.
Unlike traditional reverse proxies, ngrok’s Gateway doesn’t transmit traffic to your upstream services by forwarding to IP addresses.
Instead, you run a small piece of software alongside your service called an agent which connects to ngrok’s global service via secure, outbound persistent TLS connections.
When traffic is received on your endpoints at ngrok’s cloud service, it’s transmitted to the agent via those TLS connections and finally from the agent to your upstream service.
You can choose how to run the agent software in different form factors—it’s lightweight and easy to install: