@sebseb01 hey, unfortunately you can't use NextCloud as the server, because NextCloud doesn't understand encryption. However, you can easily self-host EteSync, so just run them in parallel.
CLI client: there's https://github.com/jrvarma/icalcli from a member of the community. We haven't tried it ourselves, but maybe you can give it a go?
Generic Mastodon instance hosted by the FairSocialNet association.