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 11.0.2

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)

    • Required php modules

  • MariaDB

  • Firewall ports 80 and 443 opened

(See the appendix for details )

Server Installation

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

  2. Unzip the downloaded file using the command unzip nextcloud-11.0.2.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 an 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

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'

CentOS Installs

#!/bin/bash
# This is written for a CentOS-7 demo system.
# 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-11.0.2.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

MySQL configurations

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