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

Selfhosted

40137 readers
627 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
 

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
[–] themoonisacheese@sh.itjust.works 4 points 1 year ago (2 children)

Adding to the hetzner comment: I think AWS has free very crappy servers. If you're a student, the Github Student Pack has free digitalocen credits.

In theory, cloud flare could pre-cache content before you request it. Unfortunately, that would require significant effort from Lemmy to let cloud flare know that there is new content, and then it would be up to cloud flare to decide to cache it for 1 client. Both these things aren't happening.

CF needs to dynamically control where requests for your server end up, and for that they need to be the authoritative DNS for it.

Cloud flare indeed acts as a reverse proxy (because that's how CDNs work), but unlike a self-hosted reverse proxy, theirs will be on their servers, so will not have much more more access to your network than yourself outside of it. I think they have some sort of offering to actually give your more access, but A) idk if that's free and B) that requires an always-on computer in your local network, at which point why not just host your Lemmy instance on it?

[–] obviouspornalt@lemmynsfw.com 2 points 1 year ago (1 children)

Another option for very cheap VM, storage, bandwidth: Oracle Free Forever

https://www.oracle.com/cloud/free/

Wasn't aware of that since I both have my own server and happen to despise oracle but good for people who need cheap compute!

[–] MigratingtoLemmy@lemmy.world 1 points 1 year ago

Thank you for your comment!

I am opting for the very low cost providers like Racknerd and CloudServer (see: $1 VPS offerings) - which host most of their servers outside the US.

Thank you for the explanation, I would like to know more about the "effort" from Lemmy's side to let Cloudflare cache content before it is requested.

CF needs to dynamically control where requests for your server end up, and for that they need to be the authoritative DNS for it.

Could you explain this point a bit more? Why would Cloudflare need to control DNS for my domain? How is this linked to them proxying my traffic? I've been trying to understand this for a bit now - how does having CF's own nameservers let CF proxy my traffic?

I was also considering hosting Lemmy in my own network, but I can't seem to find any guides on which ports to forward - if I could just find a decent guide on the networking required to host Lemmy I might even do it on-prem.

Thanks a bunch!