Do you use Google/Microsoft for Calendar, Contact, Drive space to store all your data? Want to migrate to a self-hosted solution? Nextcloud is the way for you.
Nextcloud is a self-hosted service which can handle all your storage, Calendar, Contacts with multiple integrations/plugins to choose from. Most importantly, your data stays with you. Privately. Securely.
I will guide here the installation of Nextcloud using docker. I would be using Redis container for caching purposes, MariaDB as Database. You can always add Traefik labels to your compose file to secure your ports and expose using a reverse-proxy. Checkout my Traefik tutorial here
Installation
Nextcloud would use a database container to store all the credentials, etc. You can create a new database container or use an existing one by creating a new database for nextcloud and providing Nextcloud the access to that database. You can even use any managed/unmanaged database from any cloud provider which has less latency from your infrastructure.
You need to change with your credentials and path in above compose file. Below is the content of custom.cnf which I personally use to optimize MariaDB
Don't be alarmed by the config file, this is the default file created by MariaDB and I have added only 3/4 lines which can optimize the DB performance. Rest all the configs are kept default. You can proceed to change the config if you have knowledge on MariaDB/Mysql else can just copy paste this and you are good to go.
Here I am using port 443 to expose Nextcloud. Database and Redis are not exposed to host for security reasons. Feel free to do it if you know what you are doing.
Use docker-compose up -d to pull and run the containers. Access the Nextcloud using your https://HOST:IP Nextcloud uses a self-signed SSL Certificate and you need to proceed with SSL Prompt. Initially you would be asked to provide Database credentials, host and port. Fill them and complete the installation.
Your Nextcloud docker is up and running now. Nextcloud is a highly customizable tool which can aggregate all your workflow like mails, tasks, calendar acting as a complete suite just like Google/Microsoft Workspace. Make sure to use the Apps sections to explore and add required Apps.