How to Install Nextcloud on OpenSUSE Latest

Nextcloud is a free and open source collaboration platform that allows you to store, share, and collaborate on your data. In this tutorial, we will guide you through the steps to install Nextcloud on OpenSUSE.

Prerequisites

Before installing Nextcloud, make sure your system meets the following requirements:

Step 1: Install Apache and PHP

  1. Update the system package repository:

    sudo zypper update
    
  2. Install the Apache webserver and PHP by running the following command:

    sudo zypper install apache2 php php-mbstring php-pdo php-gd php-intl php-zip php-dom php-xmlreader php-xmlwriter php-json php-curl
    
  3. Start and enable Apache to automatically start at boot time:

    sudo systemctl start apache2
    sudo systemctl enable apache2
    

Step 2: Install MariaDB

  1. Install MariaDB database server:

    sudo zypper install mariadb mariadb-client
    
  2. Start and enable MariaDB to start at boot time:

    sudo systemctl start mariadb
    sudo systemctl enable mariadb
    
  3. Secure the MariaDB installation by running the following command:

    sudo mysql_secure_installation
    

Step 3: Install Nextcloud

  1. Download the latest version of Nextcloud from the official website:

    sudo zypper install wget
    wget https://download.nextcloud.com/server/releases/nextcloud-20.0.9.zip
    
  2. Extract the downloaded file to the Apache webserver document root directory:

    sudo unzip nextcloud-20.0.9.zip -d /srv/www/htdocs/
    
  3. Change the ownership of the Nextcloud directory to the Apache user and group:

    sudo chown -R apache:apache /srv/www/htdocs/nextcloud
    

Step 4: Configure Apache for Nextcloud

  1. Create an Apache virtual host configuration file for Nextcloud:

    sudo nano /etc/apache2/conf.d/nextcloud.conf
    
  2. Add the following lines:

    Alias /nextcloud "/srv/www/htdocs/nextcloud/"
    
    <Directory "/srv/www/htdocs/nextcloud/">
        Options +FollowSymlinks
        AllowOverride All
    
        <IfModule mod_dav.c>
            Dav off
        </IfModule>
    
        SetEnv HOME /srv/www/htdocs/nextcloud
        SetEnv HTTP_HOME /srv/www/htdocs/nextcloud
    
    </Directory>
    
  3. Save and close the file.

  4. Restart Apache for the changes to take effect:

    sudo systemctl restart apache2
    

Step 5: Set up Nextcloud

  1. Open your web browser and navigate to http://your_server_ip/nextcloud. You should see the Nextcloud setup page.

  2. Set up the administrator account and database connection.

  3. Follow the prompts and complete the installation.

  4. Once the installation is complete, you can log in to Nextcloud and start using it.

Congratulations! You have successfully installed Nextcloud on OpenSUSE.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!