this post was submitted on 17 Jun 2023
12 points (92.9% liked)

Selfhosted

40442 readers
811 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 2 years ago
MODERATORS
 

Hi, I wanted to host a personal Lemmy instance online (for just myself, I don't think I can take the upkeep for other users - please let me know if this is not possible) and wanted to understand how to "attach" a CDN service to it.

The idea behind doing this is that I'm in the US but I'm looking to host a server in Europe. I am looking into Cloudflare's free CDN service, but it would be great if someone could point me towards how I can configure this setup to speed up the loading time for my Lemmy instance (which is going to be far away from me, geographically).

I would also like to know about your setups and how you have hosted Lemmy.

Thanks!

you are viewing a single comment's thread
view the rest of the comments
[–] MigratingtoLemmy 1 points 1 year ago (18 children)

Thank you for your comment. I'm going through the cloudflare docs, and I have a question: why do we need to change our nameservers to Cloudflare's? I know this might sound like a noob networking question but I just can't seem to figure it out. Thanks!

[–] [email protected] 1 points 1 year ago (17 children)

No problem! You change the name servers on your registrar to cloudflare's so that when traffic goes to your.domain, cloudflare is the one that processes the dns request.

If you kept the name servers of your registrar then the traffic would just be processed by the registrar, cloudflare wouldn't even see the traffic.

Basically the name server defines your domain's current dns provider.

Hope that makes sense

[–] MigratingtoLemmy 1 points 1 year ago (16 children)

Ah, this is what I'm confused about. I get that traffic would need to flow through Cloudflare's network, but why would Cloudflare require me to change my nameserver for that? How about a CNAME alias instead? What are the technical limitations for which Cloudflare asks this of me? I just want to understand the working behind them asking me to change my nameservers.

Thanks!

[–] kinttach 1 points 1 year ago (1 children)

Setting your nameservers is simply a requirement for Cloudflare. While they theoretically could work via CNAME -- they don’t. On the other hand, their DNS is really nice and is free.

When you use their DNS, for each DNS record, you have the option to proxy traffic through Cloudflare. The proxy is what enables their CDN (and many other features such as forwarding, rewriting URLs, DDoS protection, automatic HTTPS certificates, and so on). It’s a simple on/off switch for each DNS record if you don’t want to proxy a particular host.

[–] MigratingtoLemmy 1 points 1 year ago

Thank you, that would mean that technically there is no need for cloudflare to ask one to change their default nameservers to cloudflare's nameservers - it's just that they want to run their analytics on the data transmitted in exchange for free services. I understand now. I believe some of the paid plans allow for one to use CNAMEs, which makes sense.

Thanks, now I understand. I will need to read more on the networking tech behind a Cloudflare based reverse-proxy setup (and maybe even set up my own through another VPS box someday). I'll go through the docs, thanks again!

load more comments (14 replies)
load more comments (14 replies)
load more comments (14 replies)