# Receiving an error using \`pritunl-client\` when trying to connect using Wireguard

**URL:** <https://forum.pritunl.com/t/receiving-an-error-using-pritunl-client-when-trying-to-connect-using-wireguard/3639>\
**Category:** Pritunl VPN\
**Tags:** pritunl-client\
**Created:** [November 20, 2025, 8:49pm UTC](https://forum.pritunl.com/t/receiving-an-error-using-pritunl-client-when-trying-to-connect-using-wireguard/3639 "2025-11-20T20:49:43Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![macsire](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/m/8e7dd6/32.png) [@macsire](https://forum.pritunl.com/u/macsire)\
**Post date:** [November 20, 2025, 8:49pm UTC](https://forum.pritunl.com/t/receiving-an-error-using-pritunl-client-when-trying-to-connect-using-wireguard/3639/1 "2025-11-20T20:49:43Z")

</div>

Hey @zach!

I’m digging into establishing `pritunl-client` in our raspberry pis since we have had issues with openvpn now (it’s dropping connections and we want to have a more stable connection which would be testing out Wireguard.) I got Wireguard working on Pritunl, it’s now a matter of getting it to work in our raspberry pis. I have done the following if anyone wants to set this up on their side:

```shell
### Pritunl setup on raspberry pi
wget https://go.dev/dl/go1.23.3.linux-arm64.tar.gz

sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go1.23.3.linux-arm64.tar.gz

mkdir -p ~/go/{bin,pkg,src}

### my .profile has the following
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin

go install github.com/pritunl/pritunl-client-electron/cli@latest
sudo mv ~/go/bin/cli ~/go/bin/pritunl-client

### Commands to setup the connection correctly using Pritunl's Admin API keys
curl -H "Auth-Key: 3JKJKj3jk3jk3jl3kjhh3kl3kj3" \
     -H "Auth-Token: vj33h3kk3l2929009fjjFJKJK" \
     -o client.tar \
     https://pritunl.foo.com/key/JkyfjKKJFKKKLLDLDlldliekd.tar

pritunl-client add client.tar
pritunl-client list

pritunl-client start 5ac --mode=wg

```

I’m able to pull the tar file to be used with `pritunl-client` but I get this error:

```shell
Nov 20 17:05:25 2ccf67d388ab pritunl-client-service[48343]: [2025-11-20 17:05:25][ERRO] ▶ profile: Failed to start connection in restart ◆ client_disconnect=true ◆ client_>
Nov 20 17:05:25 2ccf67d388ab pritunl-client-service[48343]: utils: Failed to exec '/usr/bin/wg-quick'
Nov 20 17:05:25 2ccf67d388ab pritunl-client-service[48343]: exit status 2
Nov 20 17:05:25 2ccf67d388ab pritunl-client-service[48343]: ORIGINAL STACK TRACE:
Nov 20 17:05:25 2ccf67d388ab pritunl-client-service[48343]: github.com/pritunl/pritunl-client-electron/service/utils.ExecCombinedOutputLogged
Nov 20 17:05:25 2ccf67d388ab pritunl-client-service[48343]: /home/pi/go/pkg/mod/github.com/pritunl/pritunl-client-electron/service@v0.0.0-20251116210614-0523de9492>
Nov 20 17:05:25 2ccf67d388ab pritunl-client-service[48343]: github.com/pritunl/pritunl-client-electron/service/connection.(*Wg).confWgLinux
Nov 20 17:05:25 2ccf67d388ab pritunl-client-service[48343]: /home/pi/go/pkg/mod/github.com/pritunl/pritunl-client-electron/service@v0.0.0-20251116210614-0523de9492>
Nov 20 17:05:25 2ccf67d388ab pritunl-client-service[48343]: github.com/pritunl/pritunl-client-electron/service/connection.(*Wg).confWg
Nov 20 17:05:25 2ccf67d388ab pritunl-client-service[48343]: /home/pi/go/pkg/mod/github.com/pritunl/pritunl-client-electron/service@v0.0.0-20251116210614-0523de9492>
Nov 20 17:05:25 2ccf67d388ab pritunl-client-service[48343]: github.com/pritunl/pritunl-client-electron/service/connection.(*Wg).Connect
Nov 20 17:05:25 2ccf67d388ab pritunl-client-service[48343]: /home/pi/go/pkg/mod/github.com/pritunl/pritunl-client-electron/service@v0.0.0-20251116210614-0523de9492>
Nov 20 17:05:25 2ccf67d388ab pritunl-client-service[48343]: github.com/pritunl/pritunl-client-electron/service/connection.(*Client).connectPreAuth
Nov 20 17:05:25 2ccf67d388ab pritunl-client-service[48343]: /home/pi/go/pkg/mod/github.com/pritunl/pritunl-client-electron/service@v0.0.0-20251116210614-0523de9492>
Nov 20 17:05:25 2ccf67d388ab pritunl-client-service[48343]: github.com/pritunl/pritunl-client-electron/service/connection.(*Client).Start
Nov 20 17:05:25 2ccf67d388ab pritunl-client-service[48343]: /home/pi/go/pkg/mod/github.com/pritunl/pritunl-client-electron/service@v0.0.0-20251116210614-0523de9492>
Nov 20 17:05:25 2ccf67d388ab pritunl-client-service[48343]: github.com/pritunl/pritunl-client-electron/service/connection.(*Wg).Start
Nov 20 17:05:25 2ccf67d388ab pritunl-client-service[48343]: /home/pi/go/pkg/mod/github.com/pritunl/pritunl-client-electron/service@v0.0.0-20251116210614-0523de9492>
Nov 20 17:05:25 2ccf67d388ab pritunl-client-service[48343]: github.com/pritunl/pritunl-client-electron/service/connection.(*Connection).Start
Nov 20 17:05:25 2ccf67d388ab pritunl-client-service[48343]: /home/pi/go/pkg/mod/github.com/pritunl/pritunl-client-electron/service@v0.0.0-20251116210614-0523de9492>
Nov 20 17:05:25 2ccf67d388ab pritunl-client-service[48343]: github.com/pritunl/pritunl-client-electron/service/connection.(*Connection).Restart
Nov 20 17:05:25 2ccf67d388ab pritunl-client-service[48343]: /home/pi/go/pkg/mod/github.com/pritunl/pritunl-client-electron/service@v0.0.0-20251116210614-0523de9492>
Nov 20 17:05:25 2ccf67d388ab pritunl-client-service[48343]: runtime.goexit
Nov 20 17:05:25 2ccf67d388ab pritunl-client-service[48343]: /usr/local/go/src/runtime/asm_arm64.s:1223 +0x89803

```

Hoping I can get some help on this as to why it’s erroring for me in my raspberry pi for Wireguard

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [November 21, 2025, 2:35am UTC](https://forum.pritunl.com/t/receiving-an-error-using-pritunl-client-when-trying-to-connect-using-wireguard/3639/2 "2025-11-21T02:35:24Z")

</div>

Run the commands below to get the contents of the wg-quick configuration. Then start the connection. Verify there are no issues with the configuration. Then recreate the configuration file and manually run `sudo wg-quick /etc/wireguard/wg0.conf`.

```bash
sudo -s

while true; do
    if cat /etc/wireguard/*.conf 2>/dev/null; then
        break
    fi
done

```

---

<div class="post-metadata">

**Author:** ![macsire](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/m/8e7dd6/32.png) [@macsire](https://forum.pritunl.com/u/macsire)\
**Post date:** [November 21, 2025, 3:47am UTC](https://forum.pritunl.com/t/receiving-an-error-using-pritunl-client-when-trying-to-connect-using-wireguard/3639/3 "2025-11-21T03:47:36Z")

</div>

I was able to fix the connection. What I needed to do was add a file of `/etc/resolv.conf` and install `resolvconf`. Here is the final output:

```shell
sudo apt install -y git-core wireguard-tools openvpn resolvconf

### Add the following to the resolv.conf
echo 'nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 1.1.1.1' | sudo tee /etc/resolv.conf

wget https://go.dev/dl/go1.24.3.linux-arm64.tar.gz

sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go1.24.3.linux-arm64.tar.gz
sudo rm -rf go1.24.3.linux-arm64.tar.gz

### .profile has the following
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin

go install github.com/pritunl/pritunl-client-electron/service@latest
go install github.com/pritunl/pritunl-client-electron/cli@latest
sudo cp ~/go/bin/service /usr/bin/pritunl-client-service
sudo cp ~/go/bin/cli /usr/bin/pritunl-client

sudo cp "$(ls -td ~/go/pkg/mod/github.com/pritunl/pritunl-client-electron@*/ | head -n1)/resources_linux/pritunl-client.service" /etc/systemd/system/pritunl-client.service
sudo systemctl daemon-reload
sudo systemctl enable --now pritunl-client.service

### Command to grab the profile from Pritunl Server using API keys
curl -H "Auth-Key: 8j3jjfjijeijffjijijifjkflkjf" \
     -H "Auth-Token: v9u9uf9u9uf0u998fhlihflkjkl" \
     -o client.tar \
     https://pritunl.foo.com/key/3hh3jjjfjfjifjfj.tar

pritunl-client add client.tar
pritunl-client list

pritunl-client start <ID_here> --mode=wg or --mode=ovpn

```

Reference installation here: [GitHub - pritunl/pritunl-client-electron: Pritunl OpenVPN client](https://github.com/pritunl/pritunl-client-electron?tab=readme-ov-file#install-linux-client-on-arm)

Thanks for the help though @zach.

---

<div class="post-metadata">

**Author:** ![macsire](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/m/8e7dd6/32.png) [@macsire](https://forum.pritunl.com/u/macsire)\
**Post date:** [November 21, 2025, 4:06pm UTC](https://forum.pritunl.com/t/receiving-an-error-using-pritunl-client-when-trying-to-connect-using-wireguard/3639/4 "2025-11-21T16:06:38Z")

</div>

Oh actually @zach, it seems I get this error. I use NetworkManager in my raspberry pis with `/etc/resolv.conf` . Wondering what I can do to resolve this issue:

```shell
Nov 21 10:54:12 2ccf672b787d pritunl-client-service[673]: [2025-11-21 10:54:12][ERRO] ▶ utils: Process exec error ◆ arg=[]string{"up", "wg0"} ◆ cmd="/usr/bin/wg-quick" ◆ output="[#] ip link add wg0 type wireguard\n[#] wg setconf wg0 /dev/fd/63\n[#] ip -4 address add 10.50.0.7/16 dev wg0\n[#] ip link set mtu 1420 up dev wg0\n[#] resolvconf -a tun.wg0 -m 0 -x\n/etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a symbolic link to /run/resolvconf/resolv.conf\n[#] ip -4 route add 10.10.0.2/32 dev wg0\nRTNETLINK answers: File exists\n[#] resolvconf -d tun.wg0 -f\n/etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a symbolic link to /run/resolvconf/resolv.conf\n[#] ip link delete dev wg0\n"
Nov 21 10:54:12 2ccf672b787d NetworkManager[2772]: <info> [1763740452.5080] device (wg0): state change: unmanaged -> unavailable (reason 'connection-assumed', sys-iface-state: 'external')
Nov 21 10:54:12 2ccf672b787d NetworkManager[2772]: <info> [1763740452.5087] device (wg0): state change: unavailable -> disconnected (reason 'connection-assumed', sys-iface-state: 'external')
Nov 21 10:54:12 2ccf672b787d NetworkManager[2772]: <info> [1763740452.5095] device (wg0): Activation: starting connection 'wg0' (990f3d28-22f8-40c8-b2e6-fd43ae324715)
Nov 21 10:54:12 2ccf672b787d NetworkManager[2772]: <info> [1763740452.5096] device (wg0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'external')
Nov 21 10:54:12 2ccf672b787d NetworkManager[2772]: <info> [1763740452.5102] device (wg0): state change: prepare -> config (reason 'none', sys-iface-state: 'external')
Nov 21 10:54:12 2ccf672b787d NetworkManager[2772]: <info> [1763740452.5106] device (wg0): state change: config -> ip-config (reason 'none', sys-iface-state: 'external')
Nov 21 10:54:12 2ccf672b787d NetworkManager[2772]: <info> [1763740452.5110] device (wg0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'external')
Nov 21 10:54:12 2ccf672b787d dbus-daemon[669]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.48' (uid=0 pid=2772 comm="/usr/sbin/NetworkManager --no-daemon")
Nov 21 10:54:12 2ccf672b787d systemd[1]: Starting NetworkManager-dispatcher.service - Network Manager Script Dispatcher Service...
Nov 21 10:54:12 2ccf672b787d dbus-daemon[669]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Nov 21 10:54:12 2ccf672b787d systemd[1]: Started NetworkManager-dispatcher.service - Network Manager Script Dispatcher Service.
Nov 21 10:54:12 2ccf672b787d NetworkManager[2772]: <info> [1763740452.5419] device (wg0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'external')
Nov 21 10:54:12 2ccf672b787d NetworkManager[2772]: <info> [1763740452.5421] device (wg0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'external')
Nov 21 10:54:12 2ccf672b787d NetworkManager[2772]: <info> [1763740452.5429] device (wg0): Activation: successful, device activated.
Nov 21 10:54:12 2ccf672b787d NetworkManager[2772]: <warn> [1763740452.6111] device (wg0): could not get wireguard properties
Nov 21 10:54:12 2ccf672b787d NetworkManager[2772]: <info> [1763740452.6116] device (wg0): state change: activated -> unmanaged (reason 'connection-assumed', sys-iface-state: 'external')

```

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [November 21, 2025, 5:11pm UTC](https://forum.pritunl.com/t/receiving-an-error-using-pritunl-client-when-trying-to-connect-using-wireguard/3639/5 "2025-11-21T17:11:42Z")

</div>

I don’t think Ubuntu uses resolvconf by default. But installing resolvconf then manually managing the resolve.conf file is incorrect. That file would be managed by resolvconf. Installing it may also interfere with systemd-resolved. The system should have systemd-resolved and the `systemd-resolved.service` running.

Another option may be to remove the DNS Server and DNS Search Domain from the Pritunl server settings. This will prevent the VPN client from attempting to modify the DNS.

---

<div class="post-metadata">

**Author:** ![macsire](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/m/8e7dd6/32.png) [@macsire](https://forum.pritunl.com/u/macsire)\
**Post date:** [November 21, 2025, 5:28pm UTC](https://forum.pritunl.com/t/receiving-an-error-using-pritunl-client-when-trying-to-connect-using-wireguard/3639/6 "2025-11-21T17:28:40Z")

</div>

Thanks for the reply @zach. We don’t want to remove the DNS server since we use that to map our devices which works. We have it working just fine for OpenVPN but when it comes to Wireguard, these errors pops up.

I’ll continue digging into this to get this working.

---

<div class="post-metadata">

**Author:** ![macsire](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/m/8e7dd6/32.png) [@macsire](https://forum.pritunl.com/u/macsire)\
**Post date:** [December 2, 2025, 8:55pm UTC](https://forum.pritunl.com/t/receiving-an-error-using-pritunl-client-when-trying-to-connect-using-wireguard/3639/7 "2025-12-02T20:55:39Z")

</div>

Hey @zach

I was able to get this working with Raspberry Pi 4s which do not use `NetworkManager`. The following errors are on Raspberry Pi 5. I was able to resolve the issue by installing `sudo apt install resolvconf` which stopped the following errors:

```shell
\n/usr/bin/wq-quick: line 32: resolvconf: command not found\n[#] ip link delete dev wg0\n"

```

From here, I began having new errors of my DNS server. I was able to resolve the following by modifying the `/etc/resolv.conf` with `nameserver 8.8.8.8 and nameserver 1.1.1.1`, I reran `pritunl-client` and then it began working. I just need to temporarily add the nameservers to communicate to my server which then pull the configs using `pritunl-client`:

```shell
POST "https://pritunl-0.foo.com/key/wg/234234l;ikj34l3k4j3l4kj34/j23l4kj3l4kj3k3k3k3kjkjj": dial tcp: lookup pritunl-0.foo.com on [::1]:53: read udp [::1]:44154->[::1]:53: read: connection refused

```

Am I missing when doing this or is this fine?

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [December 2, 2025, 11:45pm UTC](https://forum.pritunl.com/t/receiving-an-error-using-pritunl-client-when-trying-to-connect-using-wireguard/3639/8 "2025-12-02T23:45:48Z")

</div>

The error indicates it’s attempting to do a DNS query with systemd-resolve but systemd-resolve isn’t running. The resolv.conf file shouldn’t be modifed on a system using systemd-resolve. You need to configure one DNS system and correct the DNS configuration.

---

<div class="post-metadata">

**Author:** ![macsire](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/m/8e7dd6/32.png) [@macsire](https://forum.pritunl.com/u/macsire)\
**Post date:** [December 3, 2025, 3:29pm UTC](https://forum.pritunl.com/t/receiving-an-error-using-pritunl-client-when-trying-to-connect-using-wireguard/3639/9 "2025-12-03T15:29:42Z")

</div>

My Pritunl servers are running `systemd-resolve` correctly. It’s the clients (i.e. Raspi Pis) where `resolvconf` needs to be installed.

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [December 3, 2025, 5:24pm UTC](https://forum.pritunl.com/t/receiving-an-error-using-pritunl-client-when-trying-to-connect-using-wireguard/3639/10 "2025-12-03T17:24:29Z")

</div>

If the server is using systemd-resolve the stub listener needs to be disabled or it will block the Pritunl DNS server from starting.

```bash
sudo netstat -tulpn

sudo systemctl status systemd-resolved

sudo nano /etc/systemd/resolved.conf
[Resolve]
DNSStubListener=no

sudo systemctl restart systemd-resolved

```

The clients will need one correctly configured DNS resolver. If a different one is installed the existing one will need to be removed.
