> 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/using-defguard-for-end-users/desktop-client/instance-configuration.md).

# Instance configuration

In this guide, you will learn how to add, remove and update Instance in Defguard desktop client.

{% hint style="warning" %}
Defguard Desktop Client is required if you want to use Multi-Factor Authentication, as any other WireGuard client doesn't support this functionality.
{% endhint %}

### Obtaining URL and Token

{% hint style="info" %}
If you are looking for how to generate tokens for your users as an Administrator, look here:

[Adding client device](/features/wireguard/remote-desktop-activation.md)
{% endhint %}

1. Log in to your Defguard account.
2. Go to **My Profile** tab and select **Devices** tab.

<figure><img src="https://464489758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtIboBQe0Rz5YT3cHdNlh%2Fuploads%2Fgit-blob-a7c45d583e45a3cf60742383927192952d28d509%2Fdefguard-myprofile-tab-devices-tab-marked.png?alt=media" alt="" width="50%"><figcaption></figcaption></figure>

3. Click **Add new device** button.

<figure><img src="https://464489758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtIboBQe0Rz5YT3cHdNlh%2Fuploads%2Fgit-blob-e225a215f0ede0fe4c2e2e231bb11ca97579f7ec%2Fdefguard-devices-add-new.png?alt=media" alt="" width="50%"><figcaption></figcaption></figure>

4. Click **Client Activation**.

<figure><img src="https://464489758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtIboBQe0Rz5YT3cHdNlh%2Fuploads%2Fgit-blob-cce7574c4bc3e4c3fc987dc15e3b2005cc7a8641%2Fclient-activation.png?alt=media" alt="" width="50%"><figcaption></figcaption></figure>

5. Afterwards, use **One-Click Configuration** or click **Show advanced configuration** and copy **URL** and **Token** manually.

<figure><img src="https://464489758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtIboBQe0Rz5YT3cHdNlh%2Fuploads%2Fgit-blob-09e78941d6b01622168dd157d5946cf99912300a%2Fclient-activation-instance-configuration.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

### Manually Adding Instance

1. If you don't have **Defguard** in full view mode, open **Defguard** from tray view, and click **Open Defguard**

<figure><img src="https://464489758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtIboBQe0Rz5YT3cHdNlh%2Fuploads%2Fgit-blob-29f0af181175d194e082eaaf7feb06b445f5ab57%2Ftray-view-open-defguard-marked.png?alt=media" alt="" width="50%"><figcaption></figcaption></figure>

2. Click **Add Instance**.

<figure><img src="https://464489758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtIboBQe0Rz5YT3cHdNlh%2Fuploads%2Fgit-blob-a9e23c1ee4475f1e8d5578901e3a68988772b5ca%2Fadd-instance-full-view.png?alt=media" alt=""><figcaption></figcaption></figure>

3. Enter URL, Token and Device name of your choice, then click **Add Instance**. (If you don't have URL/Token, check out [this section](#obtaining-url-and-token))

<figure><img src="https://464489758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtIboBQe0Rz5YT3cHdNlh%2Fuploads%2Fgit-blob-5a674fc2abea8b8e048f8b327959b9474cb3fc70%2Fadd-instance-credentials.png?alt=media" alt=""><figcaption></figcaption></figure>

### One-click Desktop Configuration

You can skip the whole process of entering the token/URL by clicking "One-Click Desktop Configuration". Here is a video describing the whole process:

{% embed url="<https://www.youtube.com/embed/q5-AXOPLgHc>" %}

### Connecting to Instance

#### Desktop client in full view mode

1. Go to **Instances**

<figure><img src="https://464489758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtIboBQe0Rz5YT3cHdNlh%2Fuploads%2Fgit-blob-ff3eac81888f60057b07ae6add9d3efd9f24d493%2Finstance-view-marked.png?alt=media" alt=""><figcaption></figcaption></figure>

2. Select the instance you want to use

<figure><img src="https://464489758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtIboBQe0Rz5YT3cHdNlh%2Fuploads%2Fgit-blob-453f9f869cf75e650eca51210b6b262d739c25ad%2Fselected-instance-marked.png?alt=media" alt=""><figcaption></figcaption></figure>

3. Choose allowed traffic

{% hint style="info" %}

* **Predefined traffic only** will only route traffic specified by your administrator.
* **All traffic is allowed** will route everything through VPN tunnel.
  {% endhint %}

<figure><img src="https://464489758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtIboBQe0Rz5YT3cHdNlh%2Fuploads%2Fgit-blob-761779c4fca95ea2b223bcbd2807ee97b6db1eb0%2Fallowed-traffic-marked.png?alt=media" alt=""><figcaption></figcaption></figure>

4. Click **Connect VPN**

<figure><img src="https://464489758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtIboBQe0Rz5YT3cHdNlh%2Fuploads%2Fgit-blob-1715bda323c62805f00e17751b10f6c762d3f36b%2Fconnect-vpn-full-view.png?alt=media" alt=""><figcaption></figcaption></figure>

#### Desktop client in tray view mode

1. Click on instance list

<figure><img src="https://464489758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtIboBQe0Rz5YT3cHdNlh%2Fuploads%2Fgit-blob-1844e2798e93828f355a67b487d0ca62da9339b4%2Finstance-list-marked.png?alt=media" alt=""><figcaption></figcaption></figure>

2. Select the instance you want to connect to

<figure><img src="https://464489758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtIboBQe0Rz5YT3cHdNlh%2Fuploads%2Fgit-blob-f73d99e922654afac2f27c2556e2b6caa11a65ff%2Fselected-instance-on-list-marked.png?alt=media" alt=""><figcaption></figcaption></figure>

3. Choose allowed traffic

{% hint style="info" %}

* **Predefined traffic only** will only route traffic specified by your administrator.
* **All traffic is allowed** will route everything through VPN tunnel.
  {% endhint %}

<figure><img src="https://464489758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtIboBQe0Rz5YT3cHdNlh%2Fuploads%2Fgit-blob-650c2cfea4d89066995e43783d8e8acd036ea4ad%2Fallowed-traffic-tray-view.png?alt=media" alt=""><figcaption></figcaption></figure>

4. Click **Connect VPN**

<figure><img src="https://464489758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtIboBQe0Rz5YT3cHdNlh%2Fuploads%2Fgit-blob-dfc300d0ddbe984545bbc023d61420b2a45d1119%2Fconnect-tray-view-marked.png?alt=media" alt=""><figcaption></figcaption></figure>

### Disconnecting from Instance

Click **Disconnect** next to the location you are currently connected to.

<figure><img src="https://464489758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtIboBQe0Rz5YT3cHdNlh%2Fuploads%2Fgit-blob-668a7514e20511775ab12aa79c9985ee8bb9b6d5%2Fdisconnect-marked.png?alt=media" alt=""><figcaption></figcaption></figure>

### Updating Instance

If you want to update your instance manually:

1. If you don't have **Defguard** in full view mode, open **Defguard** from tray view, and click **Open Defguard**

<figure><img src="https://464489758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtIboBQe0Rz5YT3cHdNlh%2Fuploads%2Fgit-blob-29f0af181175d194e082eaaf7feb06b445f5ab57%2Ftray-view-open-defguard-marked.png?alt=media" alt="" width="50%"><figcaption></figcaption></figure>

2. Go to your Instance and click **Instance settings**

<figure><img src="https://464489758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtIboBQe0Rz5YT3cHdNlh%2Fuploads%2Fgit-blob-1ca413cde5af7be5acfe7ac16bca4e5d10a2ab5d%2Fclient-instance-settings-marked.png?alt=media" alt=""><figcaption></figcaption></figure>

3. Click **Update**

<figure><img src="https://464489758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtIboBQe0Rz5YT3cHdNlh%2Fuploads%2Fgit-blob-5cb40033d22b2a7b16be18de9d21e93fce164178%2Fupdate-marked-instance-settings.png?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
Only tokens issued from that specific instance will work.
{% endhint %}

4. Enter Token provided by your administrator, or generate it [on your own](#obtaining-url-and-token). Then click **Update**

<figure><img src="https://464489758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtIboBQe0Rz5YT3cHdNlh%2Fuploads%2Fgit-blob-08c9aa9fc51e6b00c3d6e7b33e23e3ce960d7007%2Ftoken-update-instance.png?alt=media" alt=""><figcaption></figcaption></figure>

Your Instance will update immediately.

### Why do instances need updates?

Defguard Desktop stores all information locally and doesn't communicate with Defguard outside the registration process. This means that the information about an instance is a snapshot of the moment you registered it in the desktop client, and you might want to update it, for example when locations are added or removed.

{% hint style="success" %}
If you have a Business or Enterprise plan, all desktop clients and all instances are [synchronized automatically and in real-time.](/features/remote-user-enrollment/automatic-real-time-desktop-client-configuration.md)
{% endhint %}

### Removing Instance

1. If you don't have **Defguard** in full view mode, open **Defguard** from tray view, and click **Open Defguard**

<figure><img src="https://464489758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtIboBQe0Rz5YT3cHdNlh%2Fuploads%2Fgit-blob-29f0af181175d194e082eaaf7feb06b445f5ab57%2Ftray-view-open-defguard-marked.png?alt=media" alt="" width="50%"><figcaption></figcaption></figure>

2. Go to your Instance, click **Instance settings**

<figure><img src="https://464489758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtIboBQe0Rz5YT3cHdNlh%2Fuploads%2Fgit-blob-1ca413cde5af7be5acfe7ac16bca4e5d10a2ab5d%2Fclient-instance-settings-marked.png?alt=media" alt=""><figcaption></figcaption></figure>

3. Click **Delete**

<figure><img src="https://464489758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtIboBQe0Rz5YT3cHdNlh%2Fuploads%2Fgit-blob-b58970591d4971adc915eb2a9cb0c1e2c1222ffd%2Fdelete-instance-marked.png?alt=media" alt=""><figcaption></figcaption></figure>

4. Confirm with **Delete instance** button

<figure><img src="https://464489758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtIboBQe0Rz5YT3cHdNlh%2Fuploads%2Fgit-blob-20c9fce5229b9d632fb69a52aef3634b7059840f%2Fdelete-instance-confirmation.png?alt=media" alt=""><figcaption></figcaption></figure>

Your Instance will be removed immediately.
