Hi guys, would be happy to receive some input on my current problem. I spun up my own Lemmy instance yesterday using the ansible playbook on newly set up VPS with it’s own IPv4. Since I also had an unused domain I choose to use it exclusively for Lemmy. I therefore set the domain in the hosts file to exactly that one. I created the follwing DNS entries in Cloudflare for it:

  • A Record with name www pointing towards the ip
  • A CName pointing the domain without subdomain towards the www.subdomain.de thing

Both without a activating their proxies. As soon as I’m activating their proxies my instances becomes unreachable and if I’m calling www.my-domain.de I’m seeing an Nginx error page. Is there a smart way anyone of you knows how I could setup my dns records in a way that I’m able to use Cloudflare proxies to kinda encapsulate my vps a bit more?

EDIT: I got it solved, first on, I was most probably an idiot when setting the SSL settings. I could be possible that I changed them for the wrong domain. So in the end I did two things. First on I changed the CNAME thing into another A record pointing directly towards the server ip. I suspect this was not the root cause. Because after changing the DNS settings I discovered that again the SSL settings were set to Flexible this is basically a setting where Cloudflare assumes you are somehow unable to get your own SSL certificate on your server and therefore only the traffic between the users browser and them is encrypted but the traffic towards your server is not. That was most probably the main reason since this should cause an infinite forwarding of Cloudflare trying http but my server was redirecting them to https (for more info see here). I set it to Full (strict) meaning now all the traffic is encrypted using my certificate.

After both changes it works now, and when pinging the url some random Cloudflare IP shows up and “my” ip is hidden.

Old DNS settings: Old DNS settings

New DNS settings: New DNS settings

EDIT 1: Changed the title from xyz (SOLVED) to [SOLVED] xyz

Self Hosted - Self-hosting your services.
!selfhost@lemmy.ml
Create a post

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

  • No harassment
  • crossposts from c/Open Source & c/docker & related may be allowed, depending on context
  • Video Promoting is allowed if is within the topic.
  • No spamming.
  • Stay friendly.
  • Follow the lemmy.ml instance rules.
  • Tag your post. (Read under)

Important

Beginning of January 1st 2024 this rule WILL be enforced. Posts that are not tagged will be warned and if not fixed within 24h then removed!

  • Lemmy doesn’t have tags yet, so mark it with [Question], [Help], [Project], [Other], [Promoting] or other you may think is appropriate.

Cross-posting

If you see a rule-breaker please DM the mods!

  • 1 user online
  • 10 users / day
  • 30 users / week
  • 66 users / month
  • 257 users / 6 months
  • 1 subscriber
  • 349 Posts
  • 1.85K Comments
  • Modlog