When building personal cloud storage, one usually thinks of ownCloud, which is a classic self-built cloud storage service. Nextcloud is a so-called "next generation" storage built by the original development team of ownCloud. At first glance, I thought it had a "sounding" tone. It redefined Cloud as soon as it was launched. After actually trying it out, I wholeheartedly agree with Nextcloud: it is an excellent choice for personal cloud storage services.

Compared with ownCloud, Nextcloud's functions have not been weakened at all, and even because it can install cloud storage service applications, it is more self-made and more in line with user needs. The help documentation on the Nextcloud official website is quite detailed, and you can find answers to almost any question about Nextcloud. This shows that the Nextcloud development team is indeed better than ownCloud.

At first I thought Nextcloud was just a network disk cloud storage, but then I saw that Nextcloud has built-in Office documents, picture albums, calendar contacts, two-step verification, file management, RSS reading and other rich applications. I found that Nextcloud can only be used for personal use. Or team storage and sharing, it can also be built into a personal office platform, almost equivalent to a personal Dropbox.

The Nextcloud operating environment is similar to the programs we usually use. LAMP is the official first choice, but LNMP can still run, but you need to write the URL rewriting rules yourself. Of course, the official also provides a SNAP one-click installation package, which allows you to deploy Nextcloud on your VPS within one minute, which is very convenient. This article will share how to install Nextcloud via SNAP.

Nextcloud is an excellent choice for personal cloud storage: one-click installation comes with a free client, built-in documents, albums, calendars and rich applications

For more information about email distribution, CDN acceleration, VPS synchronization and other tools, you can also check out:

  1. Use MailChimp to build an RSS email subscription platform - 12,000 free emails per month and 2,000 additional users
  2. Use Fikker to build your own CDN - supports HTTPS, page caching, real-time monitoring, traffic statistics, and CC attack prevention
  3. Lsyncd builds synchronization mirror-use Lsyncd to achieve real-time synchronization between local and remote servers

PS: Updated on September 27, 2017, If you want to use Nextcloud to achieve offline download, you can see here: Nextcloud offline download construction method - integrate Aria2, AriaNg, and Aria2 WebUI to achieve offline download.

PS: Updated on January 28, 2019, When installing NextCloud through the official SNAP, it will appear that smbcient has not been successfully installed and prompts that it cannot be mounted. We can use the Y Chaos method to solve the problem:

I found the snap nextcloud offline installation package that adds smbcient support, https://launchpad.net/~pachulo/+snap/nextcloud-snap-add-smbclient/+build/436506
But I don’t know if it is safe or not. Screen for yourself.
After wget package, you can use
snap install package name –dangerous
to install.
After installation, it can be mounted normally. I mounted it in the directory /var/snap/nextcloud/common/nextcloud/data/username/Download/. I am installing aria2. I have a hunch that it is feasible.

Completely OK, the file downloaded by aria2 can be recognized after mounting
https://chaosye.xyz/index.php/s/FFzTCLKsHoiFXca

1. One-click installation of Nextcloud

Nextcloud official website:

  1. HTTPS://next cloud.com/
  2. nextcloud snap: https://github.com/nextcloud/nextcloud-snap

nextcloud snap currently contains the following components (will be automatically updated and upgraded, please pay attention in time):

Nextcloud 11.0.3

Apache 2.4

PHP 7

MySQL 5.7

Redis 3.2

mDNS for network discovery

Modify the hostname before installation. Enter the command in the terminal window: hostname or uname -n, you can view the host name of the current host. The modification reference is as follows (for Ubuntu modification, please refer to my previous article: ISPConfig 3.1 Installation Method):

vim /etc/hosts
150.95.150.57 pan.wzfou.net pan  

vim /etc/hostname
pan.wzfou.net
hostname -F /etc/hostname #重启
hostname #再次查看

One-click installation method:

sudo apt-get update
sudo apt install snapd
sudo snap install nextcloud

As shown in the figure below, the installation is successful.

Images uploaded to Nextcloud can be viewed like a slideshow.

Nextcloud supports setting validity periods, password protection, etc. for shared documents, pictures, etc., which is somewhat similar to Baidu Cloud Disk.

On Nextcloud's personal center page, you can modify personal information, application passwords, synchronization clients, etc.

On Nextcloud's server management page, you can check CPU, memory, etc. usage, switch Nextcloud themes, whether to encrypt files stored in Nextcloud, activate plug-ins, etc.

3. Nextcloud synchronization client

Nextcloud provides a free synchronization client for everyone to download and use, supporting PC and mobile phones. Download address: https://nextcloud.com/install/#install-clients

Run the Nextcloud synchronization client on your computer and fill in your Nextcloud address first.

Then enter the Nextcloud username and client-specific password. This special password needs to be generated on the Nextcloud personal center page.

Nextcloud allows you to choose to synchronize a specific folder or the entire Nextcloud account.

After the connection is completed, you can see the files synchronized by Nextcloud locally. Your local operations will affect the file storage in Nextcloud, and synchronization will be automatically realized.

The following is Nextcloud’s mobile phone synchronization client, which has similar functions.

Nextcloud mobile client supports automatic uploading of files, setting download paths, etc.

4. Add applications to Nextcloud

Nextcloud officially provides a lot of applications: https://apps.nextcloud.com/, Office documents, picture albums, calendar contacts, two-step verification, file management, RSS reading and other rich applications. You can download and install these applications manually, or you can activate them directly in the Nextcloud background with one click.

Office document plug-in:Documents. There are Collabora Online, Markdown Editor, Calendar, Onlyoffice, Documents, etc. Among them, Documents is relatively simple to install and can be activated directly.

If opening Doc(X) is not supported, you need to install the following packages on your Ubuntu:

apt-get install libreoffice-writer
apt-get install libreoffice-common
apt-get install unoconv

After the Documents plug-in is installed, you can view and edit Office documents online.

Security plug-in:Two Factor TOTP Provider. This plug-in allows your Nextcloud account to support two-step login verification.

RSS reader plug-in:News. This plug-in really shines for me. With it, we can transform Nextcloud into an RSS online reader. This is much simpler than the previous method we used Huginn to crawl the RSS of any website. (Click to enlarge)

5. Nextcloud advanced settings

Nextcloud supports using PHP to send emails, but emails sent by its own post office are basically judged as spam by major mailboxes, so we need to make good use of the SMTP email sending function provided by Nextcloud.

4.1  Nextcloud uses SMTP to send emails

On the management page of Nextcloud, find "Other Settings", then select the sending method as SMTP and fill in your SMTP information. I am using Tencent's corporate email here. You can also use free SMTP sending functions such as Gmail and 163.

After filling in, click Test to see if the email can be successfully sent.

4.2  Nextcloud installs SSL certificate

If you use a Snap installation of Nextcloud, adding SSL encrypted access is a simple matter. First make sure that your domain name has been successfully resolved to your VPS host, and then execute the command:

sudo nextcloud.enable-https lets-encrypt #安装Let's Encrypt SSL
#如果你想使用自己的证书,请执行:
sudo nextcloud.enable-https self-signed

####如果提示 command not found,请加上路径
sudo /snap/bin/nextcloud.enable-https lets-encrypt
sudo /snap/bin/nextcloud.enable-https self-signed

If you are using your own certificate, please find the path to the SSL certificate after executing the command, and upload your own certificate to replace the generated self-signed certificate file.

4.3  Nextcloud backup and recovery

Back up MysqL database . Using Nextcloud installed by Snap, the database file is in the following path. You can directly back up the entire Nextcloud database.

Backup file. The files uploaded by Nextcloud are stored in the following path. Just back up all the Data files inside.

Nextcloud recovery. After reinstalling Nextcloud, import all the above database files and file data to the new server and keep the original path. For a large number of file migrations, it is recommended to use the remote moving method: three command tools Rsync, SCP, and Tar-quickly solve the trouble of Linux VPS remote website moving data synchronization.

6. Summary

Nextcloud adopts the Snap installation method which is simple and convenient, suitable for those who don’t want to bother, and the officially packaged Nextcloud Snap automatically deploys LAMP. If you want to migrate the server, you only need to install Nextcloud on the new server in the same way, and then import the previous Database and storage files are enough.

If Nextcloud is used to store some private photos or files, the most worrying thing is probably the security issue. At present, Nextcloud's own security measures have been implemented very well, such as two-step verification of accounts, separation of programs and storage files, data encryption, etc. Perhaps the only thing we need to do ourselves is to ensure that the server does not have vulnerabilities.

Leave a Reply