> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/gateway/knowledge-base/how-to-articles/reverse-proxying/ngrok-tunnel-with-devolutions-gateway.md).

# Ngrok tunnel with Devolutions Gateway

Devolutions Gateway can operate behind Ngrok to add an additional layer of protection to an internal Devolutions Gateway installation or to allow an outbound tunnel when changing a firewall configuration is unavailable. Using Devolutions Gateway behind Ngrok is available for both Devolutions Server and Devolutions Cloud. The Ngrok tunnel can be added to an already existing gateway by changing some settings in the **gateway.json** file.

### Configure Ngrok

{% hint style="info" %}
A paid subscription to Ngrok is required as the gateway needs to serve TCP traffic. The subscription also includes the use of custom domain names.
{% endhint %}

1. Log into the Ngrok dashboard.
2. Go to the ***Domains*** section which is under ***Cloud Edge***.
3. Click ***New Domain***.

   ![](https://cdnweb.devolutions.net/docs/DGW0070_2024_3.png)
4. Input the domain details and click ***Continue***.

   ![](https://cdnweb.devolutions.net/docs/DGW0071_2024_3.png)
5. Under ***Cloud Edge***, select the ***TCP Addresses*** section and then click the ***New TCP Address*** button.

   ![](https://cdnweb.devolutions.net/docs/DGW0085_2024_3.png)
6. Modify the information if needed and click ***Continue***.

   ![](https://cdnweb.devolutions.net/docs/DGW0083_2024_3.png)

   <div data-gb-custom-block data-tag="hint" data-style="success" class="hint hint-success"><p>It is advised to take note of the <em><strong>Domain</strong></em>, <em><strong>TCP Address</strong></em>, assigned TCP port as well as the Ngrok <em><strong>Authtoken</strong></em>.</p></div>
7. Go to ***Getting Started*** — ***Your Authtoken*** and click the ***Copy*** button.

   ![](https://cdnweb.devolutions.net/docs/DGW0084_2024_3.png)

### Retrieve the provisioning key

1. Log into the Devolutions Server or Devolutions Cloud instance as a user with access to the Devolutions Gateway configuration.
2. Go to ***Administration*** — ***Devolutions Gateway***.
3. Click the ***More*** button and select ***Download public key***.

{% hint style="success" %}
This file needs to be accessible to the serverhosting Devolutions Gateway behind Ngrok.
{% endhint %}

### Install Devolutions Gateway with Ngrok

1. Open a connection to the server hosting Devolutions Gateway and download the [installer](https://devolutions.net/gateway/).
2. Run the installer.
3. Click ***Next***.

   ![](https://cdnweb.devolutions.net/docs/DGW0020_2024_3.png)
4. Once the desired installation path is selected, click the ***Next*** button.

   ![](https://cdnweb.devolutions.net/docs/DGW0021_2024_3.png)
5. Check the ***Enable access over the internet using Ngrok*** option and click ***Next***.

   ![](https://cdnweb.devolutions.net/docs/DGW0074_2024_3.png)
6. Enter the Ngrok settings and click ***Next***.

   ![](https://cdnweb.devolutions.net/docs/DGW0075_2024_3.png)
7. Specify the path to the previously retrieved public key from Devolutions Server or Devolutions Cloud and click ***Next***.

   ![](https://cdnweb.devolutions.net/docs/DGW0022_2024_3.png)

   <div data-gb-custom-block data-tag="hint" data-style="success" class="hint hint-success"><p>This key file must be accessible to the NetworkService account, which Devolutions Gateway runs as.</p></div>
8. Click ***Next*** and then click ***Install***.

   ![](https://cdnweb.devolutions.net/docs/DGW0076_2024_3.png)

### Configure Devolutions Server

1. Log into a Devolutions Server instance as a user with access to the Devolutions Gateway configuration.
2. Go to ***Administration*** — ***Devolutions Gateway***.
3. Click the ***Add*** (***+***) button and choose ***Gateway***.

   ![](https://cdnweb.devolutions.net/docs/DGW0002_2024_3.png)
4. Enter the previously retrieved details from Ngrok used to configure Devolutions Gateway.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>It may be needed to preface the Ngrok domain with <code>https://</code>. <em><strong>Auto-Detect</strong></em> will not work but <em><strong>Test connection</strong></em> will indicate if the Ngrok Domain is accessible.</p></div>
5. Click ***Save***.

   ![](https://cdnweb.devolutions.net/docs/DGW0077_2024_3.png)
6. Click the ellipsis (***More***) button next to the newly configured gateway and select ***Publish revocation list***.
   1. If the ***Publish Gateway configuration*** option is available, it should be done before ***Publish revocation list***.

      ![](https://cdnweb.devolutions.net/docs/DGW0078_2024_3.png)

### Configure Devolutions Cloud

1. Log into a Devolutions Cloud instance as a user with access to the Devolutions Gateway configuration.
2. Go to ***Administration*** — ***Devolutions Gateway***.
3. Click the ***Add*** (***+***) button.
4. Enter the previously retrieved details from Ngrok used to configure Devolutions Gateway.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>It may be needed to preface the Ngrok domain with <code>https://</code>. <em><strong>Auto-Detect</strong></em> will not work but <em><strong>Test connection</strong></em> will indicate if the Ngrok Domain is accessible.</p></div>
5. Go through any combination of ***Vaults***, ***Groups*** or ***Users*** tabs to decide how the licenses will be distributed.
6. Click ***Add***.

   ![](https://cdnweb.devolutions.net/docs/DGW0080_2024_3.png)
7. Click the ellipsis (***More***) button next to the newly configured gateway and select ***Publish Gateway configuration***.

   ![](https://cdnweb.devolutions.net/docs/DGW0081_2024_3.png)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.devolutions.net/gateway/knowledge-base/how-to-articles/reverse-proxying/ngrok-tunnel-with-devolutions-gateway.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
