Nextcloud Server

In this article i’m going to set up a new Nextcloud server and see what it can brings to users.

Prerequisites

Ubuntu 20.04 up to date

Web server, in my case Apache 2. Command : apt install apache2

SQL Database, for me MariaDB. Command : apt-install mariadb-server

PHP. Command (source : https://www.tech2tech.fr) : apt install php-imagick php7.4-common php7.4-mysql php7.4-fpm php7.4-gd php7.4-json php7.4-curl  php7.4-zip php7.4-xml php7.4-mbstring php7.4-bz2 php7.4-intl php7.4-bcmath php7.4-gmp php-zip php-gd php-curl php-intl libapache2-mod-php

and activate : phpenmod zip gd curl intl

Download Nextcloud : wget https://download.nextcloud.com/server/releases/latest.zip

Put the zip file in /opt for example and unzip it.

Put the content of the folder nextcloud to /var/www/

Give the rights to the www-data user and group : chown www-data:www-data /var/www/html/ -R

Create database, you can name it « nextcloud » for example. And create a user who have all the rights on this database.

mkdir /var/www/nextcloud-data and chown

You can apply more settings to Apache if you want, for example to secure it, etc.

Nextcloud

You can use Nextcloud to share files and folders, use the calendar with your colleagues, read and compose e-mails, and other things (photos, visio, etc.) that we will see later.

Users and groups management

To manage users and groups, click :

On the left you can add new users and create a new group where you want to put it :

Note : to create a new group, type the name of the group you want to create below the field « Email ».

Create users and groups you want, for example :

Now, create folders where we can create access control list. To do that we need to install a new app call « Group folders » :

Here you can see folders i’ve created with the groups who have the rights to access :

When you create the folder we can set the rights :

Now you can apply rights on each folder you create to reflect the needs of your company (like a file server).

Calendar

Nextcloud allow you to share events with your colleague :

E-mail

You can add your email account easily by clicking « set up an account » in the main page, then :

That’s all for now, you can test by yourself this power tool which can take place easily in a company.