From Torguard Mail on July:
TorGuard’s Stable Peers API Update for External Wireguard Clients:
Good news - we have now updated our wireguard API to prevent the 24hr config expiration on third party clients - all new configs generated using our config generator from now on will now stay active for the time your account has an active subscription.
@ -195,64 +195,6 @@ Choose your preferred VPN Tunnel type.
Rename the file from `*.conf` to `wg0.conf` and copy it to your wireguard folder of your VPN torrent client.
Before we can make use of it you will need to edit the `wg0.conf` file first and add the following at line 7.
```bash
PreUp = bash /config/wireguard/torguard.sh
```
Your wg0.conf should look something like this:
```shell linenums="1"
# TorGuard WireGuard Config
[Interface]
PrivateKey = secretprivatekey
ListenPort = 51820
DNS = 1.1.1.1
Address = xx.xx.xxx.xx/24
PreUp = bash /config/wireguard/torguard.sh
[Peer]
PublicKey = publickey
AllowedIPs = 0.0.0.0/0
Endpoint = xx.xxx.xx.xxx:1443
PersistentKeepalive = 25
```
Then you will need to create a bash script in your `/config/wireguard` of your torrent client appdata folder named `torguard.sh` (*This script will get executed just before starting WireGuard*) with the following info it depending which images you're using.
##### Hotio's VPN Containers
??? example "Hotio's VPN Containers"
```bash
#!/usr/bin/bash
pubkey=$(grep PrivateKey "${CONFIG_DIR}/wireguard/wg0.conf" | awk '{print $3}' | wg pubkey)
You will also have to add the additional environment variables `TORGUARD_USER` and `TORGUARD_PASS` or fill them in into the script directly (see curl command). These credentials are the ones we created [HERE](#create-a-user-account).
##### Binhex VPN Containers
??? example "Binhex VPN Containers"
```bash
#!/usr/bin/bash
pubkey=$(grep PrivateKey "config/wireguard/wg0.conf" | awk '{print $3}' | wg pubkey)
You will also have to add the additional environment variables `VPN_USER` and `VPN_PASS or fill them in into the script directly (see curl command). These credentials are the ones we created [HERE](#create-a-user-account).