Categories: LinuxRocky Linux

How to Install Pydio Cells File Sharing Server on Rocky Linux

Pydio is a free, open-source, and self-hosted cloud storage solution that provides a central place to collaborate and share files internally or externally. It is written in HP programming language and Ajax and is very similar to Google Drive and other online file-sharing services. Pydio provides an ajax based web interface and allows you to connect your existing storage such as SAN, SAMBA, CIFS, FTP, NFS, etc. It provides a client application for Mac, Windows, and Linux and mobile clients for iOS and Android.

In this post, we will show you how to install Pydio on Rocky Linux 8.

Prerequisites

  • A server running Rocky Linux 8.
  • A root password is configured on the server.

Install and Configure MariaDB Database

Pydio uses a MariaDB as a database backend so MariaDB must be installed and configured. First, install the MariaDB database server using the following command:

dnf install @mariadb -y

Once the MariaDB has been installed, start and enable the MariaDB service with the following command:

systemctl start mariadb
systemctl enable mariadb

Next, you will need to secure the MariaDB installation and set the root password. You can do it by executing the following script:

mysql_secure_installation

Answer all the questions as shown below to secure the installation:

Enter current password for root (enter for none): 
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

You already have a root password set, so you can safely answer 'n'.

Change the root password? [Y/n] y
New password:
Re-enter new password:
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] y

Next, log in to the MariaDB with the following command:

mysql -u root -p

Once you are log in, create a database and user with the following command:

MariaDB [(none)]> CREATE DATABASE pydio;
MariaDB [(none)]> CREATE USER 'pydio'@'localhost' IDENTIFIED BY 'password';

Next, grant all the privileges to the Pydio database with the following command:

MariaDB [(none)]> GRANT ALL PRIVILEGES ON pydio.* to 'pydio'@'localhost';

Next, flush the privileges and exit from the MariaDB with the following command:

MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;

At this point, MariaDB is installed and configured. You can now proceed to the next step.

Install Pydio

First, create a dedicated user to run Pydio with the following command:

useradd -m -s /bin/bash pydio

Next, create required directories with the following command:

mkdir -p /opt/pydio/bin /var/cells/certs

Next, set proper ownership on all directories with the following command:

chown -R pydio: /opt/pydio /var/cells

Next, create an environment variable file:

nano /etc/profile.d/cells-env.sh

Add the following lines:

export CELLS_WORKING_DIR=/var/cells
export CADDYPATH=/var/cells/certs

Save and close the file then activate the variable using the following command:

source /etc/profile.d/cells-env.sh

Next, set proper permission to the variable file:

chmod 0755 /etc/profile.d/cells-env.sh

Next, log in as a Pydio user and download the latest version of Pydio with the following command:

su - pydio 
wget https://download.pydio.com/latest/cells/release/{latest}/linux-amd64/pydio-cells-{latest}-linux-amd64.zip

Once the download is completed, unzip the downloaded file with the following command:

unzip -q pydio-cells-{latest}-linux-amd64.zip

Next, move the extracted directory to /opt and set proper permission:

mv cells /opt/pydio/bin/cells
chmod a+x /opt/pydio/bin/cells

Next, exit from the Pydio user with the following command:

exit

Next, add permissions to bind to default HTTP ports:

setcap 'cap_net_bind_service=+ep' /opt/pydio/bin/cells

Next, create a symbolic link of Pydio binary with the following command:

ln -s /opt/pydio/bin/cells /usr/local/bin/cells

Finally, verify the Pydio version using the following command:

cells version

You will get the following output:

Pydio Cells Home Edition
 Version:  3.0.4
 Built:  28 Jan 22 13:52 +0000
 Git commit:  c146b94067637b4c8724b4ba20a3a032a06f1bdd
 OS/Arch:  linux/amd64
 Go version:  go1.15.14

Configure Pydio

Before configuring Pydio, set the ulimit with the following command:

ulimit -n 8192

Next, log in as a Pydio user and configure Pydio with the following command:

su - pydio 
cells configure

Once the Pydio is configured, you will get the following output:

Welcome to Pydio Cells Home Edition installation 
Pydio Cells Home Edition (v3.0.4) will be configured to run on this machine.
Make sure to prepare access and credentials to a MySQL 5.6+ (or MariaDB equivalent) server.
Pick your installation mode when you are ready.

? Browser-based (requires a browser access)
2022-02-04T03:36:55.085Z        INFO    pydio.gateway.rest      Started
2022-02-04T03:36:55.263Z INFO pydio.rest.install Started

? Created a new local CA at "/var/cells/certs/rootCA.pem" ????
? Created a new certificate valid for the following names ???? - "127.0.0.1" - "45.58.45.164" - "localhost" - "localhost.localdomain" - "localhost4" - "localhost4.localdomain4"
? The certificate is at "/var/cells/certs/d31dbbeb557595f71dcfb67ffac0a86f.pem" 
 and the key at "/var/cells/certs/d31dbbeb557595f71dcfb67ffac0a86f-key.pem"

???? If you are behind a reverse proxy, you can either install the RootCA on the proxy machine trust store, or configure your proxy to `insecure_skip_verify` for pointing to Cells.
???? If you are developing locally, you may install the RootCA in your system trust store to see a green light in your browser!
????  To easily install the RootCA in your trust store, use https://github.com/FiloSottile/mkcert. Set the $CAROOT environment variable to the rootCA folder then use 'mkcert -install'

[DEV NOTICE] Registered directive 'pydioproxy' before 'proxy'
Activating privacy features... done.
https://0.0.0.0:8080

Installation Server is starting...
Listening to: 0.0.0.0:8080

2022-02-04T03:36:58.388Z INFO pydio.gateway.proxy Restarting proxy {"caddyfile": "\n\n0.0.0.0:8080  {\n\troot \"/var/cells/static/install\"\n\tproxy /install [::]:46687\n\n\t\n\ttls \"/var/cells/certs/d31dbbeb557595f71dcfb67ffac0a86f.pem\" \"/var/cells/certs/d31dbbeb557595f71dcfb67ffac0a86f-key.pem\"\n}\n\n\n\n\t "}
2022-02-04T03:36:58.890Z INFO pydio.gateway.proxy Restart done

Opening URL https://0.0.0.0:8080 in your browser. Please copy/paste it if the browser is not on the same machine.

Access Pydio Web Interface

At this point, Pydio is started and listens on port 8080. Now, open your web browser and access the Pydio web interface using the URL https://your-server-ip:8080. You should see the following screen:

Click on the Next button. You should see the database configuration screen:

Provide your database configuration details and click on the NEXT button. You should see the admin user creation screen:

Provide your admin user, password and click on the NEXT button. You should see the following screen:

Click on the INSTALL NOW button to start the installation. Once the installation has been completed, you will get the following screen:

Click on the RELOAD button. You should see the Pydio login screen:

Provide your admin username, password and click on the ENTER. You should see the Pydio dashboard on the following screen:

Create a Systemd Service File for Pydio

Now, go back to the command-line interface and press CTRL+C to stop the Pydio server. Then, run the following command to exit from the Pydio user.

exit

Next, it is recommended to create a systemd service file to manage the Pydio service. You can create it with the following command:

nano /etc/systemd/system/cells.service

Add the following lines:

[Unit]
Description=Pydio Cells
Documentation=https://pydio.com
Wants=network-online.target
After=network-online.target
AssertFileIsExecutable=/opt/pydio/bin/cells

[Service]
User=pydio
Group=pydio
PermissionsStartOnly=true
AmbientCapabilities=CAP_NET_BIND_SERVICE
ExecStart=/opt/pydio/bin/cells start
Restart=on-failure
StandardOutput=journal
StandardError=inherit
LimitNOFILE=65536
TimeoutStopSec=5
KillSignal=INT
SendSIGKILL=yes
SuccessExitStatus=0
WorkingDirectory=/home/pydio

# Add environment variables
Environment=CELLS_WORKING_DIR=/var/cells

[Install]
WantedBy=multi-user.target

Save and close the file then reload the systemd daemon to apply the changes:

systemctl daemon-reload

Next, start and enable the Pydio service with the following command:

systemctl enable cells
systemctl start cells

You can now check the status of the Pydio with the following command:

systemctl status cells

You will get the following output:

? cells.service - Pydio Cells
   Loaded: loaded (/etc/systemd/system/cells.service; disabled; vendor preset: disabled)
   Active: active (running) since Fri 2023-02-04 03:44:23 UTC; 6s ago
     Docs: https://pydio.com
 Main PID: 7889 (cells)
    Tasks: 130 (limit: 23695)
   Memory: 397.9M
   CGroup: /system.slice/cells.service
           ??7889 /opt/pydio/bin/cells start
           ??7896 /opt/pydio/bin/cells start --fork --config local --registry grpc://:8000 --broker grpc://:8003 ^pydio.grpc.tasks$
           ??7900 /opt/pydio/bin/cells start --fork --config local --registry grpc://:8000 --broker grpc://:8003 ^pydio.gateway.websocket$
           ??7908 /opt/pydio/bin/cells start --fork --config local --registry grpc://:8000 --broker grpc://:8003 ^pydio.grpc.jobs$
           ??7916 /opt/pydio/bin/cells start --fork --config local --registry grpc://:8000 --broker grpc://:8003 ^pydio.grpc.search$
           ??7922 /opt/pydio/bin/cells start --fork --config local --registry grpc://:8000 --broker grpc://:8003 ^pydio.grpc.data.sync.pydiod>
           ??7927 /opt/pydio/bin/cells start --fork --config local --registry grpc://:8000 --broker grpc://:8003 ^pydio.grpc.data.sync.person>
           ??7933 /opt/pydio/bin/cells start --fork --config local --registry grpc://:8000 --broker grpc://:8003 ^pydio.grpc.data.sync.cellsd>
           ??7937 /opt/pydio/bin/cells start --fork --config local --registry grpc://:8000 --broker grpc://:8003 ^pydio.grpc.data.sync.versio>
           ??7957 /opt/pydio/bin/cells start --fork --config local --registry grpc://:8000 --broker grpc://:8003 ^pydio.grpc.data.sync.thumbn>
           ??7959 /opt/pydio/bin/cells start --fork --config local --registry grpc://:8000 --broker grpc://:8003 ^pydio.grpc.data.objects.loc>
           ??7979 /opt/pydio/bin/cells start --fork --config local --registry grpc://:8000 --broker grpc://:8003 ^pydio.grpc.data.index.cells>
           ??7980 /opt/pydio/bin/cells start --fork --config local --registry grpc://:8000 --broker grpc://:8003 ^pydio.grpc.data.index.pydio>
           ??7988 /opt/pydio/bin/cells start --fork --config local --registry grpc://:8000 --broker grpc://:8003 ^pydio.grpc.data.index.versi>
           ??7995 /opt/pydio/bin/cells start --fork --config local --registry grpc://:8000 --broker grpc://:8003 ^pydio.grpc.data.index.thumb>
           ??8003 /opt/pydio/bin/cells start --fork --config local --registry grpc://:8000 --broker grpc://:8003 ^pydio.grpc.data.index.perso>

Feb 04 03:44:28 rockylinux cells[7889]: 2023-02-04T03:44:28.157Z        INFO        pydio.rest.acl        Started
Feb 04 03:44:28 rockylinux cells[7889]: 2023-02-04T03:44:28.181Z        INFO        pydio.grpc.data.index        Started
Feb 04 03:44:28 rockylinux cells[7889]: 2023-02-04T03:44:28.181Z        INFO        pydio.grpc.data.index        Starting umbrella service py>
Feb 04 03:44:28 rockylinux cells[7889]: 2023-02-04T03:44:28.247Z        INFO        pydio.test.objects        Started
Feb 04 03:44:28 rockylinux cells[7889]: 2023-02-04T03:44:28.771Z        INFO        pydio.grpc.data.index.cellsdata        Warning: no privat>
Feb 04 03:44:28 rockylinux cells[7889]: 2023-02-04T03:44:28.803Z        INFO        pydio.grpc.data.index.personal        Warning: no private>
Feb 04 03:44:29 rockylinux cells[7889]: 2023-02-04T03:44:29.002Z        INFO        pydio.grpc.data.index.thumbnails        Warning: no priva>
Feb 04 03:44:29 rockylinux cells[7889]: 2023-02-04T03:44:29.036Z        INFO        pydio.grpc.data.index.versions        Warning: no private>
Feb 04 03:44:29 rockylinux cells[7889]: 2023-02-04T03:44:29.230Z        INFO        pydio.grpc.data.index.pydiods1        Warning: no private>
Feb 04 03:44:29 rockylinux cells[7889]: 2023-02-04T03:44:29.286Z        INFO        pydio.gateway.proxy        Restarting proxy        {"cadd>

You can also check the Pydio logs using the following command:

tail -f /var/cells/logs/pydio.log

Conclusion

Congratulations! you have successfully installed Pydio cloud storage on Rocky Linux 8. You can now upload files and other documents on the Pydio server and share them with your teams and other users. Feel free to ask me if you have any questions.

Vitux Staff

Recent Posts

How to Install Magento 2 on AlmaLinux

Magento is a free and open-source e-commerce platform written in PHP. It is simple, easy…

1 year ago

How to Install ISPConfig Hosting Control Panel with Apache Web Server on Ubuntu 24.04

ISPConfig is an open-source control panel that allows users to manage multiple servers from a…

1 year ago

How to Test your Email Server (SMTP) Using the Telnet Command

As a Linux administrator, you may find it necessary to troubleshoot or test your Simple…

1 year ago

Managing Network Interfaces and Settings on Ubuntu 24.04 with nmcli

Ubuntu 24.04, like many modern Linux distributions, relies on the NetworkManager for managing network connections.…

2 years ago

Using Restic Backup on Ubuntu 24.04

Restic is a modern, open-source backup program designed for efficiency, security, and simplicity. It enables…

2 years ago

Installing phpMyAdmin on Rocky Linux 9 and Securing it with Let’s Encrypt SSL

phpMyAdmin is a popular free tool written in PHP intended to administer MySQL and MariaDB…

2 years ago