If you have your own server (or VPS) you can use Seafile. Works well enough to sync your data.
What’s a bit problematic is integrations. For example on Android there are apps that can automatically sync data over Dropbox. Using your own solution doesn’t really work there.