I'm surprised no one here mentioned Seafile as a competitor. They are completely open source => from client to server. I host my own for myself and my family for like a year now and it's super smooth[1]. I have the system setup with an actual certificate. It also allows you to enable client side encryption[2].
[1]: the deployment process is incompatible with how i manage my servers, so that was a pain, but mostly figured out.
[2]: encryption may leak some information, but it is better than nothing.
[1]: the deployment process is incompatible with how i manage my servers, so that was a pain, but mostly figured out. [2]: encryption may leak some information, but it is better than nothing.