Couple questions re: DNS and domain names

So I’m launching a Discourse forum soon and the main subject matter is something that might be considered conspiracy theory to some. (It’s for victims of gangstalking) As such it’s not outside the realm of possibility to imagine that the site could be attacked by a well-funded org (Like a DDOS or take-down order or some kind of DNS or BGP shenanigans or whatever. Humor me please).

I’m trying to get a better mental picture of the way the entire system works.

So Discourse offers the free domain–a .diy domain, and I purchased my own domain from Porkbun. I believe Porkbun uses Cloudflare for CDN stuff. (Is Discourse folks only setting a A record here? Or would it be NS record? Is that all that’s needed?)

So after I spin up my VPS, I need to log in to my Porkbun account and point their nameservers to the IP address of my VPS, correct?

So if I’m using the .diy domain for testing, or practice, or whatever, just using it for time-being, what happens to that .diy domain after the Porkbun DNS setting percolates out to the world and starts using my custom domain? Could a browser use either domain, like they both would work?

I’m wondering if it’s possible to utilize both domains? Like keep the .diy one as a backup? Like for some (far-fetched) scenario where the VPS hosting provider (VULTR) takes down my IP address for whatever reason. (Ignoring the legality/likelyhood.)

So in my (weak) mental picture of the system, could it fall back to the original domain in that case? Like for to minimize downtime? Or does it not work like that?

Thank you, in advance, for indulging (and sorry it’s so long).

Okay so this is a lot more than Just DNS that you’re touching on and I’m also confused about where you’re planning on hosting.

You mention the free domains offered with Discourse but you only get that if you host on Discourse itself. But then you mention a VPS and getting a different domain. These things conflict with one another. If you’re purchasing a services with Discourse, that includes hosting, you can only use a custom domain on a pro account.

If you want to use a VPS to self-host, you do not need to pay Discourse at all. The software is free to download and install on your own in which case you do not need a paid account and you would not be provided a free domain.

Or, you’re trying to do a secret third thing where you pay for the service, set it up with them, then export the database to your VPS for its final home.

Because all of these things have entirely different setups, I cannot give other advice or instruction until I know which of these things you’re trying to do.

seconding armaina’s points above, the methods you mentioned are at odds with each other.

On a high level, the things you need to host a discourse forum are a domain name and a computer. A VPS is a good solution for this because it will have a dedicated IP address that is publicly accessibly, which avoids the headache of hosting this on ayour own machine. You add an A (or AAAA for IPv6) record in porkbun to point your domain to the IP address assigned to your VPS, then run the Discourse installer on the VPS, and it should be operable from there. The simpler approach is to pay Discourse to host your forum for you, which will provide you with both of these things without nearly as much sysadmin knowledge required.

In either case, you’re subject to the terms of service of your provider, as well as the laws of the country in which they operate. Your provider owns the IP address assigned to your VPS and can revoke it at any time. In addition to that, being resilient to dedicated, well-funded attackers is well above our (and your) paygrade. Billion dollar companies spend enormous amounts of money to fend off hackers every day and still fall victim to them. If your forum is going to immediately be targeted by well-funded attackers, my advice would be to not host it. You will be in a constant game of cat and mouse in which the other party will always have the upper hand.