Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

agnos.is Forums

  1. Home
  2. Selfhosted
  3. What are your VPN recommendations for accessing self-hosted applications from the outside?

What are your VPN recommendations for accessing self-hosted applications from the outside?

Scheduled Pinned Locked Moved Selfhosted
selfhosted
89 Posts 60 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W [email protected]

    Hello,

    Some time ago, I started self-hosting applications, but only on my local network. So far, it's working fine, but I can't access them as soon as I go outside (which is completely normal).

    For the past few days I've been looking for a relatively secure way of accessing my applications from outside.

    I don't need anyone but myself to have access to my applications, so from what I've understood, it's not necessarily useful to set up a reverse-proxy in that case and it would be simpler to set up a VPN.

    From what I've seen, Wireguard seems to be a good option. At first glance, I'd have to install it on the machine containing my applications, port-forward the Wireguard listening port and configure my other devices to access this machine through Wireguard

    However, I don't have enough hindsight to know whether this is a sufficient layer of security to at least prevent bots from accessing my data or compromising my machine.

    I've also seen Wireguard-based solutions like Tailscale or Netbird that seem to make configuration easier, but I have a hard time knowing if it would really be useful in my case (and I don't really get what else they are doing despite simplifying the setup).

    Do you have any opinions on this? Are there any obvious security holes in what I've said? Is setting up a VPN really the solution in my case?

    Thanks in advance for your answers!

    L This user is from outside of this forum
    L This user is from outside of this forum
    [email protected]
    wrote last edited by
    #61

    There's no magic bullet here. If you want good defense against bots you should use fail2ban and/or crowdsec. Geoblocking is also worth looking into. You will always have to open a port if you are selfhosting a VPN and will need to take aforementioned steps (or alternatives) to secure it. I believe Tailscale is a very good alternative for people who don't have time to do this as it does not (to the best of my knowledge) require you to expose a port.

    I use Netbird (open source networking software from a German company) as it integrates well with Authentik and allows me to use the same SSO for VPN and most of my other services. Setting it up with Authentik and Nginx is a bit complicated but very well documented in my opinion. I do not have a positive experience of the official Android client but Jetbird is a nice alternative. Setting up DNS servers and network routes through peers is quite easy. Enrollment is also a breeze due to the Authentik integration.

    oyzmo@lemmy.worldO 1 Reply Last reply
    0
    • maxwellfire@lemmy.worldM [email protected]

      I like zerotier over wireguard because it's one layer lower. So anything that uses Ethernet frames can be routed over it like it was a network switch plugged into your computer. This is probably why mdns works.

      skankhunt42@lemmy.caS This user is from outside of this forum
      skankhunt42@lemmy.caS This user is from outside of this forum
      [email protected]
      wrote last edited by [email protected]
      #62

      Do you test public WiFi with ZeroTier at all?

      I ask because there's a few public networks where WG won't connect and I'm trying to find ways around it. I could always use cell data but this is more fun to me.

      maxwellfire@lemmy.worldM 1 Reply Last reply
      1
      • W [email protected]

        Hello,

        Some time ago, I started self-hosting applications, but only on my local network. So far, it's working fine, but I can't access them as soon as I go outside (which is completely normal).

        For the past few days I've been looking for a relatively secure way of accessing my applications from outside.

        I don't need anyone but myself to have access to my applications, so from what I've understood, it's not necessarily useful to set up a reverse-proxy in that case and it would be simpler to set up a VPN.

        From what I've seen, Wireguard seems to be a good option. At first glance, I'd have to install it on the machine containing my applications, port-forward the Wireguard listening port and configure my other devices to access this machine through Wireguard

        However, I don't have enough hindsight to know whether this is a sufficient layer of security to at least prevent bots from accessing my data or compromising my machine.

        I've also seen Wireguard-based solutions like Tailscale or Netbird that seem to make configuration easier, but I have a hard time knowing if it would really be useful in my case (and I don't really get what else they are doing despite simplifying the setup).

        Do you have any opinions on this? Are there any obvious security holes in what I've said? Is setting up a VPN really the solution in my case?

        Thanks in advance for your answers!

        T This user is from outside of this forum
        T This user is from outside of this forum
        [email protected]
        wrote last edited by
        #63

        I used wireguard self hosted for a bit but my work network is pretty locked down and I couldn't find a UDP port that wasn't blocked. How are you guys setting up wireguard in your home network? Or is it better to host it on a cloud VM?

        I'm using tailscale right now because it punches through every firewall but I don't like using external providers and I'm worried it will eventually enshittify. I have a cloudflare domain but I can't really use any UDP port for my VPN as it's blocked.

        jonathantrott@mastodon.auJ S 2 Replies Last reply
        2
        • T [email protected]

          I used wireguard self hosted for a bit but my work network is pretty locked down and I couldn't find a UDP port that wasn't blocked. How are you guys setting up wireguard in your home network? Or is it better to host it on a cloud VM?

          I'm using tailscale right now because it punches through every firewall but I don't like using external providers and I'm worried it will eventually enshittify. I have a cloudflare domain but I can't really use any UDP port for my VPN as it's blocked.

          jonathantrott@mastodon.auJ This user is from outside of this forum
          jonathantrott@mastodon.auJ This user is from outside of this forum
          [email protected]
          wrote last edited by
          #64

          @Tinkerer @quokka1 This project might help? I haven’t tried it yet, but it's on my list!

          https://github.com/RoliSoft/Obfuscation-Tunnel

          T 1 Reply Last reply
          0
          • phase@lemmy.8th.worldP [email protected]

            I thought I would be the only one to try this. Would you share more details on your setup? I am interested because to me Wireguard is in the kernel so how could it be in a container.

            vanilla_puddinfudge@infosec.pubV This user is from outside of this forum
            vanilla_puddinfudge@infosec.pubV This user is from outside of this forum
            [email protected]
            wrote last edited by [email protected]
            #65

            Oh yeah.
            https://hub.docker.com/r/linuxserver/wireguard

            Basically, docker can and does create network devices. It's as easy for it to create wg0's as it is to create networks for your other docker containers. If you're going to run wireguard and docker, you're better off to let docker handle the network routing and just run one of the various containers out there to stop them from fighting. That particular container is more general. You can run it client or server. Wg-easy, I believe is server-only, or even hide it inside other containers like docker-qbittorrent-wireguard, where it just hangs out and connects to whatever .conf you give it.

            I did the whole thing in my early days selfhosting where I installed wireguard, docker, some apps, rebooted, everything breaks.

            Install a wireguard container, configure it as you would, your apps, reboot... it still works, because docker isn't conflicting with native wg-quick. It's either this, or untangle and make an iptables setup permanent so when you reboot, it doesn't break again.

            1 Reply Last reply
            1
            • W [email protected]

              Hello,

              Some time ago, I started self-hosting applications, but only on my local network. So far, it's working fine, but I can't access them as soon as I go outside (which is completely normal).

              For the past few days I've been looking for a relatively secure way of accessing my applications from outside.

              I don't need anyone but myself to have access to my applications, so from what I've understood, it's not necessarily useful to set up a reverse-proxy in that case and it would be simpler to set up a VPN.

              From what I've seen, Wireguard seems to be a good option. At first glance, I'd have to install it on the machine containing my applications, port-forward the Wireguard listening port and configure my other devices to access this machine through Wireguard

              However, I don't have enough hindsight to know whether this is a sufficient layer of security to at least prevent bots from accessing my data or compromising my machine.

              I've also seen Wireguard-based solutions like Tailscale or Netbird that seem to make configuration easier, but I have a hard time knowing if it would really be useful in my case (and I don't really get what else they are doing despite simplifying the setup).

              Do you have any opinions on this? Are there any obvious security holes in what I've said? Is setting up a VPN really the solution in my case?

              Thanks in advance for your answers!

              S This user is from outside of this forum
              S This user is from outside of this forum
              [email protected]
              wrote last edited by
              #66

              If your traffic is pretty low, rent a VPS for $5/month or whatever and set up a Wireguard server on it, have your devices maintain a connection to it (search keepalive for Wireguard), and set up HAProxy to do SNI-based routing for your various subdomains to the appropriate device.

              Benefits:

              • you control everything, so switching to a new provider is as simple as copying configs instead of reconfiguring everything
              • most VPN companies only route traffic going out, not in; you can probably find one that does, but it probably costs more than the DIY option
              • easy to share with others, just give a URL

              Downsides:

              • more complicated to configure
              • bandwidth limitations

              If you only need access on devices you control, something like Tailscale could work.

              Benefits:

              • very simple setup - Tailscale supports a ton of things
              • potentially free, depending on your needs

              Downsides:

              • no public access, so you'd need to configure every device that wants to access it
              • you don't control it, so if Tailscale goes evil, you'd need to change everything

              I did the first and it works well.

              D 1 Reply Last reply
              2
              • W [email protected]

                Hello,

                Some time ago, I started self-hosting applications, but only on my local network. So far, it's working fine, but I can't access them as soon as I go outside (which is completely normal).

                For the past few days I've been looking for a relatively secure way of accessing my applications from outside.

                I don't need anyone but myself to have access to my applications, so from what I've understood, it's not necessarily useful to set up a reverse-proxy in that case and it would be simpler to set up a VPN.

                From what I've seen, Wireguard seems to be a good option. At first glance, I'd have to install it on the machine containing my applications, port-forward the Wireguard listening port and configure my other devices to access this machine through Wireguard

                However, I don't have enough hindsight to know whether this is a sufficient layer of security to at least prevent bots from accessing my data or compromising my machine.

                I've also seen Wireguard-based solutions like Tailscale or Netbird that seem to make configuration easier, but I have a hard time knowing if it would really be useful in my case (and I don't really get what else they are doing despite simplifying the setup).

                Do you have any opinions on this? Are there any obvious security holes in what I've said? Is setting up a VPN really the solution in my case?

                Thanks in advance for your answers!

                M This user is from outside of this forum
                M This user is from outside of this forum
                [email protected]
                wrote last edited by
                #67

                Tailscale. You can make a free account and they have clients for most things. If you want to self host, Headscale.

                1 Reply Last reply
                4
                • F [email protected]

                  Run WireGuard on some home machine. (Does not need to be the machine the app you want to access is hosted on.)

                  Run WireGuard on your road warrior system.

                  There is no step 3.

                  I'm doing this right now from halfway around the world from my house and it's been great. Been using iPhone, iPad, and macOS clients connected to linuxserver/WireGuard docker container. Been doing this on many WiFi networks and 5G, no difference.

                  0 This user is from outside of this forum
                  0 This user is from outside of this forum
                  [email protected]
                  wrote last edited by
                  #68

                  Doesn't that need like a static IP address, port forwarding and dealing all kind of network annoyances?

                  Recommending wireguard to people feels like recommending Arch to first time Linux users.

                  C 1 Reply Last reply
                  0
                  • T [email protected]

                    I used wireguard self hosted for a bit but my work network is pretty locked down and I couldn't find a UDP port that wasn't blocked. How are you guys setting up wireguard in your home network? Or is it better to host it on a cloud VM?

                    I'm using tailscale right now because it punches through every firewall but I don't like using external providers and I'm worried it will eventually enshittify. I have a cloudflare domain but I can't really use any UDP port for my VPN as it's blocked.

                    S This user is from outside of this forum
                    S This user is from outside of this forum
                    [email protected]
                    wrote last edited by
                    #69

                    I got a VPS because I'm behind CGNAT, and then configured WireGuard on the server and HAProxy to proxy requests to my devices.

                    It works well for me.

                    1 Reply Last reply
                    0
                    • 0 [email protected]

                      Doesn't that need like a static IP address, port forwarding and dealing all kind of network annoyances?

                      Recommending wireguard to people feels like recommending Arch to first time Linux users.

                      C This user is from outside of this forum
                      C This user is from outside of this forum
                      [email protected]
                      wrote last edited by
                      #70

                      You don't need a static IP address, but you do need a public IP address. You can use dynamic DNS to avoid having to keep track of your IP address. FreeDNS will work fine for a basic setup.

                      Wireguard is one of the easiest VPN servers to use. If you're not using your ISP's router, it may even have Wireguard built in.

                      1 Reply Last reply
                      2
                      • nfreak@lemmy.mlN [email protected]

                        I went with a Racknerd debian 12 box, DigitalOcean is a bit overpriced for what you get. There's a whole list of recommendations in Pangolin's wiki iirc

                        S This user is from outside of this forum
                        S This user is from outside of this forum
                        [email protected]
                        wrote last edited by
                        #71

                        Thank you, might give it a shot.

                        1 Reply Last reply
                        0
                        • skankhunt42@lemmy.caS [email protected]

                          Do you test public WiFi with ZeroTier at all?

                          I ask because there's a few public networks where WG won't connect and I'm trying to find ways around it. I could always use cell data but this is more fun to me.

                          maxwellfire@lemmy.worldM This user is from outside of this forum
                          maxwellfire@lemmy.worldM This user is from outside of this forum
                          [email protected]
                          wrote last edited by
                          #72

                          Yeah it's worked everywhere I've tested. But that's only really been airport WiFi, so I'm not sure it's indicative of it working in general. It's easy enough to setup for testing that it's probably worth a shot

                          1 Reply Last reply
                          1
                          • S [email protected]

                            If your traffic is pretty low, rent a VPS for $5/month or whatever and set up a Wireguard server on it, have your devices maintain a connection to it (search keepalive for Wireguard), and set up HAProxy to do SNI-based routing for your various subdomains to the appropriate device.

                            Benefits:

                            • you control everything, so switching to a new provider is as simple as copying configs instead of reconfiguring everything
                            • most VPN companies only route traffic going out, not in; you can probably find one that does, but it probably costs more than the DIY option
                            • easy to share with others, just give a URL

                            Downsides:

                            • more complicated to configure
                            • bandwidth limitations

                            If you only need access on devices you control, something like Tailscale could work.

                            Benefits:

                            • very simple setup - Tailscale supports a ton of things
                            • potentially free, depending on your needs

                            Downsides:

                            • no public access, so you'd need to configure every device that wants to access it
                            • you don't control it, so if Tailscale goes evil, you'd need to change everything

                            I did the first and it works well.

                            D This user is from outside of this forum
                            D This user is from outside of this forum
                            [email protected]
                            wrote last edited by
                            #73

                            I would not recommend relying on Tailscale. They have been soliciting a lot of venture capital lately and are probably going to go for an IPO sooner or later. I would not put a lot of trust in that company. The investors are going to want their money.

                            S 1 Reply Last reply
                            3
                            • L [email protected]

                              There's no magic bullet here. If you want good defense against bots you should use fail2ban and/or crowdsec. Geoblocking is also worth looking into. You will always have to open a port if you are selfhosting a VPN and will need to take aforementioned steps (or alternatives) to secure it. I believe Tailscale is a very good alternative for people who don't have time to do this as it does not (to the best of my knowledge) require you to expose a port.

                              I use Netbird (open source networking software from a German company) as it integrates well with Authentik and allows me to use the same SSO for VPN and most of my other services. Setting it up with Authentik and Nginx is a bit complicated but very well documented in my opinion. I do not have a positive experience of the official Android client but Jetbird is a nice alternative. Setting up DNS servers and network routes through peers is quite easy. Enrollment is also a breeze due to the Authentik integration.

                              oyzmo@lemmy.worldO This user is from outside of this forum
                              oyzmo@lemmy.worldO This user is from outside of this forum
                              [email protected]
                              wrote last edited by
                              #74

                              Netbird is very nice and easy to use. Only downside is that the iOS app drains battery like crazy 😞

                              1 Reply Last reply
                              1
                              • W [email protected]

                                Hello,

                                Some time ago, I started self-hosting applications, but only on my local network. So far, it's working fine, but I can't access them as soon as I go outside (which is completely normal).

                                For the past few days I've been looking for a relatively secure way of accessing my applications from outside.

                                I don't need anyone but myself to have access to my applications, so from what I've understood, it's not necessarily useful to set up a reverse-proxy in that case and it would be simpler to set up a VPN.

                                From what I've seen, Wireguard seems to be a good option. At first glance, I'd have to install it on the machine containing my applications, port-forward the Wireguard listening port and configure my other devices to access this machine through Wireguard

                                However, I don't have enough hindsight to know whether this is a sufficient layer of security to at least prevent bots from accessing my data or compromising my machine.

                                I've also seen Wireguard-based solutions like Tailscale or Netbird that seem to make configuration easier, but I have a hard time knowing if it would really be useful in my case (and I don't really get what else they are doing despite simplifying the setup).

                                Do you have any opinions on this? Are there any obvious security holes in what I've said? Is setting up a VPN really the solution in my case?

                                Thanks in advance for your answers!

                                R This user is from outside of this forum
                                R This user is from outside of this forum
                                [email protected]
                                wrote last edited by
                                #75

                                I use a mixture of tailscale and zerotier. Both are pretty powerful.

                                1 Reply Last reply
                                1
                                • W [email protected]

                                  Hello,

                                  Some time ago, I started self-hosting applications, but only on my local network. So far, it's working fine, but I can't access them as soon as I go outside (which is completely normal).

                                  For the past few days I've been looking for a relatively secure way of accessing my applications from outside.

                                  I don't need anyone but myself to have access to my applications, so from what I've understood, it's not necessarily useful to set up a reverse-proxy in that case and it would be simpler to set up a VPN.

                                  From what I've seen, Wireguard seems to be a good option. At first glance, I'd have to install it on the machine containing my applications, port-forward the Wireguard listening port and configure my other devices to access this machine through Wireguard

                                  However, I don't have enough hindsight to know whether this is a sufficient layer of security to at least prevent bots from accessing my data or compromising my machine.

                                  I've also seen Wireguard-based solutions like Tailscale or Netbird that seem to make configuration easier, but I have a hard time knowing if it would really be useful in my case (and I don't really get what else they are doing despite simplifying the setup).

                                  Do you have any opinions on this? Are there any obvious security holes in what I've said? Is setting up a VPN really the solution in my case?

                                  Thanks in advance for your answers!

                                  S This user is from outside of this forum
                                  S This user is from outside of this forum
                                  [email protected]
                                  wrote last edited by [email protected]
                                  #76

                                  I self-host various applications and have been really happy with Wireguard. After watching just how hard my firewall gets hammered when I have any detectable open ports I finally shut down everything else. The WG protocol is designed to be as silent as possible and doesn't respond to remote traffic unless it receives the correct key, and the open WG port is difficult to detect when the firewall is configured correctly.

                                  Everything - SSH, HTTP, VNC and any other protocol it must first go through my WG tunnel and running it on an OpenWRT router instead of a server means if the router is working, WG is working. Using Tasker on Android automatically brings the tunnel up whenever I leave my house and makes everything in my home instantly accessible no matter what I'm doing.

                                  Another thing to consider is there's no corporation involved with WG use. So many companies have suddenly decided to start charging for "free for personal use" products and services, IMO it has made anything requiring an account worth avoiding.

                                  S T 2 Replies Last reply
                                  3
                                  • S [email protected]

                                    I self-host various applications and have been really happy with Wireguard. After watching just how hard my firewall gets hammered when I have any detectable open ports I finally shut down everything else. The WG protocol is designed to be as silent as possible and doesn't respond to remote traffic unless it receives the correct key, and the open WG port is difficult to detect when the firewall is configured correctly.

                                    Everything - SSH, HTTP, VNC and any other protocol it must first go through my WG tunnel and running it on an OpenWRT router instead of a server means if the router is working, WG is working. Using Tasker on Android automatically brings the tunnel up whenever I leave my house and makes everything in my home instantly accessible no matter what I'm doing.

                                    Another thing to consider is there's no corporation involved with WG use. So many companies have suddenly decided to start charging for "free for personal use" products and services, IMO it has made anything requiring an account worth avoiding.

                                    S This user is from outside of this forum
                                    S This user is from outside of this forum
                                    [email protected]
                                    wrote last edited by
                                    #77

                                    If you use Tasker only as VPN switch you could have a look at WG Tunnel from zaneschepke on Github. It has a built in function to switch to the tunnel when your local WIFI is not connected.

                                    https://github.com/zaneschepke/wgtunnel

                                    1 Reply Last reply
                                    3
                                    • W [email protected]

                                      Hello,

                                      Some time ago, I started self-hosting applications, but only on my local network. So far, it's working fine, but I can't access them as soon as I go outside (which is completely normal).

                                      For the past few days I've been looking for a relatively secure way of accessing my applications from outside.

                                      I don't need anyone but myself to have access to my applications, so from what I've understood, it's not necessarily useful to set up a reverse-proxy in that case and it would be simpler to set up a VPN.

                                      From what I've seen, Wireguard seems to be a good option. At first glance, I'd have to install it on the machine containing my applications, port-forward the Wireguard listening port and configure my other devices to access this machine through Wireguard

                                      However, I don't have enough hindsight to know whether this is a sufficient layer of security to at least prevent bots from accessing my data or compromising my machine.

                                      I've also seen Wireguard-based solutions like Tailscale or Netbird that seem to make configuration easier, but I have a hard time knowing if it would really be useful in my case (and I don't really get what else they are doing despite simplifying the setup).

                                      Do you have any opinions on this? Are there any obvious security holes in what I've said? Is setting up a VPN really the solution in my case?

                                      Thanks in advance for your answers!

                                      H This user is from outside of this forum
                                      H This user is from outside of this forum
                                      [email protected]
                                      wrote last edited by
                                      #78

                                      I use OpenVPN. It’s pretty easy. You set it up with docker, download the client.ovpn file, then turn off port 80 (only needed for downloading that file). Now you can take that file and use it all of your devices to connect.

                                      1 Reply Last reply
                                      0
                                      • W [email protected]

                                        Hello,

                                        Some time ago, I started self-hosting applications, but only on my local network. So far, it's working fine, but I can't access them as soon as I go outside (which is completely normal).

                                        For the past few days I've been looking for a relatively secure way of accessing my applications from outside.

                                        I don't need anyone but myself to have access to my applications, so from what I've understood, it's not necessarily useful to set up a reverse-proxy in that case and it would be simpler to set up a VPN.

                                        From what I've seen, Wireguard seems to be a good option. At first glance, I'd have to install it on the machine containing my applications, port-forward the Wireguard listening port and configure my other devices to access this machine through Wireguard

                                        However, I don't have enough hindsight to know whether this is a sufficient layer of security to at least prevent bots from accessing my data or compromising my machine.

                                        I've also seen Wireguard-based solutions like Tailscale or Netbird that seem to make configuration easier, but I have a hard time knowing if it would really be useful in my case (and I don't really get what else they are doing despite simplifying the setup).

                                        Do you have any opinions on this? Are there any obvious security holes in what I've said? Is setting up a VPN really the solution in my case?

                                        Thanks in advance for your answers!

                                        D This user is from outside of this forum
                                        D This user is from outside of this forum
                                        [email protected]
                                        wrote last edited by
                                        #79

                                        Tailscale. You don't need to open up ports + you can set up exit nodes, which are useful if you're sailing the seven seas.

                                        B 1 Reply Last reply
                                        0
                                        • D [email protected]

                                          I would not recommend relying on Tailscale. They have been soliciting a lot of venture capital lately and are probably going to go for an IPO sooner or later. I would not put a lot of trust in that company. The investors are going to want their money.

                                          S This user is from outside of this forum
                                          S This user is from outside of this forum
                                          [email protected]
                                          wrote last edited by
                                          #80

                                          Yeah, that's the "you don't control it" angle here. There are alternatives, but you'll have to do a fair amount of work to switch vs something you do control (i.e. to switch to a different VPS, just copy configs and change the host config on each client, everything else is the same).

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups