The important thing is to understand that there is Firefox Account and Firefox Sync. You can self host both of them, self hosting Sync is very easy, Accounts is very difficult. Sync depends on Accounts. But you can use Mozillas Accounts and your own Sync. This way you use their server to log into your own sync server. Your passwords, history, etc. are only stored on your own Sync server.
Thank you :) Will look at it, right now I'm happy with selfhosted linkding, but I really miss the native bookmarking way of firefox (tags, folder, subfolders, keywords.)