this post was submitted on 24 Oct 2023
41 points (93.6% liked)

Selfhosted

60665 readers
369 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.

  8. AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 3 years ago
MODERATORS
 

Hi, I moved this year to another city, because my internet provider didn't give me a dedicated ipv4 address I can't use a dyndns like duckdns. Another thing to mention is, that I have a dslite tunnel. So I can't set up dyndns...

So my recent setup is a truenas server sitting under my desk. This is connected via cloudflared to the cloudflare tunnel. There I have my services like seafile or nextcloud configured. They are all pointing to a traefik instance that routes the traffic to the right container.

So to summarize what I have:

  • Truenas server
    • multiple services
  • dslite tunnel
  • own domain
  • Cloudflare tunnel
  • v-server
    • Nginx
    • docker

To visualize the route the traffic is going

Internet - cloudflare tunnel - cloudfared docker - traefik docker - service (nextcloud) docker

So I want to setup something on my v-server that routes the traffic to my homeserver (truenas)

Internet - DNS (cloudflare) - v-server - (magic docker service on truenas) - traefik docker - service (nextcloud) docker

Does someone have an idea how to solve this?

you are viewing a single comment's thread
view the rest of the comments
[–] cron@feddit.de 12 points 2 years ago (1 children)

My suggestion would be to setup a VPN service in your publicly available v-server. The most suggested solution is wireguard.

Then you can connect your truenas to that VPN and make it accessible, maybe via nginx.

The traffic flow would be:

nginx on v-server --(wireguard)--> traefik --> Nextcloud
[–] Dave811@lemmy.today 1 points 2 years ago (2 children)

That's a good point. But that's also the point where my tinkering won't help me... Do you have a writeup or a yt video where nginx points to the wireguard VPN? Another question. If I set up the wireguard tunnel, how can I just route the traffic from traefik?

[–] cron@feddit.de 4 points 2 years ago (1 children)

I found this writeup and it looks correct, but I have not tested it.

The author posted a nice graphic that shows the idea:

[–] lemmyvore@feddit.nl 0 points 2 years ago (1 children)

I'm not sure I understand why they need two Caddy servers. The first one should be a simple port forward, no need for a proxy forward. Unless they want to do something with the connections at application level, but it sounds like they simply forward them as-is.

[–] cron@feddit.de 2 points 2 years ago

You need two caddy servers if there are other websites on the vserver that will use port 80/443. If not, port forwarding (eg. with iptables) will work.

[–] CriticalMiss@lemmy.world 1 points 2 years ago

Basically once you have WG set up, you will have an additional interface with it's own IP in "ifconfig". At that point all the ports are available and you can just point your reverse proxy to them (sorry I'm an NGINX user, I have no idea how Traefik works).

Additionally don't forget to add keep-alive in your WG config so that the service doesn't shut off once traffic stops going between both servers.