Installing Nextcloud client on Ubuntu
Nextcloud provides its own desktop client for Linux in form of AppImage which can be downloaded by issuing the following command:
sudo wget -nv https://download.nextcloud.com/desktop/releases/Linux/latest -O Nextcloud.AppImage
Alternatively, for Ubuntu, the latest version of the client can be installed from PPA following the instructions here:
sudo add-apt-repository ppa:nextcloud-devs/client sudo apt-get update sudo apt-get install nextcloud-client
For other platforms, please follow client installation instructions located at the Nextcloud website.
We do not recommend installing apps in Nextcloud unless absolutely required. Maintaining such systems is a security hassle since you need to keep them up-to-date. Apps often break when Nextcloud is updated and you have to know how to fix them. Finally, Nextcloud apps are not run sandboxed. This means that a faulty plugin might compromise the whole app and also not make the app work at all. Nextcloud apps also write into the same database as the main application which might result in unintended data corruption.
For the above reason, extensive use of Nextcloud plugins is highly discouraged since it will eventually break your install.
Running occ tool
occ tool can be used for Nextcloud administrative tasks.
The occ command can be run using the Web terminal. For example, to list the users:
sudo -u www-data php -f /app/code/occ user:list
Resetting admin password
To reset the admin password, run the following occ command using the Web terminal:
sudo -u www-data php -f /app/code/occ user:resetpassword admin
Nextcloud will periodically sync users from LDAP. However, we have noticed that this fails at times. To trigger a manual sync, use the Web terminal and run the following command:
sudo -u www-data php -f /app/code/occ ldap:check-user --update <username>
Managing deleted files
When you delete a file in Nextcloud, it is not immediately deleted permanently. Instead, it is moved into the trash bin. It is not permanently deleted until you manually delete it, or when the Deleted Files app deletes it to make room for new files.
To configure, how items are permanently deleted, configure the trashbin_retention_obligation parameter.
The parameter can be edited using the Web terminal and editing the file
Attaching external storage
Many VPS providers like Digital Ocean, Linode allow attaching external block storage to the server. Nextcloud has a feature that allows mounting additional directories on the server as external storage.
Mounting an existing server directory as 'external storage' on Nextcloud is currently not supported.
If the intent is to simply increase the amount of storage available to Nextcloud (since you have run out of disk space in the default data partition), there are two options:
- Configure Nextcloud to use an external object storage like Digital Ocean Spaces, AWS S3 etc
Configure Cloudron to store all of Nextcloud's data in the external block storage. To achieve this, follow the guide for moving a single app's data directory to another location.
Moving Nextcloud's directory entirely has the advantage that the iOS/Android app's Instant Upload feature uses this new disk.
Nextcloud will not pick up files if they are added directly in the data directory of the user on the server. To make it rescan, open a Web terminal and run the following command:
sudo -u www-data php -f /app/code/occ files:scan <username>
To rescan external storage, use the
sudo -u www-data php -f /app/code/occ files:scan <username> --path=/<username>/files/externaltest
Fixing a broken install
The Nextcloud App Store has a wide variety of apps that can be installed on top of Nextcloud. Nextcloud has no native sandboxing mechanism for plugins - if a plugin fails, it will bring down the whole installation. Plugins might also break an installation after a Nextcloud upgrade. For this reason, we encourage carefully reviewing apps before using them.
To fix a broken installation, open a Web terminal and repair the app. Then run the following commands:
sudo -u www-data php -f /app/code/occ app:list # this lists the apps sudo -u www-data php -f /app/code/occ app:disable <app> # use this to disable the faulty app sudo -u www-data php /app/code/occ maintenance:mode --off
After running the commands, end the repair for the app to come up.
Collabora Online Document Editor
Collabora Online is a powerful online office suite that supports all major document, spreadsheet and presentation file formats, which you can integrate in your own infrastructure. Key features are collaborative editing and excellent office file format support.
See the Collabora App docs on how to setup Nextcloud with Collabora Office.
By default, Nextcloud generates previews for text and images. Previews for other document types is disabled for privacy reasons. Note that generating previews also require more memory and CPU.
To enable previews for PDF and OpenOffice documents, open a Web terminal and
/app/data/config/config.php and add the following setting:
'enabledPreviewProviders' => array ( 0 => 'OC\\Preview\\TXT', 1 => 'OC\\Preview\\MarkDown', 2 => 'OC\\Preview\\OpenDocument', 3 => 'OC\\Preview\\PDF', 4 => 'OC\\Preview\\MSOffice2003', 5 => 'OC\\Preview\\MSOfficeDoc', 6 => 'OC\\Preview\\PDF', 7 => 'OC\\Preview\\Image', 8 => 'OC\\Preview\\Photoshop', 9 => 'OC\\Preview\\TIFF', 10 => 'OC\\Preview\\SVG', 11 => 'OC\\Preview\\Font', 12 => 'OC\\Preview\\MP3', 13 => 'OC\\Preview\\Movie', 14 => 'OC\\Preview\\MKV', 15 => 'OC\\Preview\\MP4', 16 => 'OC\\Preview\\AVI', ),
Removing NextCloud users
To delete obsolete LDAP users and their data, see the nextcloud docs.
NextCloud has apps like Rainloop to access email.
We do not recommend installing apps in Nextcloud unless absolutely required. Maintaining such systems is a security hassle since you need to keep them up-to-date. Apps often break when Nextcloud is updated and you have to know how to fix them. Finally, Apps are not run sandboxed. This means that a faulty plugin might compromise the whole app and also not make the app work at all.
That warning aside, it is possible to configure Rainloop to access mail as follows.
Login to Rainloop admin. You can find the admin link by going to Nextcloud
Add your domain for email. In the example below, we use
IMAP and SMTP configuration:
Note that the SMTP encryption is turned off intentionally. This is safe because the communication is within the same server. (STARTTLS is disabled by Cloudron Email intentionally in the internal network for app compatibility when used with various languages and frameworks).