How to Install Files Sharing from https://github.com/axeloz/filesharing on OpenSUSE Latest

In this tutorial, we will go through the steps required to install Files Sharing on OpenSUSE Latest. Files Sharing is an open-source file sharing application that allows users to securely share files with others. It uses end-to-end encryption to ensure that the files are only accessible by the intended recipient.

Prerequisites

Before we begin, ensure that you have the following:

Step 1 - Install Required Packages

To install Files Sharing, you will need to install some packages. Open the terminal and run the following command to update the package repository and install the required packages:

sudo zypper update && sudo zypper install git nginx php7-fpm php7-gd php7-json php7-mbstring php7-opcache php7-tokenizer php7-zip

Step 2 - Install and Configure MariaDB

Files Sharing requires a database to store data. We will use MariaDB for this purpose. To install MariaDB, run the following command:

sudo zypper install mariadb

After installation, start the MariaDB service and configure it.

sudo systemctl start mariadb
sudo systemctl enable mariadb
sudo mysql_secure_installation

Follow the prompts to secure your MariaDB installation.

After securing MariaDB installation, create a new database for Files Sharing and a new user with all privileges on the database.

sudo mysql -u root -p
CREATE DATABASE filesharing;
GRANT ALL PRIVILEGES ON filesharing.* TO 'filesharing'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
exit;

Replace 'password' with a strong password of your choice.

Step 3 - Clone Files Sharing Repository

Now that you have installed the required packages and configured the database, it's time to clone the Files Sharing repository from GitHub.

sudo git clone https://github.com/axeloz/filesharing.git /usr/share/nginx/html/filesharing

Step 4 - Configure Nginx

Nginx is a high-performance web server that is used to serve Files Sharing. To configure Nginx, create a new server block for Files Sharing.

sudo nano /etc/nginx/conf.d/filesharing.conf

Add the following code to the file:

server {
    listen 80;
    listen [::]:80;
    server_name yourdomain.com;

    root /usr/share/nginx/html/filesharing/public;
    index index.html index.htm index.php;

    charset utf-8;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location ~ \.php$ {
        fastcgi_pass unix:/run/php-fpm7/www.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
}

Replace 'yourdomain.com' with your actual domain name.

Save and close the file.

Next, start the Nginx service and enable it.

sudo systemctl start nginx
sudo systemctl enable nginx

Step 5 - Configure Files Sharing

Before we can access Files Sharing, we need to configure it.

sudo cp /usr/share/nginx/html/filesharing/.env.example /usr/share/nginx/html/filesharing/.env
sudo nano /usr/share/nginx/html/filesharing/.env

In the .env file, update the following fields:

APP_ENV=production
APP_URL=http://yourdomain.com

DB_DATABASE=filesharing
DB_USERNAME=filesharing
DB_PASSWORD=password

ENCRYPT_KEY=encryption_key

Replace 'yourdomain.com', 'password', and 'encryption_key' with your actual values.

Next, generate a new encryption key.

sudo php /usr/share/nginx/html/filesharing/artisan key:generate

Step 6 - Run Database Migrations

Finally, we need to run the database migrations to create the necessary tables in the database.

sudo php /usr/share/nginx/html/filesharing/artisan migrate

Step 7 - Accessing Files Sharing

Files Sharing is now ready to use. Open your web browser and navigate to:

http://yourdomain.com

Replace 'yourdomain.com' with your actual domain name.

You should now see the Files Sharing login page. Use the default login credentials to access the application:

Email: admin@admin.com
Password: password

You should change these default credentials immediately after logging in.

Congratulations! You have successfully installed Files Sharing on OpenSUSE Latest.

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!