ownCloud is an open-source file sync and share solution. Similar to Nextcloud (which was forked from it), administration is heavily reliant on the occ command-line tool.
Important: The
occcommand must be run as the web server user (usuallywww-dataon Debian/Ubuntu orapacheon RHEL/CentOS).
Basic occ Execution
# Run occ (Ubuntu/Debian)
sudo -u www-data php /var/www/owncloud/occ
# Alias for convenience (Add to ~/.bashrc)
alias occ='sudo -u www-data php /var/www/owncloud/occ'Maintenance
occ status # Show ownCloud version and status
occ maintenance:mode --on # Enable maintenance mode (blocks user access)
occ maintenance:mode --off # Disable maintenance mode
occ upgrade # Run the database upgrade scriptUser Management
occ user:list # List all users
occ user:add alice # Add a new user
occ user:resetpassword alice # Reset user password
occ user:delete alice # Delete userFile Management
If you bypass the web interface and place files directly on the server, you must rescan.
occ files:scan --all # Scan all files for all users
occ files:scan alice # Scan files for a specific userApp Management
occ app:list # List all apps
occ app:enable contacts # Enable the contacts app
occ app:disable contacts # Disable the contacts appConfiguration
occ config:system:get trusted_domains # View trusted domains
occ config:system:set trusted_domains 1 --value=cloud.example.com # Add trusted domain