How To Install Nextcloud On Debian 11 / Debian 10 | Holhol24


Nextcloud is a self-hosted device suite that gives cloud garage over the community, and this can be a fork of ownCloud. It is sort of a Google Drive / Dropbox that allows you to retailer, sync, and proportion your paperwork and photographs.

In this put up, we will be able to see the way to set up Nextcloud on Debian 11  / Debian 10.

Install Apache Web Server

First, set up the Apache webserver for Nextcloud.

sudo apt replace 

sudo apt set up -y apache2 bzip2

Install MariaDB

Then, set up the MariaDB database for Nextcloud set up. You too can use MySQL database instead of MariaDB.

sudo apt set up -y mariadb-server mariadb-client

After the MariaDB set up, use the mysql_secure_installation command to safe MariaDB set up.

Install PHP 7.3 or 7.4

Nextcloud calls for PHP model 7.3 or 7.4, and the similar is to be had within the Debian OS repository. So you’ll use the apt command to put in the PHP and its extensions for Nextcloud set up.

sudo apt set up -y libapache2-mod-php php-gd php-json php-mysql php-curl php-mbstring php-intl php-imagick php-xml php-zip php-sqlite3

Once you’ve got put in PHP, allow the next modules for Nextcloud.

sudo a2enmod rewrite

sudo a2enmod headers

Restart the Apache provider.

sudo systemctl restart apache2

Install Nextcloud

Download Nextcloud

Nextcloud provides an archive bundle for Linux servers to obtain and manually arrange on best of the LAMP stack.

cd /tmp/


tar -jxvf newest.tar.bz2

sudo mv nextcloud /var/www/html/

sudo mkdir /var/www/html/nextcloud/records

Update the possession of the recordsdata throughout the Nextcloud listing in order that Apache customers can write the information into it.

sudo chown -R www-data:www-data /var/www/html/nextcloud/

Create Database

Log in to the MariaDB server the usage of the basis consumer to create a database.

sudo mysql -u root -p

First, create a database referred to as nextclouddb.

create database nextclouddb;

Then, grant nextclouduser to get admission to the nextclouddb database on localhost with a password password.

grant all on nextclouddb.* to 'nextclouduser'@'localhost' known through 'password';

Exit from the MariaDB shell.

go out

Setup NextCloud

Open up your internet browser and navigate it to the underneath URL.


  1. Fill up the username and password shape to create an admin account.
  2. Then, click on on Storage & Database.
  3. First, input the positioning of Nextcloud’s records folder after which the database data within the Configure the database type of MySQL / MariaDB.
  4. After coming into all of the data, click on Finish.

Access Nextcloud

After the set up is entire, the installer will take you to the house web page of Nextcloud.

If the installer takes you to the non-existence web page – http://index.php/core/apps/advisable, click on the again button to visit Nextcloud.

Nextcloud Home Page


That’s All. I’m hoping you’ve got realized the way to set up Nextcloud on Debian 11  / Debian 10. As a safety measure, you’ll imagine enabling HTTPS on your Nextcloud set up.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More