> For the complete documentation index, see [llms.txt](https://docs.defguard.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.defguard.net/1.5/deployment-strategies/gateway.md).

# Adding a location and getting a Gateway token

This documentation will guide you through adding a new location and proceeding with the Gateway deployment, enabling your devices to connect to it via VPN.

## Adding a location in Defguard Core

{% hint style="warning" %}
Please remember that **one gateway corresponds to one VPN location.**

You can also deploy multiple gateways for one location for High Availability.
{% endhint %}

Go to the address you set on `DEFGUARD_URL` with your browser and sign in using the credentials you set up during Core deployment.

Go to the *VPN Overview* module from the main menu and click the *Edit Locations settings*.

<figure><img src="https://4041812211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkHPDOBrb5X1TB8O3GsjW%2Fuploads%2FbsyFbXIUCHdYZFXaXLM1%2FScreenshot%202025-10-15%20at%2013.37.33.png?alt=media&amp;token=5eb3c7e2-f19c-4851-aaf8-4b0b11707f1b" alt=""><figcaption><p>Adding a new location</p></figcaption></figure>

Then click the *Add new location tab*.

<figure><img src="https://4041812211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkHPDOBrb5X1TB8O3GsjW%2Fuploads%2FbOuoAljTgwcTXrCrzW7j%2FScreenshot%202025-10-15%20at%2013.37.55.png?alt=media&amp;token=f1e39443-a51c-4acd-aa17-b4fe826100ce" alt="Adding a new location"><figcaption><p>Adding a new location</p></figcaption></figure>

Depending on what is more convenient for you, choose configuration from Wireguard file or do it manually.

<figure><img src="https://content.gitbook.com/content/kHPDOBrb5X1TB8O3GsjW/blobs/7mbhNEWkeB2NOLegg7XZ/choose_location_setup.png" alt=""><figcaption><p>Location wizard</p></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/kHPDOBrb5X1TB8O3GsjW/blobs/gscOUZavxBnTydntdxDM/location_configuration.png" alt=""><figcaption><p>Location configuration</p></figcaption></figure>

After saving configuration for location you should be redirect to Location overview page, where at the top right corner is `Edit Locations Settings` button, click on it.

<figure><img src="https://content.gitbook.com/content/kHPDOBrb5X1TB8O3GsjW/blobs/GYViUUDsciTYC4cNQPfe/edit_locations_settings.png" alt=""><figcaption><p>Manual configuration</p></figcaption></figure>

In `Gateway server setup` copy two variables: `DEFGUARD_TOKEN` and `DEFGUARD_GRPC_URL`

<figure><img src="https://content.gitbook.com/content/kHPDOBrb5X1TB8O3GsjW/blobs/IdldTQ83LvapVowr5Kks/gateway_server_setup.png" alt=""><figcaption><p>Gateway server setup</p></figcaption></figure>

Also, if core has a custom SSL CA to secure gRPC communication, [you need the CA certificate (more here).](/1.5/deployment-strategies/grpc-ssl-communication.md#custom-ssl-ca-and-certificates)

## Deploy the Gateway service

Proceed with deploying your Gateway service using the selected [deployment strategy](/1.5/deployment-strategies/setting-up-your-instance.md#choose-your-deployment-strategy):

* [package based](/1.5/deployment-strategies/standalone-package-based-installation.md#gateway-1)
* [Docker Compose](/1.5/deployment-strategies/docker-compose.md#deploying-gateway-service)
* [Kubernetes](/1.5/deployment-strategies/kubernetes.md#vpn-gateway-service)
* [Terraform](/1.5/deployment-strategies/terraform.md#gateway-module)
* [AMIs and AWS CloudFormation](/1.5/deployment-strategies/amis-and-aws-cloudformation.md#gateway-instance)

You can also check our guides on running Gateway on [OPNsense firewall](/1.5/deployment-strategies/running-gateway-on-opnsense-firewall.md) or [MikroTik router](/1.5/deployment-strategies/running-gateway-on-mikrotik-routers.md).

If everything went well, Defguard Gateway should be connected to Defguard Core and you can start [adding new devices to your network](/1.5/features/network-devices.md#adding-a-new-network-device).
