I don't know about self hosting, but personally i just export my settings and store it in the cloud. Go Settings > "Import/Export"
There's also a way to save the settings, and directly store it on lemmy, but...
This will break the CSS in Lemmy-UI for this account: This is a horrible abuse of the Lemmy API, but the theme field is the only available settings key that's available in the API that's able to hold arbitrary text data. To fix the broken CSS in Lemmy-UI, use the "Reset" option below to restore the theme key to a value that's valid for the Lemmy-UI CSS selector.