Nextcloud App
About
Nextcloud is the self-hosted productivity platform that keeps you in control.
- Questions? Ask in the Cloudron Forum - Nextcloud
- Nextcloud Website
- Upstream Nextcloud forum
- Upstream Nextcloud issue tracker
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.
Custom config
To add custom configuration, use the File Manager to edit /app/data/config/config.php
.
Plugin warning
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
The 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
If you had deleted the admin user previously by mistake, you can create it again:
sudo -u www-data php -f /app/code/occ user:add --display-name="Admin" -g admin admin
You can also make an existing user an admin:
sudo -u www-data php -f /app/code/occ group:adduser admin <username> -n
LDAP Sync
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 File Manager and editing the file config/config.php
.
Default is 7,30
In recent versions of the nextcloud package, cloudron sets the default retention to a min of 7 days and a max of 30 days.
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.
Rescan files
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 --path
parameter.
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.
If it's not immediately obvious which plugin may be causing an issue, edit /app/data/config/config.php
and set
debug
to true
. Save the file and refresh the browser (do not restart the app because restarting it will reset
the debug
value back to false
). It will then contain a stack trace of the error which
should help identify the plugin.
Once identified, open a Web terminal. 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.
Previews
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 File Manager and
edit config/config.php
and add the following setting:
'enable_previews' => true,
'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.
Skeleton directory
A skeleton directory provides the initial list of files for Nextcloud when a new user is created. By default,
the skeleton directory is /app/code/core/skeleton
. This directory is read only but can be changed to a custom
directory.
-
Open the File Manager.
- Create a directory named
skeleton
. - Set the owner of the directory to
www-data
. You can do this by clicking the icon to the right of the directory. - Add files and directories to this new skeleton directory. Be sure to fix ownership of the files to
www-data
- Create a directory named
-
Edit
config/config.php
to contain the following line:
'skeletondirectory' => '/app/data/skeleton'
New users will receive the contents of skeleton
directory on first log-in. The skeletondirectory
property above
can be set to empty string (''
) to have no files added on first login.
NextCloud has apps like Mail, SnappyMail to access email.
Not recommended
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.
Rainloop App
Discontinued
Please do not use the Rainloop app. Upstream development has ceased.
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
Settings
->Administration
->Additional Settings
. -
Login as
admin
/12345
-
Add your domain for email. In the example below, we use
my.cloudron.cf
.
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).
Sieve configuration:
Mail App
The Mail icon will appear in the top bar of Nextcloud. You can configure your mailbox as below:
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).
Password reset link
The password reset link can be customized by editing /app/data/config/config.php
's lost_password_link
parameter
using the File Manager.
If you are using Cloudron exclusively for user authentication, you can set it like this:
'lost_password_link' => getenv('CLOUDRON_WEBADMIN_ORIGIN') . '?passwordReset',
Please note that if you added users inside Nextcloud that are not managed by Cloudron, the link might be misleading.