Container won’t stay connected to network

Hello all. I need some assistance with t/s why OpenVPN container will not stay connected to the network. Please bear with me if I say things wrong as I’m still learning the lingo and have only just learned what a docker is and have about 1.5 months of Linux based program experience. I wasn’t sure if this was an OpenVPN issue or Portainer so I figured I’d start here.

I could have followed a great tutorial for getting this up and running today but decided to try myself because I wanted to use LinuxServers image for OpenVPN. After pulling the image I did what I thought was the basic setup for getting it running. I set up a bridge and Portainer assigns an IP and when I looks at my stacks it says its running and there is an IP and Ports showing. After about 30-60 seconds though the IP and ports disappear from the UI and there is just hyphens in their place. I have not been able to access the OpenVPN admin page because of this.

No matter how many times I go back into the Stack and scroll down to the bottom and “Join Network” it only joins for about a minute and then leaves the network.

Any help on what I’m doing wrong would be great. Thank you in advance.

Raspberry Pi4 (Raspbian Buster Lite)
Portainer (Jellyfin, OpenVPN)
Caddy Server v2

Sounds like there’s an immediate error connecting to the network and that is delayed in portainer. Can you see if there are any docker logs, or error logs if you try to attach to the network from the host with docker CLI?

Hey Mark thanks for the reply. I should have come back with a solved for this issue. I was trying to install OpenVPN-as thinking it was the same as OpenVPN. I ended up installing Wireguard vice OVPN anyways.

But since you’re here I was not able to install Wireguard via Portainer due to an error when trying to deploy the stack. It was something about the command for sysctls is invalid. Here is that portion of the yaml:

  - net.ipv4.conf.all.src_valid_mark=1

For some reason Portainer did not like it. I had to install via command line and it works fine. This came from the site. Any ideas in case I come across this again?

1 Like