Install Wireguard with OMV5 - unable to find the configuration file nor the qrcode

  • Hello there,

    i followed differents guides to install and setup Wireguard through Docker/Portainer on OMV5, mainly those guides :


    The stacks seems ok


    Here is the docker compose adjusted for my setup


    I don't know if i can update OMV to a newer version because it's not a vanilla version : https://github.com/alexhorner/WD-DX4000-Installer

    I also installed the qrencode package : sudo apt install qrencode



    So my problem is that I can't find the configuration files containing the public and private keys nor generate the QR code neither...



    The Wireguard "config" folder remains empty after a successfull install...




    Even with LOG_CONFS parameters set to true, the peer/client config qr codes are not output in the docker log...

    (Sources : https://hub.docker.com/r/linuxserver/wireguard)


    Here is the log :



    I also tried the following command :

    Code
    sudo docker exec -it wireguard /app/add-peer

    but i got only an error :



    I finally had a look in the /var/lib/docker/overlay2 because some people found the qrcode there... but not me !



    Writing this post i noticed something in the log...

    Code
    The wireguard module is not active. If you believe that your kernel should have wireguard support already, make sure that it is activated via modprobe!


    Does this mean the installation is not successfull ?

    How can i generate the qrcode ?



    Thank you very much for your help !!


    G.

  • KM0201

    Approved the thread.
  • 1 - your PUID used on stack are bad.

    2 - if user 997 do not have permission to write on config folder is normal, that folder are empty.


    please create user in webGUI to use dockers and use that PUID instead, as sugest in guides:



    omv6:docker_in_omv [omv-extras.org]


    • Official Post

    To begin with, it gives me the feeling that you are mixing two procedures. Those two guides follow different methods to install Wireguard.

    If you follow the first guide, the installation is done in a container with docker.

    If you follow the second guide the installation is done on the host.

    You can do both if you want too and you'll have separate tunnels if you need to for some reason, but host commands and installs are of no use to you inside the container and vice versa.

    Regarding your container configuration, I only see the possible error mentioned by raulfg3 , and I say possible because you say that your OMV installation is special, so I don't know what the modifications of this installation will be.

    If it still doesn't work, it may be a permissions problem, check the permissions of the container on the volumes.

    If the container works correctly in the configuration volume, the folders with the files and QR of the clients should appear, as the guide says. There is no use installing qrencode on the host, the container will not use that package.

    Writing this post i noticed something in the log...

    Code
    The wireguard module is not active. If you believe that your kernel should have wireguard support already, make sure that it is activated via modprobe!

    Regarding the message you saw in the log, it is telling you that wireguard is not in the kernel. In the past, wireguard was not integrated into the linux kernel, I couldn't tell from which kernel version it was included. I'm also not sure if this can affect how the container works. So what I would do is find out if wireguard is in your kernel or not

    and in case it is not there you must add it manually, or alternatively replace the kernel with a more modern one.



  • i used "id admin" command in the shell to get PUID :

    Code
    id admin
    uid=997(admin) gid=100(users) groups=100(users),996(openmediavault-admin)

    so now i follow the guide and create a "dockerperson" profile and grant access to him (as users and sudo).


    Code
    id dockerperson
    uid=1002(dockerperson) gid=100(users) groups=100(users),1000(guillaume)


    I change the composer to


    Code
    environment:
    - PUID=1002                     #See point 1.
    - PGID=100                      #See point 1.

    and update the Stacks.


    but still nothing after a reboot and a clear cache... i will check the permissions but it seems ok to me.


    I'm not familiar with Docker, i thought i could use docker's command through the shell that why i red the second guides

    • Official Post

    I'm not familiar with Docker, i thought i could use docker's command through the shell that why i red the second guides

    omv6:docker_in_omv [omv-extras.org]

  • good change.


    now you need to:

    1 - stop container

    2 - Delete config folder , so next time that you restart container, config foder must be created with apropiate owner & permission.

    3 - restart container

  • I did it !

    after investigation, it seems that the kernel was too old (version 4.xx), i updated the kernel to a newer version (5.10.xx) and now it works !

    thanks for your help !!


    G.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!