Nextcloudis a free, open source, cross-platform file synchronization and sharing application. It is forked from popular cloud sync tool Owncloud . It allows you to securely sync and share files, folders, contacts, calendar appointments, bookmarks, and emails across multiple devices. It comes with easy to use web-based interface, so that you can access your files using a web browser, from anywhere, from any device, online or offline(Local area network). You can use it either in your home, office, and as well as large enterprises. It simply turns your system into a robust, and secure Cloud platform in minutes. Just store your files in your server, and start accessing them immediately from any devices usingNextcloud / ownCloud Desktop Sync Client, Android app, or iOS app. Nextcloud is available as free and enterprise version, which contains additional features like direct email, phone support from Nextcloud team, audio and video conferencing support, clustering support, migration from Owncloud support, and many. For more details, refer Nextcloud enterprise subscription link .
In this step by step tutorial, we will see how to install Nextcloud and how to use it in real time in Ubuntu 16.04 LTS server edition. Also, we will see how to access Nextcloud from a mobile device.
Install Nextcloud in Ubuntu 16.04 LTS First things firstFirst of all, make sure your Ubuntu server is updated to the most recent version.
To do so, run:
sudo apt-get update sudo apt-get upgrade sudo apt-get dist-upgradeThen, deploy LAMP stack in your Ubuntu server as described in the following link.
Install Apache, MariaDB, php (LAMP stack) in Ubuntu 16.04Next, make sure you have installed the following php modules and some additional prerequisites:
sudo apt-get install php-gd php-json php-mysql php-curl php-intl php-mcrypt php-imagick php-zip php-dom php7.0-xml php-mbstring wget unzipThen, We need to tweak some php settings in order to make Nextcloud work properly.
To do so, edit php.ini file:
sudo nano /etc/php/7.0/apache2/php.iniFind and edit or modify the following values.
[...] memory_limit = 512M date.timezone = Asia/Kolkata upload_max_filesize = 200M post_max_size = 200M [...]Save and close the file. Restart Apache service to take effect the changes.
sudo systemctl restart apache2 Create database for NextcloudNext we need to configure a database and database user for Nextcloud. For the purpose of this tutorial, we will create a new database called “ncdb” , database user “ncuser” with password “ubuntu” . I recommend you to use any strong password which is not easy to guess by others.
Log in to mysql prompt using command:
mysql -u root -pEnter the following commands one by one to create the database, database user:
CREATE DATABASE ncdb; GRANT ALL PRIVILEGES ON ncdb.* TO 'ncuser'@'localhost' IDENTIFIED BY 'ubuntu'; FLUSH PRIVILEGES; \q Download NextcloudHead over to the following link and download the latest available Nextcloud version.
Download Nextcloud
Or, Simply use the following command to download it.
wget https://download.nextcloud.com/server/releases/nextcloud-10.0.0.zipAs of writing this guide, the latest version was 10.0.0 .
Then, Extract the downloaded zip with command:
unzip nextcloud-10.0.0.zipMove the extracted folder to your web root directory i.e /var/www/html/ in our case.
sudo cp -r nextcloud/ /var/www/html/Set the proper ownership permission to the nextcloud directory:
sudo chown -R www-data:www-data /var/www/html/nextcloud/Next,create a /etc/apache2/sites-available/nextcloud.conf file:
sudo nano /etc/apache2/sites-available/nextcloud.confAdd the following lines. Replace the path (/var/www/html/nextcloud/) with your own path values.
Alias /nextcloud "/var/www/html/nextcloud/" <Directory /var/www/html/nextcloud/> Options +FollowSymlinks AllowOverride All <IfModule mod_dav.c> Dav off </IfModule> SetEnv HOME /var/www/html/nextcloud SetEnv HTTP_HOME /var/www/html/nextcloud </Directory>Save and close the file.
Then create a symlink to /etc/apache2/sites-enabled/ directory using the following command:
sudo ln -s /etc/apache2/sites-available/nextcloud.conf /etc/apache2/sites-enabled/nextcloud.confFor Nextcloud to work correctly, we need to enable the following Apache modules.
sudo a2enmod rewrite sudo a2enmod headers sudo a2enmod env sudo a2enmod dir sudo a2enmod mimeFinally, restart Apache service to take effect the changes:
sudo systemctl restart apache2 Start Nextcloud web installerOpen up your web browser and navigate to URL: http://IP_Address/nextcloud or http://domain_name/ nextcloud .
You should see the following screen. Create a new admin account, enter database user name, password, and database name. Finally, click Finish setup button.
nextcloud setup
Congratulations! Nextcloud is ready to use.
This is how Nextcloud admin user dashboard looks like.
From here, you can upload files and folders and start sharing them with others.
Uploading filesTo upload a file, click the (+) sign on the top, and select Upload .
Choose the files you want to upload. The selected files will be uploaded to your Nextcloud server.
Click on the uploaded item to view it from the dashboard itself.
As you see in the below screenshot, I am playing a video file.
Creating usersTo create a new user click admin drop-down link on the top right corner. And select Users .
Enter the username and password for the new user:
Sharing filesTo share any item, click on the share icon, select the users or groups you want to share with, and tick the Share link check box.
You can also set password protection and expiry date to the shared item.
To access other administrative sections, go to admin -> Admin from the top right corner.
Access Nextcloud from Smartphones/TabletsNextcloud is available for Android, iOS, and windows platforms. You can download and install the respective apps on your smartphones, tablets, and access your files from anywhere.
In Android devices, Go to the Google play store . Search and install Nextcloud app.
Once installed, launch it. You will see a screen like below. Enter the Nextcloud URL (Ex. http://IP_Address/nextcloud), loginusername and password.
Here, 192.168.1.105