Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»General Articles»How to Install Nextcloud on Debian 10/9/8

    How to Install Nextcloud on Debian 10/9/8

    RahulBy RahulJuly 29, 20182 Mins ReadUpdated:June 10, 2019

    Nextcloud provides data access using web interface. It also provides options to sync and share across devices—all under your control. This tutorial will help you to install Nextcloud on Debian 10, Debian 9 and Debian 9 Linux operating system.

    Step 1 – Prerequsites

    The first of all, to set up Nextcloud you must have running LAMP server on your Debian 9 system. If you already have running LAMP stack skip this step else use the following commands to install it.

    Install PHP

    First of all, Install the latest version of PHP on your Debian 9 Stretch system. So import the GPG key and add the following Apt repository to your system.

    wget -q https://packages.sury.org/php/apt.gpg -O- | sudo apt-key add -
    echo "deb https://packages.sury.org/php/ `lsb_release -cs` main" | sudo tee /etc/apt/sources.list.d/php.list
    

    Then isntall PHP on your system:

    sudo apt-get update
    sudo apt-get install -y php php-gd php-curl php-zip php-xml php-mbstring
    

    Install Apache2

    sudo apt-get install -y apache2 libapache2-mod-php
    

    Install MySQL

    sudo apt-get install -y mysql-server php-mysql
    

    Step 2 – Download Nextcloud Archive

    After successfully configuring lamp server on your system, Let’s download latest Nextcloud from its official website.

    cd /tmp
    wget https://download.nextcloud.com/server/releases/nextcloud-16.0.1.zip
    

    Now extract downloaded archive under website document root and setup appropriate permissions on files and directories.

    cd /var/www/html
    sudo unzip /tmp/nextcloud-16.0.1.zip
    sudo chown -R www-data:www-data nextcloud
    sudo chmod -R 755 nextcloud
    

    Now, remove the archive file.

    sudo rm -f /tmp/nextcloud-16.0.1.zip
    

    Step 3 – Create MySQL Database

    After extracting code, let’s create a MySQL database and user account for configuring Nextcloud. Use the following set of command to login to MySQL server and create database and user.

    mysql -u root -p
    Enter password:
    
    mysql> CREATE DATABASE nextcloud;
    mysql> GRANT ALL ON nextcloud.* to 'nextcloud'@'localhost' IDENTIFIED BY '_Pa$$w0rd_';
    mysql> FLUSH PRIVILEGES;
    mysql> quit
    

    Step 4 – Run Nextcloud Web Installer

    Access the Nextcloud directory in the web browser as below. Change localhost to your server IP address or domain name.

     http://localhost/nextcloud/
    

    Enter new admin credentials to create an admin account and provide the location of the data folder.

    install nextcloud on debian 1

    Now slide your page down and input the database credentials and click on Finish Setup.

    install nextcloud on debian 2

    After completing setup you will get admin dashboard. Where you can create a user, groups, assigned them permissions, etc.

    nextcloud dashboard

    Congratulations, You have a working Nextcloud instance on your Debian 9 Stretch system.

    filemanager nextcloud owncloud
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow to Setup Selenium with Firefox on Ubuntu
    Next Article How to Install Nextcloud on Ubuntu 18.04 & 16.04

    Related Posts

    What is CPU? – Definition, Types and Parts

    3 Mins Read

    How to Install Ionic Framework on Ubuntu 22.04

    3 Mins Read

    What is the /etc/hosts file in Linux

    Updated:June 27, 20222 Mins Read

    Creating DMARC Record for Your Domain

    Updated:June 29, 20223 Mins Read

    What is Computer Hardware?

    4 Mins Read

    What is Information Technology (IT)?

    Updated:June 29, 20223 Mins Read

    2 Comments

    1. A on June 7, 2019 3:03 pm

      This does not work!

      Nextcloud 16 does not support php 5.6 nor php 7.0.

      Note : php 7.0 is the default in Debian 9 (stretch). php 7.3 is NOT available in Debian 9 (stretch)

      Reply
    2. Angad Arora on August 2, 2018 12:09 pm

      Rahul i really liked your work, if you wish to work with us for some projects feel free to drop me an email.

      Reply

    Leave A Reply Cancel Reply

    Recent Posts
    • What is CPU? – Definition, Types and Parts
    • What is the /etc/aliases file
    • What is the /etc/nsswitch.conf file in Linux
    • How to Install Ionic Framework on Ubuntu 22.04
    • What is the /etc/hosts file in Linux
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.