Features of Nextcloud :

  • Media Player for playing shared media content
  • contact management feature
  • File sync and sharing – With notes to shares, searching in comments, recovery of files
  • Video calls with chat and  MCU, SIP-Bridge, ext. Signaling backend integration
  • Online document editor/reader
  • Calendar Management e.t.c.
  • Nextcloud Community Add-ons

Install Nextcloud 23 on Ubuntu 

Nextcloud dependencies :

  • PHP
  • Apache / Nginx web server
  • MySQL / MariaDB Database server

 Install PHP and Apache Web Server

sudo apt update
sudo apt install -y php-cli php-fpm php-json php-intl php-imagick php-pdo php-mysql php-zip php-gd php-mbstring php-curl php-xml php-pear php-bcmath apache2 libapache2-mod-php

Set PHP variables .

$ sudo vim /etc/php/*/apache2/php.ini
date.timezone = Africa/Nairobi
memory_limit = 512M
upload_max_filesize = 500M
post_max_size = 500M
max_execution_time = 300

Restart apache2 service:

sudo systemctl restart apache2

Install MariaDB 

sudo apt -y install mariadb-server

Secure MariaDB database server:

sudo mysql_secure_installation

Change authentication plugin to allow use of root password.

$ sudo mysql -u root
UPDATE mysql.user SET plugin = 'mysql_native_password' WHERE User = 'root';
FLUSH PRIVILEGES;
QUIT;

After the installation of the database server, you need to create a database and user for Nextcloud

$ mysql -uroot -p
CREATE USER 'nextcloud'@'localhost' identified by 'MASUKINPASSWORDENTE';
CREATE DATABASE nextcloud;
GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud'@'localhost'; FLUSH PRIVILEGES;
QUIT;

.

Confirm if the user can connect to the database with the provided password:

$ mysql -u nextcloud -p 
Enter password: <ENTER PASSWORD> 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 34
MariaDB [(none)]> SHOW DATABASES;
MariaDB [(none)]> QUIT
Bye

 Download and Install Nextcloud

Nextcloud is distributed as a zip file. Check for the latest release from  Nextcloud download page before pulling the archive.

Download Nextcloud zip package:

sudo apt install -y wget unzip
wget https://download.nextcloud.com/server/releases/latest-23.zip

Once the file is downloaded, extract it:

unzip latest-23.zip

Move the resulting folder to /srv

sudo mv nextcloud/ /srv

Change directory permissions to the www-datauser

sudo chown -R www-data:www-data /srv/nextcloud/

Configure Apache Web Server

Create a VirtualHost file f:

sudo vim /etc/apache2/conf-enabled/nextcloud.conf

Paste the following content into the file:

<VirtualHost *:80>
     ServerAdmin [email protected]
     DocumentRoot /srv/nextcloud/
     ServerName example.com
     ServerAlias www.example.com
     ErrorLog /var/log/apache2/nextcloud-error.log
     CustomLog /var/log/apache2/nextcloud-access.log combined
 
    <Directory /srv/nextcloud/>
	Options +FollowSymlinks
	AllowOverride All
        Require all granted
 	SetEnv HOME /srv/nextcloud
 	SetEnv HTTP_HOME /srv/nextcloud
 	<IfModule mod_dav.c>
  	  Dav off
        </IfModule>
    </Directory>
</VirtualHost>

Enable required Apache modules and restart the service:

sudo a2enmod rewrite dir mime env headers
sudo systemctl restart apache2

Visit the page to finish the setup.

1. Create an admin user account

2.Specify data directory – The owner should be userwww-data and group.

3. Provide database connection settings as created 

Click “Finish Setup” butto to complete installation of Nextcloud on Ubuntu server 20.04 Lts

And Then. you can Add/install Add-on for Nextcloud on Setting page

By admin

Leave a Reply

Your email address will not be published. Required fields are marked *