{"id":3199,"date":"2018-03-26T15:40:24","date_gmt":"2018-03-26T11:40:24","guid":{"rendered":"https:\/\/www.howtoforge.com\/tutorial\/debian-pydio-installation\/"},"modified":"2018-03-26T15:40:24","modified_gmt":"2018-03-26T11:40:24","slug":"how-to-install-pydio-web-file-manager-on-debian-9","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/how-to-install-pydio-web-file-manager-on-debian-9\/","title":{"rendered":"How to Install Pydio Web File Manager on Debian 9"},"content":{"rendered":"<p>Pydio is a powerful open source web file sync and file share solution software for online collaboration, similar to Gdrive or other online file-sharing services.\u00a0Mostly written in PHP programming language and Ajax, Pydio can be installed on a Linux virtual private server or physical server under Apache\/Nginx web servers, PHP and MySQL\/MariaDB database management system (also known as LAMP or LEMP stack), or it can be deployed in the cloud as well.<\/p>\n<p>In this tutorial, we\u2019ll cover the installation and configuration process of the Pydio Community Edition from source on Debian 9 release, on top of LAMP stack. We&#8217;ll cover the entire installation process from scratch with all required steps you need to perform on your Debian server in order to build a private online cloud for sharing documents, movies, music, or any other type of files.<\/p>\n<h2 id=\"requirements\">Requirements<\/h2>\n<p>You need to meet the following requirements in order to deploy a Pydio file share cloud solution at your premises:<\/p>\n<ul>\n<li>A dedicated physical server or a virtual machine or a VPS with minimum 2Gb of RAM and the latest version of Debian 9 installed.<\/li>\n<li>One of the server network interfaces cards must be configured with a static IP address or the DHCP server must be configured to lease the same IP address for the server\u2019s NIC<\/li>\n<li>Server console root privileges remotely via SSH or locally or a local or LDAP user with root privileges to the system via sudo utility.<\/li>\n<li>A publicly registered domain name or a private local domain name configured via your own DNS server at your premises. The domain name should be configured with all required DNS records, such an A and CNAME records to point back to www. However, you can still deploy Pydio and access the web cloud via your server IP address in case you don\u2019t own a domain name.<\/li>\n<li>An email server configured at your premises in order to use Pydio registration or other features. You can also use a public mail service in this case, such as Gmail or Yahoo!<\/li>\n<\/ul>\n<h2 id=\"prerequirements\">Pre-Requirements<\/h2>\n<p>To begin with, log in to your server console with the root account or an account with root powers and issue the following commands in order to assure that your Debian system is up-to-date with the latest security patches, software, repositories and kernel updates.<\/p>\n<p class=\"command\">apt update<\/p>\n<p class=\"command\">apt upgrade<\/p>\n<p>In the next step, setup a descriptive name for your machine hostname with the command below (replace your hostname variable accordingly).<\/p>\n<p class=\"command\">hostnamectl set-hostname www.mysharedfiles.com<\/p>\n<p>Verify machine hostname and the record applied in system hosts file by issuing the following commands.<\/p>\n<p class=\"command\">hostnamectl<\/p>\n<p class=\"command\">cat \/etc\/hostname<\/p>\n<p class=\"command\">hostname \u2013f<\/p>\n<p class=\"command\">hostname \u2013s<\/p>\n<p>Finally, reboot the server to apply kernel updates and the hostname changes properly.<\/p>\n<p class=\"command\">systemctl reboot<\/p>\n<p>In the next step, log in back to the system with root privileges and install the following system utilities, such as zip, unzip (to decompress zip archives), curl and wget (download online files) and bash-completion command line autocompletion.<\/p>\n<p class=\"command\">su &#8211;<\/p>\n<p class=\"command\">apt install bash-completion zip unzip curl wget\u00a0 imagemagick unoconv<\/p>\n<p>In order to edit, compose or convert different image formats and convert documents via Pydio web interface, install ImageMagick software and unoconv &#8211; Universal Office Converter utilities by executing the following command.<\/p>\n<p class=\"command\">apt install imagemagick unoconv<\/p>\n<p>If you have Samba shares that need to be mounted in Pydio workspaces, install samba client in Debian with the following command.<\/p>\n<p class=\"command\">apt-get install smbclient<\/p>\n<h2 id=\"install-apache-and-php\">Install Apache and PHP<\/h2>\n<p>In the next step, we\u2019ll start by installing the server side components of the LAMP stack required by Pydio web share file cloud: the Apache HTTP server and the PHP programming language interpreter. We\u2019ll also install all the required Pydio PHP modules and extensions. Issue the following command to install all described software components we just discussed.<\/p>\n<p class=\"command\">apt install apache2 libapache2-mod-php7.0 php7.0 php7.0-gd php7.0-opcache php7.0-json php7.0-mbstring php7.0-xml\u00a0 php7.0-cli php7.0-curl php7.0-zip php7.0-xmlrpc php7.0-intl php-imagick php-smbclient<\/p>\n<p>Next, check if all installed PHP modules are enabled in your system, something you can do by executing the following command.<\/p>\n<p class=\"command\">php7.0 \u2013m<\/p>\n<p>In the next step, enable Apache HTTP server rewrite and SSL modules which will allow the use of .htaccess files in web server document root path so we can force visitors to securely browse the website via the HTTPS protocol. The SSL module will secure the traffic between the server and your client browsers with a Self-Signed Certificate automatically issued by Apache. Enable Apache SSL configuration file in order for the SSL module to work properly. Execute the following command to activate all required configurations.<\/p>\n<p class=\"command\">a2enmod ssl rewrite<\/p>\n<p class=\"command\">a2ensite default-ssl.conf<\/p>\n<p>Next, open Apache default SSL site configuration file with a text editor and add the URL rewrite rules code lines after the <strong><em>DocumentRoot<\/em><\/strong> directive, as shown in the sample below.<\/p>\n<p class=\"command\">nano \/etc\/apache2\/sites-enabled\/default-ssl.conf<\/p>\n<p>SSL site configuration file excerpt:<\/p>\n<pre>DocumentRoot \u00a0\/var\/www\/html<br\/>&lt;Directory \/var\/www\/html&gt;<br\/>\u00a0 Options +FollowSymlinks<br\/>\u00a0 AllowOverride All<br\/>\u00a0 Require all granted<br\/>&lt;\/Directory&gt;<\/pre>\n<p>Save and close the SSL Apache conf file and also open default vhost conf file for editing.\u00a0 Here, add the same URL rewrite rules as for SSL configuration file. Insert the lines of code after the <strong>DocumentRoot<\/strong> statement as shown in the example below.<\/p>\n<p class=\"command\">nano \/etc\/apache2\/sites-enabled\/000-default.conf<\/p>\n<p>000-default.conf file excerpt:<\/p>\n<pre>DocumentRoot \u00a0\/var\/www\/html<br\/>&lt;Directory \/var\/www\/html&gt;<br\/>\u00a0 Options +FollowSymlinks<br\/>\u00a0 AllowOverride All<br\/>\u00a0 Require all granted<br\/>&lt;\/Directory&gt;<\/pre>\n<p>In order to apply all the changes made so far you need to restart the Apache daemon by issuing the command below.<\/p>\n<p class=\"command\">systemctl restart apache2<\/p>\n<h2 id=\"configure-the-firewall\">Configure the Firewall<\/h2>\n<p>Before visiting your domain name or server IP address via a web browser opened in a computer at your premises, first add the required firewall rules to allow web traffic to pass the firewall. If your Debian server ships with UFW firewall application, you should add some new rules to allow HTTP\/S traffic to pass through the firewall by issuing the following commands.<\/p>\n<p class=\"command\">ufw allow &#8216;WWW Full&#8217;<\/p>\n<p>or<\/p>\n<p class=\"command\">ufw allow 80\/tcp<\/p>\n<p class=\"command\">ufw allow 443\/tcp<\/p>\n<p>You should also allow SSH traffic to pass through UFW firewall in case of remote connections to the server.<\/p>\n<p class=\"command\">ufw allow 22\/tcp<\/p>\n<p>If your Debian server is behind an <strong>iptables<\/strong> firewall, add the following iptables raw rules to allow ports 80 and 443 inbound traffic to pass the firewall so that external visitors can browse the application.<\/p>\n<p class=\"command\">apt-get install -y iptables-persistent<\/p>\n<p class=\"command\">iptables -I INPUT -p tcp &#8211;destination-port 80 -j ACCEPT<\/p>\n<p class=\"command\">iptables -I INPUT -p tcp &#8211;destination-port 443 -j ACCEPT<\/p>\n<p class=\"command\">netfilter-persistent save<\/p>\n<p class=\"command\">systemctl restart netfilter-persistent<\/p>\n<p class=\"command\">systemctl status netfilter-persistent<\/p>\n<p class=\"command\">systemctl enable netfilter-persistent.service<\/p>\n<p>In case you\u2019re connected to the Debian server remotely via SSH, you should first add the below rule to allow SSH traffic to pass through iptables firewall. Otherwise, you will be locked up, because the firewall will start dropping all incoming traffic to port 22.<\/p>\n<p class=\"command\">iptables -I INPUT -p tcp &#8211;destination-port 22 -j ACCEPT<\/p>\n<p class=\"command\">netfilter-persistent save<\/p>\n<p class=\"command\">systemctl restart netfilter-persistent<\/p>\n<p>Finally, to test if you can reach Apache HTTP server from a remote computer in your LAN, open a browser and visit your domain name or IP address of the server via HTTPS protocol. To display the server IP address, execute <strong>ifconfig<\/strong> or <strong>ip a<\/strong> command in\u00a0the terminal. If your machine is a part of your internal infrastructure network and is hidden behind a NAT-ed network, execute the below command to get the public IP address.<\/p>\n<p class=\"command\">curl ipinfo.io\/ip<\/p>\n<p>Because you\u2019re using the automatically Self-Signed certificates pairs issued by Apache at installation, the certificate would be marked as untrusted by the browser and an error warning should be displayed in the browser.\u00a0 Hit on continue to bypass this warning, accept the untrusted certificate and continue to be redirected to Apache default web page.<\/p>\n<p><em><strong>https:\/\/yourdomain.tld<\/strong><\/em><\/p>\n<p><a class=\"fancybox\" id=\"img-Capture\" href=\"https:\/\/www.howtoforge.com\/images\/install_pydio_web_file_share_solution_in_debian_9\/big\/Capture.PNG\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/03\/how-to-install-pydio-web-file-manager-on-debian-9.png\" alt=\"Certificate error\" width=\"550\" height=\"251\" title=\"\"><\/a><\/p>\n<p>So far, we\u2019ve only installed Apache web server and PHP interpreter in our Debian server. To complete the LAMP stack, needed to install Pydio file sharing solution, we need to install one final component that is missing: an RDBMS database backend.<\/p>\n<h2 id=\"install-mariadb\">Install MariaDB<\/h2>\n<p>In this tutorial, we\u2019ll install Pydio with MariaDB database server as backend. In MariaDB database, the Pydio application will store users, website configurations, and other various data. In order to install MariaDB database server and client and the PHP MySQL extension in Debian 9, issue the following command.<\/p>\n<p class=\"command\">apt install mariadb-server mariadb-client php7.0-mysql<\/p>\n<p>By default, the database root account can be accessed by supplying a password in Debian 9. To overcome this security issue and secure the database server, first log in to MySQL console and execute the following commands to secure the MariaDB root account.<\/p>\n<p class=\"command\">mysql -h localhost<\/p>\n<p><em>Welcome to the MariaDB monitor.\u00a0 Commands end with ; or \\g.<\/em><\/p>\n<p><em>Your MariaDB connection id is 2<\/em><\/p>\n<p><em>Server version: 10.1.26-MariaDB-0+deb9u1 Debian 9.1<\/em><\/p>\n<p><em>Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.<\/em><\/p>\n<p><em>Type &#8216;help;&#8217; or &#8216;\\h&#8217; for help. Type &#8216;\\c&#8217; to clear the current input statement.<\/em><\/p>\n<p class=\"command\">MariaDB [(none)]&gt; use mysql;<\/p>\n<p><em>Reading table information for completion of table and column names<\/em><\/p>\n<p><em>You can turn off this feature to get a quicker startup with -A<\/em><\/p>\n<p><em>Database changed<\/em><\/p>\n<p class=\"command\">MariaDB [mysql]&gt; update user set plugin=&#8221; where user=&#8217;root&#8217;;<\/p>\n<p><em>Query OK, 1 row affected (0.00 sec)<\/em><\/p>\n<p><em>Rows matched: 1\u00a0 Changed: 1\u00a0 Warnings: 0<\/em><\/p>\n<p class=\"command\">MariaDB [mysql]&gt; flush privileges;<\/p>\n<p><em>Query OK, 0 rows affected (0.00 sec)<\/em><\/p>\n<p class=\"command\">MariaDB [mysql]&gt; exit<\/p>\n<p>On the next step, start to secure MariaDB server by executing the script\u00a0<strong>mysql_secure_installation<\/strong>. A series of questions designed to secure MariaDB database will be asked by this script. Answer with \u201cyes\u201d to all questions: remove anonymous users, disable remote root log in and delete the test database. Also, make sure you setup a strong password for database root account, as shown in the below excerpt.<\/p>\n<p class=\"command\"><em>mysql_secure_installation<\/em><\/p>\n<p class=\"system\"><em>==========================================================================================<\/em><\/p>\n<p class=\"system\"><em>NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB<\/em><\/p>\n<p class=\"system\"><em>\u00a0\u00a0\u00a0\u00a0\u00a0 SERVERS IN PRODUCTION USE!\u00a0 PLEASE READ EACH STEP CAREFULLY!<\/em><\/p>\n<p class=\"system\"><em>In order to log into MariaDB to secure it, we&#8217;ll need the current<\/em><\/p>\n<p class=\"system\"><em>password for the root user.\u00a0 If you&#8217;ve just installed MariaDB, and<\/em><\/p>\n<p class=\"system\"><em>you haven&#8217;t set the root password yet, the password will be blank,<\/em><\/p>\n<p class=\"system\"><em>so you should just press enter here.<\/em><\/p>\n<p class=\"system\"><em>\u00a0<\/em><\/p>\n<p class=\"system\"><em>Enter current password for root (enter for none):<\/em><\/p>\n<p class=\"system\"><em>OK, successfully used password, moving on&#8230;<\/em><\/p>\n<p class=\"system\"><em>\u00a0<\/em><\/p>\n<p class=\"system\"><em>Setting the root password ensures that nobody can log into the MariaDB<\/em><\/p>\n<p class=\"system\"><em>root user without the proper authorisation.<\/em><\/p>\n<p class=\"system\"><em>\u00a0<\/em><\/p>\n<p class=\"system\"><em>You already have a root password set, so you can safely answer &#8216;n&#8217;.<\/em><\/p>\n<p class=\"system\"><em>Change the root password? [Y\/n]\u00a0<strong>y<\/strong><\/em><\/p>\n<p class=\"system\"><em>New password:<\/em><\/p>\n<p class=\"system\"><em>Re-enter new password:<\/em><\/p>\n<p class=\"system\"><em>Password updated successfully!<\/em><\/p>\n<p class=\"system\"><em>Reloading privilege tables..<\/em><\/p>\n<p class=\"system\"><em>\u00a0&#8230; Success!<\/em><\/p>\n<p class=\"system\"><em>\u00a0<\/em><\/p>\n<p class=\"system\"><em>By default, a MariaDB installation has an anonymous user, allowing anyone<\/em><\/p>\n<p class=\"system\"><em>to log into MariaDB without having to have a user account created for<\/em><\/p>\n<p class=\"system\"><em>them.\u00a0 This is intended only for testing, and to make the installation<\/em><\/p>\n<p class=\"system\"><em>go a bit smoother.\u00a0 You should remove them before moving into a<\/em><\/p>\n<p class=\"system\"><em>production environment.<\/em><\/p>\n<p class=\"system\"><em>\u00a0<\/em><\/p>\n<p class=\"system\"><em>Remove anonymous users? [Y\/n]\u00a0<strong>y<\/strong><\/em><\/p>\n<p class=\"system\"><em>\u00a0&#8230; Success!<\/em><\/p>\n<p class=\"system\"><em>\u00a0<\/em><\/p>\n<p class=\"system\"><em>Normally, root should only be allowed to connect from &#8216;localhost&#8217;.\u00a0 This<\/em><\/p>\n<p class=\"system\"><em>ensures that someone cannot guess at the root password from the network.<\/em><\/p>\n<p class=\"system\"><em>\u00a0<\/em><\/p>\n<p class=\"system\"><em>Disallow root login remotely? [Y\/n]\u00a0<strong>y<\/strong><\/em><\/p>\n<p class=\"system\"><em>\u00a0&#8230; Success!<\/em><\/p>\n<p class=\"system\"><em>\u00a0<\/em><\/p>\n<p class=\"system\"><em>By default, MariaDB comes with a database named &#8216;test&#8217; that anyone can<\/em><\/p>\n<p class=\"system\"><em>access.\u00a0 This is also intended only for testing, and should be removed<\/em><\/p>\n<p class=\"system\"><em>before moving into a production environment.<\/em><\/p>\n<p class=\"system\"><em>\u00a0<\/em><\/p>\n<p class=\"system\"><em>Remove test database and access to it? [Y\/n]\u00a0<strong>y<\/strong><\/em><\/p>\n<p class=\"system\"><em>\u00a0&#8211; Dropping test database&#8230;<\/em><\/p>\n<p class=\"system\"><em>\u00a0&#8230; Success!<\/em><\/p>\n<p class=\"system\"><em>\u00a0&#8211; Removing privileges on test database&#8230;<\/em><\/p>\n<p class=\"system\"><em>\u00a0&#8230; Success!<\/em><\/p>\n<p class=\"system\"><em>\u00a0<\/em><\/p>\n<p class=\"system\"><em>Reloading the privilege tables will ensure that all changes made so far<\/em><\/p>\n<p class=\"system\"><em>will take effect immediately.<\/em><\/p>\n<p class=\"system\"><em>\u00a0<\/em><\/p>\n<p class=\"system\"><em>Reload privilege tables now? [Y\/n] <strong>y<\/strong><\/em><\/p>\n<p class=\"system\"><em>\u00a0&#8230; Success!<\/em><\/p>\n<p class=\"system\"><em>Cleaning up&#8230;<\/em><\/p>\n<p class=\"system\"><em>All done!\u00a0 If you&#8217;ve completed all of the above steps, your MariaDB<\/em><\/p>\n<p class=\"system\"><em>installation should now be secure.<\/em><\/p>\n<p class=\"system\"><em>Thanks for using MariaDB!<\/em><\/p>\n<p class=\"system\">======================================================================================<\/p>\n<p>After the script completes, try to log in to the database from console with no root password. The access to the database should be denied if no password is provided for the root account, as illustrated in the below command excerpt:<\/p>\n<p class=\"command\">mysql -h localhost -u root<\/p>\n<pre><em>ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)<\/em><\/pre>\n<p>If the password is supplied, the log in process should be granted to MySQL console, as shown in the command sample. Type exit to leave the database console.<\/p>\n<p class=\"command\">mysql -h localhost -u root -p<\/p>\n<p class=\"system\">Enter password:<\/p>\n<p class=\"system\">Welcome to the MariaDB monitor.\u00a0 Commands end with ; or \\g.<\/p>\n<p class=\"system\">Your MariaDB connection id is 15<\/p>\n<p class=\"system\">Server version: 10.1.26-MariaDB-0+deb9u1 Debian 9.1<\/p>\n<p class=\"system\">Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.<\/p>\n<p class=\"system\">Type &#8216;help;&#8217; or &#8216;\\h&#8217; for help. Type &#8216;\\c&#8217; to clear the current input statement.<\/p>\n<p class=\"system\">MariaDB [(none)]&gt; <strong>exit<\/strong><\/p>\n<p class=\"system\">Bye<\/p>\n<h2 id=\"adjust-php-settings\">Adjust PHP settings<\/h2>\n<p>Next, open PHP default configuration file for editing and change the following PHP variables as described below. Set the PHP <strong>timezone<\/strong> setting to match your system geographical location. The PHP <strong><em>date.timezone<\/em><\/strong> variable can be found by consulting the list of time zones provided by PHP docs at the following link <a href=\"http:\/\/php.net\/manual\/en\/timezones.php\" target=\"_blank\" rel=\"noopener\">http:\/\/php.net\/manual\/en\/timezones.php<\/a>\u00a0<\/p>\n<p>First, make a backup of the PHP configuration file.<\/p>\n<p class=\"command\">cp \/etc\/php\/7.0\/apache2\/php.ini{,.backup}<\/p>\n<p class=\"command\">nano \/etc\/php\/7.0\/apache2\/php.ini<\/p>\n<p>Search, edit and change the following variables in the <strong>php.ini<\/strong> configuration file:<\/p>\n<p class=\"command\">file_uploads = On<\/p>\n<p class=\"command\">memory_limit = 128M<\/p>\n<p class=\"command\">post_max_size = 80M<\/p>\n<p class=\"command\">upload_max_filesize = 80M<\/p>\n<p class=\"command\">output_buffering = 0<\/p>\n<p class=\"command\">date.timezone = Europe\/London<\/p>\n<p>You should increase <strong>upload_max_file_size<\/strong> variable in PHP configuration file in order to support large file attachments.<\/p>\n<p>You should also add OPCache plugin configurations for PHP7 in order to increase the load speed of the web application. Edit php.ini file and append the following lines of code at the bottom of the file, under the <strong><em>[opcache]<\/em><\/strong> statement, as detailed below:<\/p>\n<p class=\"command\">nano \/etc\/php\/7.0\/apache2\/php.ini<\/p>\n<pre>[opcache]<br\/>opcache.enable=1 <br\/>opcache.enable_cli=1 <br\/>opcache.interned_strings_buffer=8 <br\/>opcache.max_accelerated_files=10000 <br\/>opcache.memory_consumption=128 <br\/>opcache.save_comments=1<br\/>opcache.revalidate_freq=1\u00a0<strong><em>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/em><\/strong><\/pre>\n<p>After you\u2019ve added all the code lines described below, close the <strong><em>php.ini<\/em><\/strong> configuration file and check if the OPCache variables had been correctly added by issuing the following command.<\/p>\n<p class=\"command\">grep opcache\u00a0 \/etc\/php\/7.0\/apache2\/php.ini<\/p>\n<p>In order to encrypt and protect Pydio files via PHP encoding, install Ioncube software on your Debian server by issuing the following commands:<\/p>\n<p class=\"command\">wget https:\/\/downloads.ioncube.com\/loader_downloads\/ioncube_loaders_lin_x86-64.tar.gz<\/p>\n<p class=\"command\">tar xfz ioncube_loaders_lin_x86-64.tar.gz<\/p>\n<p class=\"command\">cp ioncube\/ioncube_loader_lin_7.0.so \/usr\/lib\/php\/20151012\/<\/p>\n<p>Then, edit the ioncube configuration file and add the following line.<\/p>\n<p class=\"command\">nano \/etc\/php\/7.0\/apache2\/conf.d\/00-ioncube.ini<\/p>\n<p><strong>00-ioncube.ini<\/strong> file excerpt:<\/p>\n<pre>zend_extension=ioncube_loader_lin_7.0.so<\/pre>\n<p>Restart Apache server to apply the Ioncube extension.<\/p>\n<p class=\"command\">systemctl restart apache2<\/p>\n<p>As the final step in configuring LAMP stack, create a PHP info file in web server webroot path by executing the following command.<\/p>\n<p class=\"command\">echo &#8216;&lt;?php phpinfo(); ?&gt;&#8217;| tee \/var\/www\/html\/info.php<\/p>\n<p>Visit the PHP info script file from a browser at the following URL, and check if Ioncube Zend has been successfully loaded and, also, scroll down to <strong>date<\/strong> setting to check PHP time zone configuration. The timezone settings should reflect your PHP geographical location configured earlier.<\/p>\n<p><strong><em>https:\/\/domain.tld\/info.php<\/em><\/strong><\/p>\n<h2 id=\"download-and-install-pydio\">Download and Install Pydio<\/h2>\n<p>Now that all system requirements have been met for installing Pydio community software, open a browser and navigate to Pydio official download page at <a href=\"https:\/\/pydio.com\/en\/community\" target=\"_blank\" rel=\"noopener\">https:\/\/pydio.com\/en\/community<\/a> and copy the download link in order to grab the latest zip archive in your system via the wget utility.<\/p>\n<p class=\"command\">wget https:\/\/download.pydio.com\/pub\/core\/archives\/pydio-core-8.0.2.zip<\/p>\n<p>After Pydio zip archive download finishes, extract the zip archive file to your current working directory and list the extracted files with the ls command.<\/p>\n<p class=\"command\">unzip pydio-core-8.0.2.zip<\/p>\n<p class=\"command\">ls<\/p>\n<p>Next, remove the default index.html file installed by the Apache web server to webroot path and also delete the info.php file created earlier.<\/p>\n<p class=\"command\">rm \/var\/www\/html\/index.html<\/p>\n<p class=\"command\">rm \/var\/www\/html\/public\/info.php<\/p>\n<p>Copy Pydio installation files located in your current working directory in <strong>pydio-core-8.0.2\/<\/strong> directory. Issue <strong>ls<\/strong> command to list this directory files for hidden files. Copy all the content of the extracted directory to your web server document root path by issuing the following command. Also, make sure you copy the hidden file <em>.htaccess<\/em> to webroot path.<\/p>\n<p class=\"command\">ls -al pydio-core-8.0.2<\/p>\n<p class=\"command\">cp -rf pydio-core-8.0.2\/* \/var\/www\/html\/<\/p>\n<p class=\"command\">cp pydio-core-8.0.2\/.htaccess \/var\/www\/html\/<\/p>\n<p><strong\/>Next, grant Apache runtime user with full write permissions to the document root path by executing the following command. Use the <strong>ls<\/strong> command to list permissions for application\u2019s installed files under the \/var\/www\/html\/ directory.<\/p>\n<p class=\"command\">chown -R www-data:www-data \/var\/www\/html\/<\/p>\n<p class=\"command\">ls -al \/var\/www\/html\/<\/p>\n<p>Next, open Pydio <strong>bootstrap_conf.php<\/strong> configuration file located in the webroot path and modify the below lines, as shown in the below file excerpt:<\/p>\n<p class=\"command\">nano \/var\/www\/html\/conf\/bootstrap_conf.php<\/p>\n<p><strong>\u00a0bootstrap_conf.php<\/strong> file sample:<\/p>\n<pre>setlocale(LC_ALL, \"en_US.UTF-8\");<br\/>define(\"AJXP_LOCALE\", \"en_EN.UTF-8\");<\/pre>\n<p><a class=\"fancybox\" id=\"img-Capture2\" href=\"https:\/\/www.howtoforge.com\/images\/install_pydio_web_file_share_solution_in_debian_9\/big\/Capture2.PNG\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/03\/how-to-install-pydio-web-file-manager-on-debian-9-1.png\" alt=\"Pydio installation\" width=\"550\" height=\"400\" title=\"\"><\/a><\/p>\n<p>In the next step, log in to MariaDB database console and create the Pydio application database. Also, add a new MySQL user for managing Pydio database and setup a strong password for this user. Issue the below commands to create database and user and make sure you replace the database name, user and password used in this guide with your own settings.<\/p>\n<p class=\"command\">mysql \u2013u root -p<\/p>\n<p class=\"system\">Welcome to the MariaDB monitor.\u00a0 Commands end with ; or \\g.<\/p>\n<p class=\"system\">Your MariaDB connection id is 305<\/p>\n<p class=\"system\">Server version: 10.1.26-MariaDB-0+deb9u1 Debian 9.1<\/p>\n<p class=\"system\">Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.<\/p>\n<p class=\"system\">Type &#8216;help;&#8217; or &#8216;\\h&#8217; for help. Type &#8216;\\c&#8217; to clear the current input statement.<\/p>\n<p class=\"command\">MariaDB [(none)]&gt; CREATE DATABASE pydio_db;<\/p>\n<p class=\"system\">Query OK, 1 row affected (0.00 sec)<\/p>\n<p class=\"command\">MariaDB [(none)]&gt; grant all privileges on pydio_db.* to &#8216;pydio_user&#8217;@&#8217;localhost&#8217; identified by &#8216;mypass123&#8217;;<\/p>\n<p class=\"system\">Query OK, 0 rows affected (0.00 sec)<\/p>\n<p class=\"command\">MariaDB [(none)]&gt; flush privileges;<\/p>\n<p class=\"system\">Query OK, 0 rows affected (0.00 sec)<em> <br \/><\/em><\/p>\n<p class=\"command\">MariaDB [(none)]&gt; exit<\/p>\n<p><em\/><strong\/>After you\u2019ve created the database, open a browser and navigate to your server IP address or domain name via the HTTPS protocol in order to start with the Pydio web installation process. On the first installation screen, select your language and hit on Start Wizard button to start the installation process.<\/p>\n<p><a class=\"fancybox\" id=\"img-Capture3\" href=\"https:\/\/www.howtoforge.com\/images\/install_pydio_web_file_share_solution_in_debian_9\/big\/Capture3.PNG\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/03\/how-to-install-pydio-web-file-manager-on-debian-9-2.png\" alt=\"Pydio setup wizard\" width=\"550\" height=\"446\" title=\"\"><\/a><\/p>\n<p>On the next installation screen, add an Application Title and the Welcome Message for Pydio application and hit on Next button to move to the next configuration screen.<\/p>\n<p><a class=\"fancybox\" id=\"img-Capture4\" href=\"https:\/\/www.howtoforge.com\/images\/install_pydio_web_file_share_solution_in_debian_9\/big\/Capture4.PNG\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/03\/how-to-install-pydio-web-file-manager-on-debian-9-3.png\" alt=\"Pydio application settings\" width=\"550\" height=\"470\" title=\"\"><\/a><\/p>\n<p>Next, add your Pydio application administrator name and full name. Supply and confirm a strong password for admin account and hit on Next button to move to the next configuration screen.<\/p>\n<p><a class=\"fancybox\" id=\"img-Capture5\" href=\"https:\/\/www.howtoforge.com\/images\/install_pydio_web_file_share_solution_in_debian_9\/big\/Capture5.PNG\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/03\/how-to-install-pydio-web-file-manager-on-debian-9-4.png\" alt=\"Set administrator name and password\" width=\"550\" height=\"470\" title=\"\"><\/a><\/p>\n<p>In the next screen, configure database connection settings. Select MySQL as database type, use localhost as database host and add Pydio database name, user and password created earlier in order to connect to the database. Hit on the Test DB Connection button to log in to Pydio database and move forward with the installation process.<\/p>\n<p><a class=\"fancybox\" id=\"img-Capture6\" href=\"https:\/\/www.howtoforge.com\/images\/install_pydio_web_file_share_solution_in_debian_9\/big\/Capture6.PNG\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/03\/how-to-install-pydio-web-file-manager-on-debian-9-5.png\" alt=\"database details\" width=\"550\" height=\"505\" title=\"\"><\/a><\/p>\n<p>In advanced options screen, change application encoding dataset and server URL address if they weren\u2019t correctly detected, enable the cache setting, add your email address and default language and hit on Install Pydio button to start the installation.<\/p>\n<p><a class=\"fancybox\" id=\"img-Capture7\" href=\"https:\/\/www.howtoforge.com\/images\/install_pydio_web_file_share_solution_in_debian_9\/big\/Capture7.PNG\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/03\/how-to-install-pydio-web-file-manager-on-debian-9-6.png\" alt=\"Advances options\" width=\"516\" height=\"550\" title=\"\"><\/a><\/p>\n<p>After the installation process completes, the install wizard will automatically redirect you to Pydio Login page form. Supply the application admin username and password configured during the installation process in order to log in to Pydio dashboard.<\/p>\n<p>You can also log in to Pydio web sharing application by visiting your domain name or server IP address via HTTPS protocol.<\/p>\n<p><strong><em>https:\/\/www.yourdomain.tld<\/em><\/strong><\/p>\n<p><a class=\"fancybox\" id=\"img-Capture9\" href=\"https:\/\/www.howtoforge.com\/images\/install_pydio_web_file_share_solution_in_debian_9\/big\/Capture9.PNG\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/03\/how-to-install-pydio-web-file-manager-on-debian-9-7.png\" alt=\"Login to Pydio\" width=\"550\" height=\"432\" title=\"\"><\/a><\/p>\n<p>After logging in to Pydio admin dashboard, you can follow the wizard tour that will pop-up in order to quickly learn how to manage application via the web admin panel.<\/p>\n<p><a class=\"fancybox\" id=\"img-Capture10\" href=\"https:\/\/www.howtoforge.com\/images\/install_pydio_web_file_share_solution_in_debian_9\/big\/Capture10.PNG\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/03\/how-to-install-pydio-web-file-manager-on-debian-9-8.png\" alt=\"Pydio dashboard\" width=\"550\" height=\"443\" title=\"\"><\/a><\/p>\n<p>Some visitors might browse Pydio application in an unsecured way via HTTP protocol. In order to force all visitors to securely browse Pydio interface via HTTPS protocol go back to your server\u2019s console and edit the <em>.htaccess<\/em> file located in web root directory by issuing the following command.<\/p>\n<p class=\"command\">nano \/var\/www\/html\/public\/.htaccess<\/p>\n<p>Once the .htaccess file is opened for editing, search for the line that starts with <strong><em>RewriteEngine on<\/em><\/strong> and add the below redirect rules under this line.<\/p>\n<pre># Redirect to HTTPS<br\/>RewriteCond %{HTTPS} off<br\/>RewriteRule (.*) https:\/\/%{SERVER_NAME}\/$1 [R,L]<\/pre>\n<p>Also, if you want to change PHP server settings, so that you can increase file upload sizes or other PHP variables, append the below lines to the bottom of .htaccess file, as shown in the below excerpt.<\/p>\n<pre>php_value upload_max_filesize 50M<br\/>php_value post_max_size 50M<\/pre>\n<p>Congratulations! You have successfully installed Pydio file sync and sharing application in Debian 9 server. For other special types of installation procedures and configurations regarding the application, visit the Pydio documentation page at the following address: <a href=\"https:\/\/pydio.com\/en\/docs\/administration-guides\" target=\"_blank\" rel=\"noopener\">https:\/\/pydio.com\/en\/docs\/administration-guides<\/a>\u00a0<\/p>\n<div>\n<p><b>Share this page:<\/b><\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Pydio is a powerful open source web file sync and file share solution software for online collaboration, similar to Gdrive or other online file-sharing services.\u00a0Mostly written in PHP programming language and Ajax, Pydio can be installed on a Linux virtual private server or physical server under Apache\/Nginx web servers, PHP and MySQL\/MariaDB database management system &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[],"class_list":["post-3199","post","type-post","status-publish","format-standard","hentry","category-36"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/3199","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=3199"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/3199\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=3199"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=3199"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=3199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}