I can't seem to find any cli commands for this. Is it even possible? Or does RBF need to be opted into on a per transaction basis? I would just like every transaction sent by my node to be RBF enabled.
You're looking for
You can configure
bitcoind to always create transactions that signal replaceability by using the
-walletrbf startup option or setting
walletrbf=1 in the config.
Relatedly, Bitcoin Core creates by default replaceable transactions from the GUI since v0.16.0, and will also create replaceable transactions by default when using RPCs starting with the upcoming v24.0 release (see PR 25610).
Orthogonal to your question, some people contend that all transactions should always be replaceable even if the sender did not opt-in by signaling replaceability originally. Also to be released in v24.0, PR 25353 added the
-mempoolfullrbf startup option which would configure a node to permit transactions in its mempool to be replaced per the established replacement rules without requiring the original transaction to have signaled replaceability. If sufficient node operators and miners choose to adopt to this updated mempool policy, the possibility of doing replacement without prior signaling may emerge on the network.
This is in a state of flux at the moment and could be changed in the near future (e.g. Bitcoin Core PR 25600).
There are two aspects to RBF: whether your wallet signals for RBF on transactions it constructs and broadcasts and how your node treats transactions that signal or don't signal for RBF.
Or does RBF need to be opted into on a per transaction basis?
Today for transactions that your wallet constructs and broadcasts it does need to signal for RBF, yes. Otherwise by default a Bitcoin Core node for example will not accept a RBF for that transaction. PR 25600 (open and unmerged at the time of writing) seeks to change this and allow a node to accept RBF transactions even if the original transaction wasn't signaling for RBF.
The Bitcoin Core wallet since the merge of PR 25610 (and included in the upcoming 24.0 release) signals for RBF by default. Other wallets may take a similar or a different approach.