this post was submitted on 15 Aug 2023
10 points (91.7% liked)

Selfhosted

39987 readers
646 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:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

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

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

I know that I can use 3rd party services to set up a tunnel, like Cloudflare, but I'd like to implement this myself.

I feel like every time I research this question I find all kinds of blogs / form posts across the timescape on the topic, and I'm just looking for whatever might be the most current or recommended best method of configuring a VPS tunnel. I'm behind a CG-Nat which is why I want to set one up.

If you've done this recently yourself, where did you get your info from?

Thanks!

you are viewing a single comment's thread
view the rest of the comments
[–] tvcvt@lemmy.ml 3 points 1 year ago

Hey, it definitely doesn’t have to be just a subdomain. You can have a record for example.com point to your VPS’s IP at the same time you have www.example.com, nextcloud.example.com, and jellyfin.example.com. Have as many services and domains as you like and the reverse proxy will direct the traffic to the correct local server based on the domain name.

One way you can do this flexibly is to have two records in your DNS: an A record pointing example.com to your VPS and a CNAME pointing *.example.com to example.com. That way, any subdomain will go to your VPS and you only have to add new services in the reverse proxy.