Nextcloud docs - nextcloud and database

The absolute minimum of a nextcloud installation is nextcloud itself and a database.

Create a new model and deploy nextcloud and a database:

juju add-model my-nextcloud
juju model-config default-series=focal
juju deploy postgresql
juju deploy nextcloud
juju relate nextcloud:db postgresql:db

... wait for deployment to settle.
Then, visit http://<yourip>

To get the admin password:

juju run-action nextcloud/0 get-admin-password --wait

Make sure to note it and change it after first login, since this action will only work once.

Next steps:

You can expand the deployment with haproxy (to provide ssl), redis (for cache) and possibly a persistent or shared storage.