# Dietpi 8.2.2 Wireguard doesn't start after reboot

**URL:** https://dietpi.com/forum/t/dietpi-8-2-2-wireguard-doesnt-start-after-reboot/6415
**Category:** Troubleshooting
**Created:** [11 March 2022 21:38 UTC](https://dietpi.com/forum/t/dietpi-8-2-2-wireguard-doesnt-start-after-reboot/6415 "2022-03-11T21:38:32Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![Jappe](https://dietpi.com/forum/user_avatar/dietpi.com/jappe/32/1788_2.png) [@Jappe](https://dietpi.com/forum/u/Jappe)
#### Post date: [11 March 2022 23:19 UTC](https://dietpi.com/forum/t/dietpi-8-2-2-wireguard-doesnt-start-after-reboot/6415/6 "2022-03-11T23:19:43Z")

</div>

> [@](#):
>
> Wireguard doesn’t start automatically after a system reboot.
> 
> ```plaintext
> Root@DietPi:~# systemctl status wg-quick@wg0.service
> ● wg-quick@wg0.service - WireGuard via wg-quick(8) for wg0
> Loaded: loaded (/lib/systemd/system/wg-quick@.service; enabled; vendor preset: enabled)
> Active: failed (Result: exit-code) since Fri 2022-03-11 22:24:14 C
> ET; 5min ago
> Docs: man:wg-quick(8)
> man:wg(8)
> https://www.wireguard.com/
> https://www.wireguard.com/quickstart/
> https://git.zx2c4.com/wireguard-tools/about/src/man/wg-quick.8
> https://git.zx2c4.com/wireguard-tools/about/src/man/wg.8
> Process: 525 ExecStart=/usr/bin/wg-quick up wg0 (code=exited, status=2
> 55/EXCEPTION)
> Main PID: 525 (code=exited, status=255/EXCEPTION)
> 
> Mär 11 22:24:13 DietPi wg-quick[525]: [#] ip -6 address add fc00:9:0::1/64 dev wg0
> Mär 11 22:24:13 DietPi wg-quick[525]: [#] ip link set mtu 1420 up dev wg0
> Mär 11 22:24:13 DietPi wg-quick[525]: [#] sysctl net.ipv4.conf.wg0.forwarding=1 net.ipv4.conf.$(ip r l 0/0 | mawk '{print $5;exit}').forwarding=1
> Mär 11 22:24:13 DietPi wg-quick[525]: net.ipv4.conf.wg0.forwarding = 1
> Mär 11 22:24:13 DietPi wg-quick[525]: sysctl: separators should not be repeated: ..forwarding
> Mär 11 22:24:13 DietPi wg-quick[525]: sysctl: cannot stat /proc/sys/net/ipv4/conf//forwarding: No such file or directory
> Mär 11 22:24:13 DietPi wg-quick[525]: [#] ip link delete dev wg0
> Mär 11 22:24:14 DietPi systemd[1]: wg-quick@wg0.service:
> Main process exited, code=exited, status=255/EXCEPTION
> Mär 11 22:24:14 DietPi systemd[1]: wg-quick@wg0.service:
> Failed with result 'exit-code'.
> Mär 11 22:24:14 DietPi systemd[1]: Failed to start WireG
> uard via wg-quick(8) for wg0.
> 
> ```
> 
> Starting the service manually after the reboot works though.
> 
> Can someone gave a look, please?
> 
> Thank you  
> -T

There was a similiar issue here:

> [@Wireguard - VPN works but no longer internet connection after update to 7.9.3](https://dietpi.com/forum/t/wireguard-vpn-works-but-no-longer-internet-connection-after-update-to-7-9-3/6100/1):
>
> Hi there, Internet doesnt work on my smartphone anymore after a recent update to 7.9.3. It seems things broke after I restarted my pi a couple of days later after the update. I can SSH into my pi with active VPN but then I cannot browse the internet any more. This was working fine in the past. Any idea? What information do you need to verify the issue? Wg0.conf [Interface] Address = 10.9.0.1/24,fc00:9:0::1/64 PrivateKey = ListenPort = 51820 PostUp = sysctl net.ipv4.conf.%i.forwarding=1 ne…

What made me curious is  
net.ipv4.conf.$(ip r l 0/0 | mawk ‘{print $5;exit}’).forwarding=1  
and  
sysctl: separators should not be repeated: …forwarding  
and  
ysctl: cannot stat /proc/sys/net/ipv4/conf//forwarding: No such file or directory  
This directory doesn’t exist too on my working configuration.  
And Exit code 2 signifies invalid usage of some shell built-in command. Maybe there’s a typo somewhere in your config?  
IDK what is done in the background when updating dietpi (maybe some storage of the config and after update try to restore it, where could be a bug?)

I would try to recheck the config of wireguard OR for debug reasons (if the updater did such things I suggested), re-install wireguard and reconfigure it (maybe you save your existing keys somewhere so you don’t have to re-setup your clients)

Just thougts of a interested noob 🙂

---

_[View the full topic](https://dietpi.com/forum/t/dietpi-8-2-2-wireguard-doesnt-start-after-reboot/6415)._
