Obsidian is just a glorified markdown editor and there are some open source plugins for sync that you can self host if you want!