Need an expert to help you with
" How to install NextCloud 13 on Debian package 9" ?
" How to install NextCloud 13 on Debian package 9" ?
How to install NextCloud 13 on Debian package 9Here, we’ll show you how to install NextCloud on Debian Package 9. before going into details lets have a look at what we have already discussed in previous articles;
NextcloudNextcloud is an open-source software suite that allows users to store their data, including files, contacts, calendars, news feeds, to-do lists, and much more on their personal servers. It uses standard protocols such as webdavm, carddav, and caldav. It also provides client applications so that users can easily manage and synchronize their data among Linux, MacOS, and Windows platforms. It makes Nextcloud a great free alternative to proprietary cloud services such as Dropbox, Google Drive, iCloud, etc…
Install NextCloud on Debian package 9In this tutorial, we will install and configure Nextcloud 13 on a Debian 9 VPS with an Apache web server, PHP, and MariaDB.
RequirementsBefore we start with the installation, there are several requirements your machine must meet:
- SSH ‘root’ access to your server;
- MySQL or MariaDB 5.5+; PostgreSQL version 9 or 10;
- PHP version 7.0, 7.1, or 7.2;
- Apache version 2.4 with mod_php or Nginx (php-fpm) web server
Login via SSH and update your systemLog in to your Debian 9 VPS via SSH as root:
and make sure that all installed packages are up to date by running the following command:
ssh [email protected]_Address -p Port_Number
apt update && apt upgrade
Install Apache web serverAs mentioned in the requirements, a web server is required to run Nextcloud. Run the following command to install Apache on your VPS:
Once installed, start Apache and enable it to start at server boot
apt install apache2
systemctl start apache2 systemctl enable apache2
Install PHPInstall PHP and some PHP modules required by NextCloud:
apt install php7.0 libapache2-mod-php7.0 php7.0-common php7.0-gd php7.0-json php7.0-mysql php7.0-curl php7.0-mbstring php7.0-intl php7.0-mcrypt php7.0-imagick php7.0-xml php7.0-zip
Install MariaDB and create a databaseNext, we will install MariaDB server using the following command:
Start the database server and enable it to start upon server boot:
apt -y install mariadb-server
Run the mysql_secure_installation post-installation script to harden the security of your MariaDB server and set a ‘root’ password. You can use the following options:
systemctl enable mariadb systemctl start mariadb
Set root password? [Y/n] Y Remove anonymous users? [Y/n] Y Disallow root login remotely? [Y/n] Y Remove test database and access to it? [Y/n] Y Reload privilege tables now? [Y/n] YNow, log in to the MariaDB server as root and create a new user and database for Nextcloud:
mysql -u root -p
MariaDB [(none)]> CREATE DATABASE nextcloud; MariaDB [(none)]> GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud_user'@'localhost' IDENTIFIED BY 'PASSWORD'; MariaDB [(none)]> FLUSH PRIVILEGES; MariaDB [(none)]> exit;Don’t forget to replace ‘PASSWORD’ with an actual strong password. Combinations of letters and numbers and a minimum of 10 characters is recommended.
Download and install Nextcloud 4Go to Nextcloud’s official website and download Nextcloud 13 to your Debian 9 VPS. Currently, the latest stable version is 13.0.1.
Extract the downloaded ZIP archive in a directory that Apache has access to and change the ownership of the Nextcloud directory to the web server user.
Once all Nextcloud prerequisites are fulfilled, we can complete the installation using the on-screen installation wizard or through the command line. We will complete the installation through the command line. Change the current working directory:
unzip nextcloud-13.0.1.zip -d /var/www/html/ chown -R www-data:www-data /var/www/html/nextcloud/
and execute the following command as the web server user:
Use the database information we created above and set a strong password for the Nextcloud ‘admin’ user. If the installation is successful, you will get the following output: Nextcloud was successfully installed Edit the config/config.php file and add domain.com as a trusted domain:
sudo -u www-data php occ maintenance:install --database "mysql" --database-name "nextcloud" --database-user "nextcloud_user" --database-pass "PASSWORD" --admin-user "admin" --admin-pass "PASSWORD"
'trusted_domains' => array ( 0 => 'localhost', 1 => 'domain.com', ),
Create Apache Virtual HostIf you want to be able to access Nextcloud with a domain name, you will have to create a new virtual host. Create the following file:
<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www/html/nextcloud ServerName domain.com ServerAlias www.domain.com 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> ErrorLog /var/log/apache2/nextcloud-error_log CustomLog /var/log/apache2/nextcloud-access_log common </VirtualHost>Save the file and enable the newly created virtual host:
It is also recommended that you enable the mod_headers, mod_env, mod_dir, and mod_mime Apache modules.
To activate the new configuration, you need to run the following command:
a2enmod headers a2enmod env a2enmod dir a2enmod mime
With this step, the Nextcloud 13 installation is complete. You can now visit http://domain.com and log in to your Nextcloud instance using the credentials used in the installation commands above.
systemctl reload apache2
Check out Our Best VPS Hosting for scaling your cloud-based applications and processes.One more thing.. Don’t forget to subscribe to our email newsletter for more helpful tips, insights, and tutorials!
Add a comment