Why Nextcloud?

cloud others computer

Presentation Notes

This presentation is not a replacement for the detailed instructions from Nextcloud. Downloads and documentation are available at https://nextcloud.com/install

For the Nextcloud server installation we’ll talk about and install Nextcloud 12.0.0

The demo system is running CentOS 7.3 with the following installed and configured:

  • Apache webserver

  • PHP 7 (5.6 or higher is required for Nextcloud 11.x and higher)

    • Required php modules

  • MariaDB

  • Firewall ports 80 and 443 opened

(See the appendix for details )

Server Installation

  1. Download the nextcloud-12.0.0.zip file from the Nextcloud site.

  2. Unzip the downloaded file using the command unzip nextcloud-12.0.0.zip -d /var/www/html/

    1. The files will be extracted to /var/www/html/nextcloud

  3. Create or know the path to the data directory. For this example we will create and use /var/www/html/nextcloud/data (but is not recommended for production)

  4. Change ownership of the Nextcloud directories to the web user and group with the command chown -R apache:apache /var/www/html/nextcloud

  5. Modify the selinux permissions of the directories (see appendix)

  6. Navigate to the server with your web browser https://<host or ip>/nextcloud to complete the Installation Wizard

nextcloud setup screen

Select the appropriate options and click the Finish setup button to complete

nextcloud initial login

Demo Interface

Demo Time!

Clients

Clients are available for all major platforms

  • Desktop

    • Linux

    • MacOs/OS X

    • Windows

  • Android

  • iOS

Other ways to access files and data

  • WebDAV

  • Web interface

  • Calendar Data

    • CalDAV

  • Contacts

    • CardDAV

Other options for getting started

  • Nextcloud Appliance

  • Docker image

  • Virtual Machine

  • Hosted Website

Features

  • Federation

  • Encryption

  • Full text search

  • Various Authentication Methods

    • LDAP

    • Kerberos

    • SSO/SAML

    • Dual Factor (U2F/TOTP)

  • Apps

    • Collabora Online

    • News (RSS Reader)

    • Mail Client (IMAP/SMTP)

    • Notes

    • Tasks

    • Keeweb (Keepass Client)

    • SMS Sync

    • Video Calls

More information at https://nextcloud.com/

External Access

  • VPN (Secure)

  • DMZ/Port Forwarding (Less Secure)

Resources

Appendix

CentOS Installs

#!/bin/bash
# This is written for a CentOS-7 demo system on DigitalOcean.
# Use at your own risk in production.
# This section downloads and install OS packages
# Downloads Nextcloud, but does not install the zip file
sudo yum update -y
sudo yum install wget epel-release yum-utils -y
sudo wget http://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum install ./remi-release-7.rpm -y
sudo yum-config-manager --enable remi-php70 -y
sudo wget https://download.nextcloud.com/server/releases/nextcloud-12.0.0.zip
sudo yum install vim httpd mod_ssl unzip mariadb-server php -y
sudo yum install php-mbstring php-dom php-gd php-posix php-simplexml php-xmlwriter php-zip php-pdo_mysql php-curl -y

Apache Config

Create a file with the following contents in /etc/httpd/conf.d/nextcloud.conf

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>

Permissions

Change the permissions of the Nextcloud web directory to: chown -R apache:apache /var/www/html/nextcloud/

Modify the selinux permissions for the Nextcloud directories:

semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/data'
restorecon '/var/www/html/nextcloud/data'

semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/config'
restorecon '/var/www/html/nextcloud/config'

semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/apps'
restorecon '/var/www/html/nextcloud/apps'

MySQL configurations

These settings are for demo purposes only!

They are not to be considered secure.

sudo systemctl enable mariadb
sudo systemctl start mariadb
sudo mysql_secure_installation
mysql -u root -p
CREATE USER 'nextcloud'@'localhost' IDENTIFIED BY 'password';
CREATE DATABASE IF NOT EXISTS nextcloud;
GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud'@'localhost' IDENTIFIED BY 'password';
quit