Install owncloud on Debian Linux

ownCloud is open source file sync and share software for everyone from individuals operating the free ownCloud Server edition, to large enterprises and service providers operating the ownCloud Enterprise Subscription. ownCloud provides a safe, secure, and compliant file synchronization and sharing solution on servers that you control.

You can share one or more files and folders on your computer, and synchronize them with your ownCloud server. Place files in your local shared directories, and those files are immediately synchronized to the server and to other devices using the ownCloud Desktop Sync Client, Android app, or iOS app.

Stable owncloud repositories

Add the ownCloud Repository
You can add the repository key to apt. Keep in mind that the owner of the key may distribute updates, packages and repositories that your system will trust.

wget -nv -O Release.key
sudo apt-key add - < Release.key
sudo sh -c "echo 'deb /' >> /etc/apt/sources.list.d/owncloud.list"
sudo apt-get update


sudo apt-get install owncloud

Create a MySQL database

mysql -u root -p
CREATE USER myuser IDENTIFIED BY 'mysecurepassword';
GRANT ALL PRIVILEGES ON owncloud.* TO myuser;
flush privileges;

Create a data directory

sudo mkdir /var/owncloud
sudo chown www-data:www-data /var/owncloud
sudo chmod 750 /var/owncloud

Open ownCloud web installer in your browser

* Enter the desired administrator username and password in the login fields. Please choose a secure password and also a username that is not “admin” or “administrator”.
* Data folder: /var/owncloud
* Choose MySQL as database backend.
> Username: myuser
> Password: The password that you have choosen for the database.
> Database name: owncloud
> Hostname: localhost
* Click on ‘Finish setup’

Access ownCloud with SSL (https)