Create your own cloud data server with OwnCloud

ownCloud is an application of FOSS that will allow you to create a file server in the cloud, in which you can have a warehouse of images, documents or even you music, data to which you will have access from anywhere with internet.


Many of the readers will surely already know and some will perhaps use file storage solutions in the cloud, services such as UbuntuOne, Dropbox or SpiderOak, in which you can store your photos, documents and even your music to be able to access your them from any computer with internet.

Well, but now the problem, it turns out that the main limitation of these services is space, because in some cases these companies offer free accounts but with storage space of between 2 to 5 GB, so if you want more space you will have to pay . Another important aspect, perhaps the most important from my point of view, is privacy. Unfortunately, companies are created to make money and this is what drives them, so your data could even be sold to the highest bidder, not to mention that the applications that these companies develop to synchronize data are generally not Free Software.

Luckily, there is an application that is Free Software and that perfectly covers the function of storing data in the cloud, I speak of OwnCloud. Among its main features are:

  • A nice and easy web interface
  • File sharing to OwnCloud users and non-users
  • PDF file viewer
  • Calendar / Agenda
  • Contact management
  • Accessing your files through WebDAV
  • Integrated music player
  • A gallery where you can view your images
  • A simple text editor
  • The security that your data is on your server and not in the hands of strangers.

As if that were not enough, the storage capacity will only be limited by the space that you have available on your hard drive.

Would you like to have a data server in the cloud in which you have full control?

Installation

This guide has been tested on Debian Squezee and various versions of Ubuntu, as prerequisites we must have the Apache web server and the MySQL database manager installed and running.

1.- Install dependencies

apt-get install php-pear php-xml-parser php5-sqlite php5-json sqlite mp3info curl libcurl3-dev zip

2.- Create the database with MySQL

In terminal we use the following command:

mysql -u root -p

will ask for password

then the mysql command line will appear, where we will add the following instructions:

mysql> create database name_of_our_database;

Will reply: Query OK, 1 row affected (0.00 sec)

we close mysql with:

mysql> quit

3.- Download and unzip Owncloud

We download the package owncloud-x.tar.bz2 and later we unzip it.

tar -xvf owncloud-x.tar.bz2

4.- Copy the owncloud directory to our Apache server as root

mv owncloud / var / www

5.- We give the web server permissions to the owncloud directory:

chown -R www-data: www-data owncloud

6.- We restart our apache server:

/etc/init.d/apache2 restart

7.- Finish the installation

From the address bar of a web browser we type:

ip.de.tu.server / owncloud (if you access from another computer on the network)

localhost / owncloud (if you access from the computer where owncloud is installed)

Then the web interface will be shown to us to finish the installation.

We create an administrator account and select the "Advanced" option. Then, we enter the username, database name and password of the database and click the "Complete the installation" button.

Once inside our administrator account we can configure the service and create users. To ensure access from the internet we must have the dynamic DNS service, such as No-IP. Once we have our account in this service, we can access our OwnCloud server from anywhere with internet using a browser with the address:

http://nombre_elegido_en_No-IP.no-ip.org/owncloud

8.- Increase the weight limit of files to upload.

By default, the weight of the files to upload is very small. We can correct this by editing the /etc/php5/apache2/php.ini file where we will look for the lines:

"Upload_max_filesize" "post_max_size"

and we change to the size that we consider appropriate.

Ready! We enter from a browser to the address http: //ip.del.servidor.owncloud/owncloud and we can access the web interface to start uploading our files with the security that comes with having them on our own server.

Catches

I leave some screenshots of the OwnCloud server running.

OwnCloud login screen

Data Warehouse Management Interface

PDF reader integrated into OwnCloud web interface

Image gallery

Music Player also integrated in the web interface

File sharing

Calendar / Agenda

Conclusion

OwnCloud is an excellent alternative to UbuntuOne, SpiderOak, Dropbox or even the now-defunct Megaupload, it is relatively easy to install and provides all the features of any paid service.

Stay tuned that in a future installment I will show how to install and run the dynamic DNS service with No-IP.

Any questions I await your questions and comments.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Julio Rodriguez said

    Thank you very much, it has been a great contribution as everything is published in this great blog, it has helped me a lot and also I already have it ready with the dynamic No-IP DNS service, I am enabling a guest user so that they can enter and see a sample of the service

  2.   TOSC said

    this article very useful at all

  3.   Laura said

    Very good
    Article. If you are interested (like me) in everything that refers to
    cloud storage, I recommend you visit the web:

    http://www.clouddesktopbuilder.com/es

    You can also follow them on facebook: https://www.facebook.com/pages/Cloud-Personality/267526213292

    The truth is that they update us on everything related to him
    "Cloud".

  4.   Laura said

    Very good
    Article. If you are interested (like me) in everything that refers to
    cloud storage, I recommend that you follow Cloud Personality on facebook. The truth is that they update us on everything related to him
    "Cloud".

  5.   andres said

    doubt, can it be installed in a version of centos?
    I use that system

  6.   Sergio said

    Hello, how are you, how manageable is the manager, for saying I want to put a logo of an institution and so on, it would also run better in Ubuntu?

  7.   Let's use Linux said

    That happens when another application is using APT. For example, when you open the Software Center, APT locks itself so that you can only use it through the Software Center. So, the first way to solve it would be to close the other tool that uses APT that you have open.

    If not, this error can also occur when APT was unexpectedly interrupted and did not close properly.

    To fix this problem, you can delete the lock file:

    sudo rm / var / lib / dpkg / lock

    Cheers! Paul.

  8.   Clara said

    It won't let me install… It tells me I don't have permissions: E: Could not open lock file "/ var / lib / dpkg / lock" - open (13: Permission denied)
    E: A mirror file "/ var / lib / dpkg /" was not found. What do I do? Sorry for the inconvenience

  9.   Let's use Linux said

    You're welcome Jesus! A hug!
    Pablo.

  10.   franc said

    After doing all the steps in the terminal, I type localhost / owncloud in the firefox address bar and I get a window to download a file (it's called AeeLy7OT.phtml). I download it and open it but nothing .. I don't know how to make that window appear in the browser to complete the installation .. Please help !!!
    PS: Thanks a lot to Laszlo for the help, your contribution helped me.

  11.   Kendy said

    I have a question, the computer where you did the installation will have to be turned on all the time ?, since it is a file server

  12.   franc said

    I already tried but the same thing happens to me.

  13.   Carlos Ernest Pruna said

    I have doubts on the subject of increasing the size of the file upload! The default supports uploading up to 512Megas, my php.ini stays with the classics 2M that comes by default but I keep uploading what owncloud tells me if someone has jumped for this question I would appreciate it!

  14.   Paul said

    Even being in the clouds I have no guarantee of anything, «better bird in hand, than a hundred flying», I prefer a good pc with a large disk where I have my things. 🙂

  15.   Let's use Linux said

    I would use the repositories

  16.   Guillermo Linares placeholder image said

    Why don't you try phpmyadmin

  17.   izkalotl said

    Check again the steps you did in terminal, I just did it again following this tutorial and everything is fine ...

  18.   Yo said

    Excellent information, thank you !!

  19.   Let's use Linux said

    First you have to install mysql and php. 🙂
    That is not explained in the post. There are thousands of articles on the subject on the Internet.
    I hope I have been of some help.
    Hug! Paul.

  20.   Let's use Linux said

    First you have to install mysql and php. 🙂
    That is not explained in the post. There are thousands of articles on the subject on the Internet.
    I hope I have been of some help.
    Hug! Paul.

  21.   Let's use Linux said

    Whenever you want to access the data stored in it.

  22.   izkalotl said

    In fact that is what OwnCloud does, your data is on your hard drive and you also have access as if it were any Cloud Storage service, as its name indicates "own cloud" therefore "Of course if you have a guarantee, they are your data, on your disk, on your cloud »

  23.   Jap said

    Hello, very good information and I look forward to the "dynamic DNS service with No-IP", meanwhile a doubt, different versions of the files are saved as in dropbox?
    regards

  24.   resand said

    When you will upload the tutorial on how to configure the dns server

  25.   Daniel said

    test by first running:
    sudo service mysql start

    I had a similar one the other day and executing that command already let me in, I just don't remember if it is exactly the same error, try to see how

    a question, for the apache which is more recommendable?
    install it from the repository with sudo aptitude install apache2
    or download it from the apache page?

  26.   Daniel said

    I have the same problem, when trying to enter from the browser it only gives me to download the index.php file that comes in the owncloud folder, but it only gives me to download, if I open the file it does not show me anything.
    if the content of the file is of any use, I leave it:
    http://pastebin.com/UehwnzMf

    someone who has happened the same and has solved it?

  27.   JSymbian said

    Hello, how are you? Very good publication, I stayed in the step that asks for a password. My question is what is the password? I type the one I have for the pc but I get:
    "ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)". My SO. It is Ubuntu 11.10.

  28.   davidquites said

    You will have to see that I do it from a Virtualized Oniric with VirtualBox ????

  29.   Daniel said

    http://angelinux-slack.blogspot.mx/2012/01/instalar-y-configuracion-simple-de.html

    try to install Apache following that tutorial, it seems to me that this line is especially missing
    # apt-get install php5

    Try and tell me if it works for you, I would not know how to tell you if it works since at this moment I can not test it due to technical problems with my computer, but from what I see with that it should already work perfect

  30.   Ddd said

    So good, thanks for sharing..

  31.   Rock cease said

    If it is a wireless router, enter

  32.   Rock cease said

    … Enter the Web configuration and deactivate the NAT translation, which is what makes you browse with a single IP, since all the IPs that your PCs have are private, thanks to the NAT of the router.

  33.   Godinez said

    Very good guide is appreciated! but for when the one of a dynamic DNS with No-IP.?

  34.   Jesus said

    Really magnificent, it works without any problems the first time, I was surprised. I immediately subscribe to you. Many thanks !!!

  35.   Carlos said

    Excellent tutorial. As always a very good job and my thanks for sharing all this material with us.
    Now all you have to do is try and play with the software.
    Greetings.

  36.   InfiniteLoop said

    Hey 😀 Hello, the post helped me and I already managed to make it run in Arch * dark circles * Hahahaha Well, now the only thing that I can't make work is the dynamic DNS service with No-IP, I already registered and everything, but at the entering the address of my host redirects me to the page of my router D:
    Please help me to configure the service, thank you very much, excellent blog

  37.   franc said

    Hi. I was re interested in being able to use this software .. But I have a problem, when I write mysql -u root -p in step 2, I get this in the terminal after writing my pass: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2).
    What should I do?

  38.   Laszlo demeter said

    Probably the mysql server is not installed correctly or is not installed. Try "sudo apt-get install mysql-server" first

  39.   Joel said

    The only problem with this is that it is for "ultra geeks", that is, anyone with enough time and curiosity can try and achieve it with good tutorials, but if they have not studied some servers and for example they are not clear about what a service is of dynamic DNS because it will be difficult for them to start it, you already see several comments that think that nothing else is to copy and paste commands, unfortunately it is not like that, anyone can do it but you have to read and understand a little.

    In addition, this implies having the machine where the server is mounted all the time on if we want to enter at any time, which in the end, possibly the electricity bill will send us the bill at the end of the month, and probably the sum at the end of year would come out at the same price as UbuntuOne could charge us per year depending on the amount of storage we want.

    In my opinion, as I said, this is for "blood geeks" people, for privacy freaks who need to handle "top secret" files, or for someone who already has a server set up and has it all turned on anyway. weather. It could also be used for companies depending on the way it is applied, but for the "standard" user it is not very practical.

    That is, that is the great thing about free software, which offers privacy to those who want it and the possibility of creating our own projects, everyone has their right to privacy even if it is only to go and impress their friends with the server that was set up hehe, but for this at least for the moment it implies several obstacles that are not practical for everyone.

  40.   izkalotl said

    Exactly, Free Software provides you with many tools for you to achieve your own freedom and privacy, and although monetarily speaking the cost is almost the same, the main advantage of this is the security that the data resides on a pc of your property and the Security is put by you and not a company, and this type of program is a living example that anyone (not just a geek) can have this type of service with a little effort.

  41.   Manuel Guirado said

    Well I'm not an expert, let's say I'm a beginner, I've been using Linux for two weeks and it only took me half a day to configure it. Of course, with many problems and a step that I do not finish taking and that is that I cannot create the admin account in OwnCloud, xDDD the dumbest thing xD

  42.   davidquites said

    Thank you very good article, this alternative is very interesting, I have tried it and when I access http://localhost/owncloud I download a file in PHP but I do not get the owncloud login screen, would I make a wrong step or will I be missing any more dependencies?
    Thanks and Greetings from Galicia

  43.   Stephen D. said

    you have to start the server. The same thing happens to you as if you opened any php file from another place

  44.   rv said

    Thank you very much for the post. DIY and community systems: The only free and secure future comes down these roads 🙂
    Greetings and congratulations!

  45.   if said

    excellent ... good info and good help..thanks

  46.   izkalotl said
  47.   Alejandro Martínez said

    Wonderful!
    I will try it with some pots that I have dusty around and then I will tell you how it went.

  48.   harry said

    I have a question / problem, what happens is that to modify the upload size I put what it says there »/etc/php5/apache2/php.ini» even with sudo and gedit and everything and it marks me accesses denied, I would like to know if You can pass me either the complete line or help me with this

    1.    KZKG ^ Gaara said

      You must open it but as root, try pressing [Alt] + [F2] and type: gksu gedit
      Then that gedit will open for you with administrator permissions

    2.    let's use linux said

      As long as you open it as root / admin you shouldn't have ANY problem.

  49.   Javier said

    Hello good night friend, believe me that I need your help a lot, I set up my server on linux and I could never host it to the web using the no-ip service, the truth is I don't know what I failed, so now I have it on windows 7 but I see tutorials to host it on the internet but it has not solved my problem, I connect it directly to a mode in DHCP, nor with an IP address, I don't see a solution, could you help me how to host it, please, it's my degree project, I would appreciate it very much friend, THANK YOU, I HOPE A PROMPT ANSWER

  50.   SinT said

    Hi friend. I would like to know if this program serves to be accessible from outside the internal network. Because I have followed your steps and I have a server set up, but I can't know how to enter from outside.

    1.    let's use linux said

      Yeah sure. Maybe you can't access because you don't have port-forwarding enabled on your router / firewall.
      Hug! Paul.

      1.    SinT said

        I don't have the port enabled, since I don't know which port to enable. Do you mind telling me? Thank you.

        1.    let's use linux said

          I think it is 80 and you would have to give your server a fixed IP.
          At least that's how I would. 🙂
          Cheers! Paul.

  51.   Stephan said

    Can I install a joomla by this means and run it by Owncloud?

  52.   Stephan said

    I can upload a joomla and run it by owncloud

  53.   Javier said

    hello friends LINUXERS, I already did excellent, everything went well, I was able to get my server to the internet but my internet access was directly in DHCP and everything works correctly, I have my server in the office, and regarding the size of upload in configurations there is an option to change from the same interface the maximum file upload size is 2 GB very good up to movies I have GREETINGS from both yuca veracruz

  54.   mrgm148 said

    Spectacular post, very helpful.

    Is there OwnCloud application for android ?.

    in order to access our files from the mobile.

  55.   Francisco said

    Thank you very much for your contribution. I would like you to pass me your email address as I am interested in setting up this service for the personal use of my company.

    Best regards ..

    Atte. Francis b.

  56.   Ferdinand VA said

    Gentlemen,
    Let's see, I'm sure I didn't do something right, everything perfect until the moment I entered http://localhost/owncloud, I downloaded the index.php instead of opening it, I tried it in mozilla, in chrome and from there I didn't know what to do.
    Thanks in advance!

    1.    KZKG ^ Gaara said

      This happens because you do not have PHP5 installed on your server, or because it is not linked to your Apache or Nginx, that is, the server does NOT process the .php

  57.   FERNANDO GARCIA GUEL said

    good day

    I'm new to this, I want to generate the terminal but I can't, you could help me

    regards
    Thank you

  58.   Jose Dorado said

    I can't create the username or password
    please help I get this:
    Error
    MySQL / MariaDB username and / or password not valid You need to enter either an existing account or the administrator.

    1.    let's use linux said

      Hello Jose!

      I think it would be better if you ask this question in our question and answer service called Ask DesdeLinux so that the whole community can help you with your problem.

      A hug, Pablo.

  59.   Marc said

    Good morning,

    I have been using owncloud for a year and everything is super good, but now I need to create another user that accesses only two folders of the 15 that I have. And I don't know how to do that. I have owncloud 6.

    Your article is very good,
    Thank you.
    Marc

  60.   nahu said

    Hello, to a question I want to put my no-ip in owncloud and I don't get the way to do it, you can tell me how to configure it with owncloud in ubuntu 14.04 .. thanks

    1.    Tavo said

      Regarding NO-IP, in my case I have configured this service in the router and also add a forward in it (router) redirecting port 443 to the machine where I have the owncloud.
      Then in the server file:
      /etc/owncloud/config.php

      I add what is related to the domain (case 1, since 0 adds it by default):
      ...
      array(
      0 => '192.168.0.3',
      1 => 'domain-no-ip',
      ),
      ....

      We restart apache and that's it, now we can access it like this:
      https://dominio-no-ip/owncloud

      For mobile access, we must put the path:
      https://dominio-no-ip/owncloud/remote.php/webdav

      and ready.
      For Android I use the "ocloud for owncloud" program.

      I use debian testing and the installation was transparent. I should have installed Mysql too but it would be, it was very simple and I found it great. It remains to add folder upload but hey, it will come.
      To support free software !!
      SL2.

  61.   Vladimir Campos said

    Very interesting, I am new to this, I already installed the owncloud and I really like how everything works, I am trying to install the chat, I follow this guide that I found on youtube: https://youtu.be/At9obC0Vp5A, I hope it helps you.

  62.   Jeff said

    hello I need help with the space I already have the server running but the storage space I cannot increase from 513 mB even I change the php.ini file to 16G but there is no change. Thanks for the help I hope answer .. !!!