> 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.6/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://3466771104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe86iamwJVSYnIRsyVEAV%2Fuploads%2Fgit-blob-9c14a4fcfd7e5c0e51ef4cb62d80c81f1ec2b635%2FScreenshot%202025-10-15%20at%2013.37.33.png?alt=media" alt=""><figcaption><p>Adding a new location</p></figcaption></figure>

Then click the *Add new location tab*.

<figure><img src="https://3466771104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe86iamwJVSYnIRsyVEAV%2Fuploads%2Fgit-blob-d13a16e067acba452265f323aa247b694cfa6088%2FScreenshot%202025-10-15%20at%2013.37.55.png?alt=media" 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://3466771104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe86iamwJVSYnIRsyVEAV%2Fuploads%2Fgit-blob-1bcd600655d9a635a6e2dc5029cab5ddff9fe298%2Fchoose_location_setup.png?alt=media" alt=""><figcaption><p>Location wizard</p></figcaption></figure>

<figure><img src="https://3466771104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe86iamwJVSYnIRsyVEAV%2Fuploads%2Fgit-blob-5c3096775d6fe257cb29c06890b93d09ad9f2640%2Flocation_configuration.png?alt=media" 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://3466771104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe86iamwJVSYnIRsyVEAV%2Fuploads%2Fgit-blob-703da6d817495ce11709ec01a15465522f52e112%2Fedit_locations_settings.png?alt=media" 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://3466771104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe86iamwJVSYnIRsyVEAV%2Fuploads%2Fgit-blob-52ced7f70b6a9a2833b601b19ca4eaf6e2ab8c73%2Fgateway_server_setup.png?alt=media" 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.6/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.6/deployment-strategies/setting-up-your-instance.md#choose-your-deployment-strategy):

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

You can also check our guides on running Gateway on [OPNsense firewall](/1.6/deployment-strategies/running-gateway-on-opnsense-firewall.md) or [MikroTik router](/1.6/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.6/features/network-devices.md#adding-a-new-network-device).
