These days, many projects rely on cloud based file-sharing tools like Dropbox, Google Drive, iCloud and OneDrive. These solutions often sport a user friendly interface and offer a huge storage quota, but they are ‘free with limitations’. The lack of control and integration into existing infrastructures can drive organizations towards alternatives, many of which are found in the open source realm.
There are a number of different open source file-sharing and sync alternatives. ownCloud is perhaps the best-known, Pydio is another option. Both projects are now collaborating together in a federated sharing initiative, basically giving users the ability to share files across different file sharing solutions.
Pydio Enterprise Edition is hosted exclusively on a private server or cloud, assuring your data is securely managed and under full company control, with real-time, built-in monitoring. The system combines a plugin architecture with comprehensive REST APIs and provides fine grained access control management (connecting to LDAP/AD/SAML user directories). Sync clients are available for Windows, Mac, Linux as well as offering iOS and Android mobile platforms. Servers can be installed on Windows and on most Linux distributions.
This article starts with the basic Pydio server setup, before moving on to show how to create your own application consuming the Pydio APIs.
Install the Server
There are a number of ways to install a server. For this article we will go into detail for an Amazon S3 cloud based install and a Linux install.
If you haven’t got an AWS account yet, sign up here: https://aws.amazon.com
Select an Amazon Machine Image (AMI) that suits your purposes. Select from AWS Marketplace or use a Community AMI. The Marketplace version usually come with costs, the community editions are free of charge.
For the purpose of this demo and in general we highly recommend using a 64-bit system as a 32-bit system may have certain limitations. We will go for a Debian Linux community AMI:
Clicking the Launch button will create your Debian server up and running.
Connect to this instance following the commands below:
ssh -i "your-ssh-key.pem" firstname.lastname@example.org
Add Pydio’s repository key:
wget -qO - https://download.pydio.com/pub/linux/debian/key/pubkey | sudo apt-key add -
Install the apt-transport-https package. That is necessary because the Pydio repository is at *https*
sudo apt-get install apt-transport-https
Edit /etc/apt/sources.list and add the following lines
deb https://download.pydio.com/pub/linux/debian/ jessie-backports main deb-src https://download.pydio.com/pub/linux/debian/ jessie-backports main
sudo apt-get update
Verify pydio repository with the following command. You will be presented with a list of all Pydio’s packages.
For this project, we use the ‘pydio-core’ package. The full-feature system, can be installed using ‘pydio-all’
sudo apt-get install pydio-core
The Apache webserver and PHP will be installed together with pydio-core.
Install and configure MySQL
sudo apt-get install mysql-server mysql-client
Once mysql service is running on your system, connect to this server and create a new user and database for the Pydio application. (type these commands by hand, don’t copy/paste them)
mysql u root p CREATE DATABASE pydio; CREATE USER 'pydio'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON pydio.* TO 'pydio'@'localhost'; exit;
Execute the following commands to modify php.ini parameters
sudo sed -i "s/output_buffering = 4096/output_buffering = Off/g" /etc/php5/apache2/php.ini sudo sed -i "s/upload_max_filesize = 2M/upload_max_filesize = 1024M/g" /etc/php5/apache2/php.ini sudo sed -i "s/post_max_size = 8M/post_max_size = 1024M/g" /etc/php5/apache2/php.ini sudo sed -i "s/memory_limit = 128M/memory_limit = 1224M/g" /etc/php5/apache2/php.ini sudo sed -i "s/max_execution_time = 30/max_execution_time = 300/g" /etc/php5/apache2/php.ini
Please change the file permissions (ownership) of the installation directory /usr/share/pydio/, so the Apache web server gets write access. Then restart the web server.
sudo chown R wwwdata:wwwdata /usr/share/pydio/ sudo service apache2 restart
From the AWS account console, you can see the Public DNS of your current computer. Use a webbrowser to configure Pydio:
and follow the Wizard to complete the installation.
The diagnostic tool will checks your instance for known issues. The tool checks if the default data folder used by Pydio is writeable for it’s cache and storing workspace data with the Filesystem driver. The necessary php extensions and browser support are checked.