nextcloud

# install nextcloud with snap
snap install nextcloud
 
sudo snap enable nextcloud
sudo snap disable nextcloud
 
# set domain
nextcloud.occ config:system:set trusted_domains 0 --value="nextcloud.example.com"

User
https://docs.nextcloud.com/server/15/admin_manual/configuration_server/occ_command.html#file-operations-label

# create user
export OC_PASS=pass1234
nextcloud.occ user:add --display-name "Foo Bar" --group=bar --password-from-env foo

Email

# create email
nextcloud.occ mail:account:create fobr "Foo Bar" foo.bar@example.com imap.example.com 143 off foo.bar pass1234 smtp.example.com 25 off foo.bar pass1234

Files
https://docs.nextcloud.com/server/15/admin_manual/configuration_server/occ_command.html#file-operations-label

# path
/var/snap/nextcloud/common/nextcloud/data/admin/file
 
# rescan files
nextcloud.occ files:scan --path=admin
nextcloud.occ files:scan --all
 
# external files
nextcloud.occ files_external:list
sudo snap connect nextcloud:removable-media

Calendar

# create calendar
nextcloud.occ dav:create-calendar ritter Auktionen

maintenance:mode
https://docs.nextcloud.com/server/15/admin_manual/configuration_server/occ_command.html#file-operations-label

nextcloud.occ maintenance:mode --on
nextcloud.occ maintenance:mode --off