Pydio Cells is an exceptional self-hosted Document Sharing and Collaboration platform that provides full control over your document-sharing environment. With fast performance, the ability to handle large file transfer sizes, and advanced workflow automation, Pydio Cells is an ideal solution for businesses of all sizes.
In this comprehensive guide, we will walk you through the step-by-step installation of Pydio Cells on a Debian 12 server. We will cover the installation of Pydio Cells with the MariaDB database server and Apache2 reverse proxy. Additionally, we will ensure the security of your installation with SSL/TLS certificates generated via Certbot and Letsencrypt.
Prerequisites
Before we begin the installation process, please ensure that you have the following prerequisites:
- A Debian 12 server
- A non-root user with administrator privileges
- A domain name pointed to the server’s IP address
Installing Dependencies
Pydio Cells relies on several dependencies, including the MariaDB database server, Apache2 web server, and Certbot for SSL/TLS certificate generation. To install these dependencies, follow the steps below:
- Update the Debian package index by running the following command:
sudo apt update
- Install the necessary dependencies using the following command:
sudo apt install mariadb-server apache2 certbot wget
- Confirm the installation by pressing ‘Y’ when prompted.
Once the dependencies are installed, verify the status of the Apache2 and MariaDB services using the following commands:
sudo systemctl is-enabled apache2 sudo systemctl status apache2 sudo systemctl is-enabled mariadb sudo systemctl status mariadb
Ensure that both services are enabled and running.
Configuring MariaDB Server
In this step, we will secure the MariaDB server installation and create a new database and user for Pydio Cells.
- Start the MariaDB server configuration process by running the following command:
sudo mysql_secure_installation
- Follow the prompts to configure the server. You will be asked to set a new root password, remove anonymous users, disallow remote root login, and remove the test database.
- After securing the MariaDB server, log in to the MariaDB server using the following command:
sudo mariadb -u root -p
- Once logged in, create a new database, user, and grant privileges using the following queries:
CREATE DATABASE cells; CREATE USER 'pydio'@'localhost'IDENTIFIED BY'p4ssw0rd'; GRANT ALL PRIVILEGES ON cells.* to'pydio'@'localhost'; FLUSH PRIVILEGES;
- Verify that the user ‘pydio’ has the necessary privileges by running the following query:
SHOW GRANTS FOR 'pydio'@'localhost';
- Exit the MariaDB server by typing ‘quit’.
Installing Pydio Cells
Now that the MariaDB server is configured, we can proceed with the installation of Pydio Cells.
- Prepare your system by creating a new user, setting up a data directory, and creating environment variables. Execute the following commands:
sudo useradd -m -s /bin/bash pydio sudo mkdir -p /var/cells sudo chown - Rpydio: /var/cells
- Create environment variables configuration by running the following command:
sudo tee-a /etc/profile.d/cells-env.sh <<EOF export CELLS_WORKING_DIR=/var/cells export CELLS_BIND=https://127.0.0.1:8080 export CELLS_EXTERNAL=https://cells.example.io EOF sudo chmod 0755 /etc/profile.d/cells-env.sh
- Log in as the ‘pydio’ user to verify the environment variables:
su - pydio echo $CELLS_WORKING_DIR echo $CELLS_BIND echo $CELLS_EXTERNAL
- Download the Pydio Cells binary file using the following command:
export distribId=cells wget -O /opt/pydio/bin/cells https://download.pydio.com/latest/${distribId}/release/{latest}/linux-amd64/${distribId}
- Make the binary file executable and create a symlink:
chmod a+x /opt/pydio/bin/cells exit sudo setcap 'cap_net_bind_service=+ep' /opt/pydio/bin/cells sudo ln -s /opt/pydio/bin/cells /usr/local/bin/cells
- Verify the installation by checking the version of Pydio Cells:
su - pydio
which cells
cells version
Configuring Pydio Cells
With Pydio Cells installed, it’s time to configure it and set up the necessary services.
- Run the following command to start the configuration process:
cells configure --cli
- Follow the on-screen prompts to configure the database, create the admin user, and set up storage options.
- Once the configuration is complete, you will see an “Installation Finished” message.
- Create a new systemd service file to run Pydio Cells in the background:
sudo nano /etc/systemd/system/cells.service
- Insert the following configuration, ensuring that you update the environment variables:
[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=https://127.0.0.1:8080 Environment=CELLS_EXTERNAL=https://cells.example.io [Install] WantedBy=multi-user.target
- Save the file and exit the editor.
- Reload the systemd manager and start the cells service:
sudo systemctl daemon-reload
sudo systemctl start cells
sudo systemctl enable cells
- Verify the status of the cells service:
sudo systemctl status cells
Configuring Apache2 as a Reverse Proxy
To make Pydio Cells accessible via a secure HTTPS connection, we will configure Apache2 as a reverse proxy.
- Enable the necessary Apache2 extensions:
sudo a2enmod rewrite proxy proxy_http proxy_wstunnel http2 proxy_http2
- Create a directory for certificate verification:
sudo mkdir -p /var/www/html/cells/public_html sudo chown -R www-data:www-data /var/www/html/cells/public_html
- Generate SSL/TLS certificates using Certbot:
sudo certbot certonly --agree-tos --email[Christian@example.io] --no-eff-email --webroot-w /var/www/html/cells/public_html-d cells.example.io
- Create a new Apache2 virtual host configuration:
sudo nano /etc/apache2/sites-available/cells.conf
- Insert the following configuration, updating the domain name and paths to the SSL/TLS certificates:
<VirtualHost *:80> ServerName cells.example.io RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} RewriteCond %{SERVER_NAME} =cells.example.io RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] </VirtualHost> <VirtualHost *:443> ServerName cells.example.io 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 SSLCertificateFile /etc/letsencrypt/live/cells.example.io/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/cells.example.io/privkey.pem #Include /etc/letsencrypt/options-ssl-apache.conf </VirtualHost>
- Save the file and exit the editor.
- Enable the virtual host and test the Apache2 configuration:
sudo a2ensite cells.conf
sudo apachectl configtest
- Restart the Apache2 service:
sudo systemctl restart apache2
Accessing Pydio Cells Installation
You can now access your Pydio Cells installation through a web browser.
- Launch your web browser and visit the domain name associated with your Pydio Cells installation (e.g.,https://cells.exemple.io/).
- You will be redirected to the Pydio Cells login page. Enter the admin user credentials created during the configuration process.
- Once logged in, you will have access to the Pydio Cells user dashboard, where you can manage files, collaborate, and share documents.
- Explore the various features and functionalities offered by Pydio Cells to optimize your document and file management workflows.
Conclusion
Congratulations! You have successfully installed Pydio Cells on your Debian 12 server. By following this comprehensive guide, you have configured Pydio Cells with the MariaDB database server and Apache2 reverse proxy. Additionally, you have secured your installation with SSL/TLS certificates generated from Letsencrypt.
To further enhance your Pydio Cells installation, consider leveraging the services provided by Shape.host, such as SSD Linux VPS. Shape.host offers reliable cloud hosting solutions, ensuring optimal performance and security for your Pydio Cells environment.