Pydio Cells is a self-hosted Document Sharing and Collaboration platform. It also gives you full control of your document-sharing environment. The Pydio Cells have fast performance, handle huge file transfer sizes, and provide advanced workflow automation.
In this guide, we’ll walk you through the installation of Pydio Cells on the Ubuntu 24.04 server with the MariaDB database and Apache as a reverse proxy.
Prerequisites
Before you begin, make sure you have the following:
- An Ubuntu 24.04 server.
- A non-root user with administrator privileges.
- A domain name pointed to a server IP address.
Installing dependencies
Before installing Pydio Cells, you must install dependencies on your Ubuntu system. This includes the MariaDB database server and Apache web server.
First, run the following apt
command to update your Ubuntu package index and install dependencies for Pydio Cells. With this command, you’ll install the Apache web server, MariaDB database server, and Certbot for generating SSL/TLS certificates.
sudo apt update sudo apt install apache2 mariadb-server certbot python3-certbot-apache wget
Input Y
to confirm with the installation.
After the installation is complete, check the Apache service status with the following:
sudo systemctl is-enabled apache2 sudo
systemctl status apache2
You can see below the Apache web server is enabled and running.
Now check the MariaDB server status with the command below.
sudo systemctl is-enabled mariadb
sudo systemctl status mariadb
Below the MariaDB server is running and enabled.
Setting up MariaDB server
After installing the MariaDB server, you’ll secure MariaDB with the mariadb-secure-installation
utility. Then, you’ll create a new database and user for Pydio Cells.
To secure MariaDB server installation, run the mariadb-secure-installation
command below.
sudo mariadb-secure-installation
You’ll be asked about the MariaDB server configuration below:
- Switch local authentication to unix_socket? Input n.
- Set up the new MariaDB root password. Input y to confirm, then type the new password for your MariaDB server deployment.
- Remove anonymous user? Input y to confirm.
- Remove the default database test from the deployment?. Input y to confirm.
- Disallow MariaDB root login from remote connections? Input y to confirm.
- Reload table privileges and apply the changes? Input y and press ENTER.
Now run the mariadb
client command below to log in to the MariaDB server. Input your root password when prompted.
sudo mariadb -u root -p
Next, run the following queries to create a new database cellsdb
, a user cells
, and the password p4ssword
. Make sure to change the details below with your information.
CREATE DATABASE cellsdb;
CREATE USER cells@localhost IDENTIFIED BY ‘cellsp4ssword’;
GRANT ALL PRIVILEGES ON cellsdb.* TO cells@localhost;
FLUSH PRIVILEGES;
Now run the query below to ensure that user cells@localhost
can access the database cellsdb
.
SHOW GRANTS FOR cells@localhost;
You should see similar output below:
Type quit
to exit from the MariaDB server.
Installing Pydio Cells
In this section, you’ll create a new pydio
user, set up environment variables, and then download and install Pydio Cells.
Add a new user pydio
with the following command:
sudo useradd -m -s /bin/bash pydio
Then, run the command below to create a new directory /opt/pydio/bin
and /var/cells
, and change the ownership to the pydio
user.
sudo mkdir -p /opt/pydio/bin /var/cells
sudo chown -R pydio: /opt/pydio/bin /var/cells
Now run the following command to create the env file /etc/profile.d/cells-env.sh
and make it an executable. This file will be executed when the user logs in.
sudo tee -a /etc/profile.d/cells-env.sh << EOF
export CELLS_WORKING_DIR=/var/cells
export CELLS_BIND=127.0.0.1:8080
export CELLS_EXTERNAL=https://cells.howtoforge.local
EOF
sudo chmod 0755 /etc/profile.d/cells-env.sh
Next, log in as user pydio
and check environment variables $CELLS_WORKING_DIR
, $CELLS_BIND
, and $CELLS_EXTERNAL
. Ensure each pointed to the correct value as in the file /etc/profile.d/cells-env.sh
.
su – pydio
echo $CELLS_WORKING_DIR
echo $CELLS_BIND
echo $CELLS_EXTERNAL
Now run the command below to download the Pydio binary file to /opt/pydio/bin/cells
.
export distribId=cells
wget -O /opt/pydio/bin/cells https://download.pydio.com/latest/
Make the /opt/pydio/bin/cells
file executable and exit from the current pydio
user.
chmod a+x /opt/pydio/bin/cells exit
After that, run the setcap
command below to allow Pydio to use privileges ports (0-1024) and create a symlink to the /usr/local/bin/cells
.
sudo setcap ‘cap_net_bind_service=+ep’ /opt/pydio/bin/cells
sudo ln -s /opt/pydio/bin/cells /usr/local/bin/cells
Log in as a pydio
user again and run the cells
command below to check the Pydio Cells version.
su – pydio
cells version
As you can see below the Pydio Cells 4.4.3 is installed.
Configuring Pydio Cells
Now that you’ve downloaded Pydio Cells, you’ll configure and integrate it with the MariaDB database server and create an admin user for Pydio Cells installation. Those can be done through the cells
command line.
Run the cells
command below to install and configure Pydio Cells installation.
cells configure –cli
- Select TCP for the database connection and type your MariaDB database, user, and password.
- Input
N
for the MongoDB support. In this case, you’ll build and install single Pydio Cells. - Press ENTER to use the default storage configuration.
- Input a new admin user, email address, and password for your Pydio Cells installation.
After the installation is complete, you’ll see the message Installation finished
.
Running Pydio Cells as a systemd service
In this section, you’ll create and set up a systemd service file for Pydio Cells. With this, you can easily manage Pydio Cells with the systemctl
command.
Create a new service file /etc/systemd/system/cells.service
with nano
editor.
sudo nano /etc/systemd/system/cells.service
Add the following configuration to the file and make sure to change the CELLS_EXTERNAL
environment variable with your target domain name.
[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
Environment=CELLS_BIND=127.0.0.1:8080
Environment=CELLS_EXTERNAL=https://cells.howtoforge.local
[Install]
WantedBy=multi-user.target
Save the file and exit the editor.
Now run the systemctl
command below to reload the systemd manager and apply your changes.
sudo systemctl daemon-reload
Start and enable the cells
service with the command below. Then, check the cells
status to ensure that the service is running.
sudo systemctl enable –now cells
sudo systemctl status cells
Setting up Apache as a reverse proxy
After Pydio Cells runs as a systemd service, you’ll create a new Apache virtual host file as a reverse proxy for Pydio Cells. You’ll also need to enable Apache modules with the a2enmod
command.
First, run the a2enmod
command below to enable Apache modules. In this case, you’ll enable modules for SSL and reverse proxy.
sudo a2enmod rewrite ssl proxy proxy_http proxy_wstunnel http2 proxy_http2
Now create a new virtual host file /etc/apache2/sites-available/cells.conf
with the following nano
command.
sudo nano /etc/apache2/sites-available/cells.conf
Insert the configuration below to set up Apache as a reverse proxy for Pydio Cells. Make sure to change the ServerName
option with your target domain name.
ServerName cells.howtoforge.local
AllowEncodedSlashes On
RewriteEngine On
# be aware of this
# Allow reverse proxy via self-signed certificates
SSLProxyEngine On
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
## The order of the directives matters.
# If Cells is not running with https, consider using ws instead of wss
ProxyPassMatch "/ws/(.*)" wss://localhost:8080/ws/$1 nocanon
## This rewrite condition is required if using Cells-Sync
# RewriteCond %{HTTP:Content-Type} =application/grpc [NC]
# RewriteRule /(.*) h2://localhost:8080/$1 [P,L]
ProxyPass "/" "https://127.0.0.1:8080/"
ProxyPassReverse "/" "https://127.0.0.1:8080/"
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Save and exit the file when done.
Next, run the a2ensite
command below to activate virtual host cells.conf
and verify your Apache configuration. If you’ve proper Apache configuration, you’ll see an output Syntax is OK
.
sudo a2ensite cells.conf
sudo apachectl configtest
Lastly, run the systemctl
command below to restart the Apache web server and apply your changes.
sudo systemctl restart apache2
Securing Pydio Cells with HTTPS
Pydio Cells is accessible via HTTPS. So you must enable HTTPS on your Apache virtual host file. In this section, you’ll generate SSL/TLS certificates with certbot
to secure Pydio Cells installation.
To secure Pydio Cells with HTTPS, run the certbot
command below. make sure to change the domain name and email address below with your information.
sudo certbot –apache –agree-tos –redirect –hsts –staple-ocsp –email [email protected] -d cells.howtoforge.local
After the process is complete, your SSL/TLS certificates will be available in the /etc/letsencrypt/live/domain.com
directory.
Now open your web browser and visit your domain name https://cells.howtoforge.local/. If your installation is successful, you’ll be prompted with the Pydio Cells login page.
Enter your admin user and password, and click ENTER.
You’ll see the Pydio Cells dashboard like the following:
Conclusion
Congratulations! You’ve completed the installation of Pydio Cells on the Ubuntu 24.04 server. You have the Pydio Cells up and running with the MariaDB database server and Apache as a reverse proxy. Lastly, you’ve also secured Pydio Cells with HTTPS through Certbot and Letsencrypt.