if this is too technically, you can run something like umbrelOS which is sort-of a homelab environment. It has one-click install options for a range of stuff from bitcoin/lightning nodes to nostr relay - if i recall i think they are using the rust relay, but i can't remember.
also, relays are simple dumb machines. all they do is send and receive notes. If its online, and requested, then it will send or receive. if it's offline, your not should already be on several other relays.
if you're really concerned about being censored, then run more than one relay to reduce the risk of one or more going offline at any given time.
For the most part, you can connect to anyone's relay so - yeah