How to install Owncloud 6 in Ubuntu 13.10 Server

In this tutorial we will learn,how to install Owncloud 6 in Ubuntu 13.10 Server.Recently, the Owncloud community has released its new verison called Owncloud 6. Owncloud is one the best alternative for Dropbox and Google Drive. You can self host the Owncloud very quickly in short span of time.You can access,share and sync the data from owncloud from computers and mobile devices.

Detail of Server in which practical is done

Operating System: Ubuntu 13.10 Server editon
Operating System Architecture: x86_64
IP Address: 192.168.56.102

To install Owncloud 6 in Ubuntu 13.10,follow the given below steps

Step 1: Become a superuser

Login into Ubuntu System.Open the terminal and become a superuser by typing given below password

Step 2: Add Owncloud repository information in Apt source list file

Run the below command to add Owncloud repo URL in Apt source list file

Step 3: Install Web Server,Database Server,Owncloud package and PHP 5

Run the below given command to install apache,mysql-server,owncloud and php version 5. While installation it will ask to give new password for MySQL root user.Hence give new MySQL root password while installation.

Step 4: Edit the apache2.conf file

First take the backup of apache2.conf file,

Now edit the apache2.conf, find the line <Directory /var/www> .Now replace AllowOverride None to AllowOverride All as given below.
Note: I have edited with vim editor,use your favorite editor

Step 5: Edit the owncloud.conf file

First we will take backup of owncloud.conf file. Clear all the contents from /etc/apache2/conf.d/owncloud.conf and paste below given content.

Step 6: Enable rewrite module in apache

Enable rewrite module in apache and restart the apache service

Step 7: Create Database and user for owncloud in MySQL server

We will create database called owncloud and mysql user called ownclouduser.Now login into mysql server.Create mysql user and database plus grant privileges to user on the database.

First restart the mysql (If mysql server is running then not require)

Step 8: Install Owncloud from Web interface

Open the browser and type http://IP-address-Of-Server/owncloud .Fill all the information field as asked in Webinterface

User Name : Give Admin user name
Password : Give Admin user’s password

Click on Advanced button

Data Folder: It will be selected by-default

In “configure the database” section,click on MySQL and fill

MySQL user : ownclouduser
Password : Give mysql ownclouduser password
Database Name : owncloud
Database Host: localhost

Owncloud 6

Now it takes a few seconds to complete and suddenly you will get next screen opened like this

Owncloud 6 dashboard

Now the installation is completed.Now you can start uploading,downloading,sharing the data in owncloud. With Admin user you can create user and install useful apps. Explore owncloud,it is awesome

Further Reading : Setup Owncloud 6 with Self Signed SSL Certificate in Ubuntu 13.10

  • David Delorme

    sh -c ??
    worked fine till last step then i got a garbled screen.
    Apache log said htaccesstest.txt client denied by server configuration.
    tried several times same error ?? I will look at it later.

    • http://www.sharadchhetri.com sharad chhetri

      Thanks David, in sh -c , there is typo of ” . The command will add the repo link of owncloudd url in apt-get list

  • David Delorme

    text is now unselectable

    • http://www.sharadchhetri.com sharad chhetri

      Thanks David,

      For reporting the issue.It is because of page was not load properly.
      I am optimizing the site now.I hope you have setup the owncloud now

  • Michael Elmdal

    Very helpfull guide!!
    A little typo in the MySQL setup

    The line “GRANT ALL ON owncloud.* TO ‘owncloud’@’localhost’;” is not correct
    The user should be ownclouduser as it is created just above.

    • http://www.sharadchhetri.com sharad chhetri

      Thanks Michael,

      I really appreciate,you notified the typo.This is very helpful.
      Thanks again for heads up.

      Regards
      Sharad

  • Chris

    Thanks for the guide, it worked well. I now need to get https working under 13.10

    • http://www.sharadchhetri.com sharad chhetri

      Thankyou Chris,

      Try this tutorial http://sharadchhetri.com/2013/05/24/how-to-configure-self-signed-ssl-certificate-in-owncloud-ubuntu/

      Only difference is,in Ubuntu 13.10 , apache version 2.4.Might be some new terms we have to change. I will check this SSL setup in ubuntu 13.10 . Some of users has done that with this same tutorial.
      Regards
      Sharad

    • David

      Hi! Did you get owncloud https working in Ubuntu 13.10?

      I really need it and have tried everything but can’t get it to work.

      Kind regards,
      David.

      • http://www.sharadchhetri.com sharad chhetri

        Yes,I have done the practical on https with owncloud in Ubuntu 13.10.
        I have not documented yet.Will write soon and will send you the email after completion

      • http://www.sharadchhetri.com sharad chhetri

        Hello David,

        I have just documented the SSL Owncloud 6 in Ubuntu 13.10 Server. Here is the post

        Let me know if any typo or you face any issue.

  • Rudrugis Nossranie

    If I would like to change the home folder for all owncloud users to a specific drive is it enough to change owncloud.conf and apache2.conf directory from /var/www to /media/”drive”/ocdata ?

    And to be clear I’m a complete beginner in linux so please be patient. Just newly started playing around with Ubuntu Server and so far it has been a lot of fun. I have been able to set up a few services successfully so far but due to my inexperience it has taken somewhat longer than I thought :)

    • http://www.sharadchhetri.com sharad chhetri

      Hello Rudrugis Nossranie,

      Welcome in Linux World.I hope you are enjoying working on Linux OS.

      In short,I would like to share some information on Owncloud and apache web server.

        In owncloud,there is directory called data .Which is one the most important directory because it contains all user data inside.I expect from you to explore this directory and understand its tree.
        Always remember, Apache web server run with its user called www-data(In Debina based OS like Ubuntu) and apache(it is username,in Red Hat based OS like CentOS/Scientific Linux)

      I will recommend you to keep owncloud all files and directory in Apache Webserver default directory like /var/www (In Debian/Ubuntu) or /var/www/html (Red Hat/CentOS)

      Now as per your question.You want to keep Owncloud data in /media/drive/ocdata

      So here is the trick,

      after installing owncloud. Unmount the owncloud data directory and mount point to /media/drive/ocdata

      Before this I will suggest you to take backup of data directory.

      Now unmount the ownlcoud data directory and mount point to /media/drive/ocdata/ . As I have done given below.
      I will also rename original owncloud data directory. And create new directory with name data

      After mounting,now copy all files into new data directory (Remember After mounting)

      Run the command, df -h to check mount point of /var/www/data/ .
      data directory should mount point to /media/drive/ocdata

      Restart the apache web server .

      Now Open owncloud and login. Upload any sample file .Now open the terminal and change to /var/www/data/USER-NAME/ .You will some 3-4 more directory. check in all directory, you should see sample file in any of these directory.

      I used same logic in with NAS filesystem. NAS is like a remote storage.Just for a reference, read this Post (This post is for some experienced user)

      Try the method,which I have given you. And also try to troubleshot yourself.Then only you can able to understand the OS.

      Well, let me know the feedback and you can ask your question anytime in this blog.
      Looking further for your response

      • Rudrugis Nossranie

        Hi, thx for the awesomely quick response. I’m following you guide now.

        I took a look at the data folder found in /var/www/owncloud/ directory as you suggested and think I know what you’re getting at.

        Then I got in some trouble:
        When I do umount I get the following message:
        umount: /var/www/data: not mounted
        which is from my inexperienced point of view a confirmation that the umount was successful but the again that might be an error too for all I know.

        Then when I do the mount with “mount /media/”drive”/ocdata” I get this message:
        mount: /media/”drive”/odata is not a block device”
        which seems to be an error, right? and when I run df -h there is of course no mount for /var/www/data.

        Did I screw things up?
        At least it seems so for I’m not reaching the server any more in my browser.

        Do I need to put things back the way they were and start again from scratch?

        hopefully this is just some small newbie mistake :)

        again thanks for your time and effort in assisting me with this :)

      • Rudrugis Nossranie

        Hi, thx for the awesomely quick response.

        I took a look at the folder structure in /var/www/owncloud as you suggested and think I get where you’re going with this.

        I went and followed your guide above but ran into some trouble on the way which an inexperienced user like myself don’t understand.

        I changed it a little for the “data” folder is located under owncloud dir to begin with.

        Steps:
        1. -> sudo su
        2 -> cp -rvf /var/www/owncloud/data /root/owncloud-data-backup
        3 -> mv /var/www/owncloud/data /var/www/owncloud/data.original
        4 -> mkdir /var/www/data
        5 -> umount /var/www/data
        Message: umount: /var/www/data: not mounted
        6 -> mount /media/”drive”/ocdata /var/www/data
        Message: Mount: /media/”drive”/ocdata is not a block drive

        df -h shows no mount for /media/”drive”/ocdata

        I have no idea what’s going on here :)

        Some google-ing returns the following: mount –bind

        I’m a little hesitant to use this without at least trying to get a response first because I don’t want to mess things up beyond the point of no return :)

        again thank you for your time and effort, this is greatly appreciated.

        • http://www.sharadchhetri.com sharad chhetri

          Hello Rudrugis,

          It was my typo fault,shame on me.(I did typo with owncloud word).
          2nd thing is also, when we rename data dir and after that we used command umount data . The data dir name do not exit after rename.(this is another blunder,I wrote)

          As per default owncloud dir, we should take backup of – /var/www/owncloud/data

          Restore back to old settings.

          • Rudrugis Nossranie

            Hi again

            I managed to sort things out, and got it working again with home folder for users in /media/drive/ocdata

            I didn’t change anything just restarted the server for maintenance and voila it just worked with no mount for it. Don’t know why though :D

            Thank you very much for your help, now I’m going to take a look at ssl

          • http://www.sharadchhetri.com sharad chhetri

            nice, I hope you have checked all things in Server.
            For SSL ,I have written a post . It is not updated post for Ubuntu 13.10,but only difference is Apache 2.4 version.In apache 2.4 ,it uses new term.

  • Evgeniy

    Hey tell me how to configure it would be possible to upload large files was in owncloud???

    • http://www.sharadchhetri.com sharad chhetri

      Hello Evgeniy,

      The option is available in Owncloud dashboard.
      You also have to edit php.ini file. Read this post
      You can also read this post

      • Evgeniy

        hello thanks for the quick response sharad
        But I can not help your post. My version (owncloud 6.0.2) and it otlechaetsya location (/ etc / owncloud / htaccess) and I can not find this fayl.Ne could you tell where to make inquiring (owncloud 6.0.2)
        PS thanks in advance

        • http://www.sharadchhetri.com sharad chhetri

          Hello Evgeniy,

          Apologise, I am not able to understand your question.
          I assume, you are looking for setting in owncloud dashboard to increase upload limit.Below is the screenshot of settings from owncloud dashboard
          Owncloud upload limit setting

          Edit /etc/php5/apache2/php.ini . and change the value of given below parameter.

          After saving the php.ini file. Now restart the apache2 service

          Note: Language is not a barrier, you can write in your country language to describe your question.I generally use google translate.

        • Evgeniy

          спасибо большое я разобрался c файлами, я нашел файл Htaccess..
          Есть другой вопрос можно разделить owncloud на две части ? а именно mysql на одном сервере под управлением windows 2012, а сам owncloud и apache , php на ubuntu 13.10 . Если можно то не могли бы подсказать как это сделать ?

          • http://www.sharadchhetri.com sharad chhetri

            after translation,

            Thank you very much, I figured c files, I found a file Htaccess ..
            There is another question can be divided into two parts owncloud? namely mysql on the same server running windows 2012, and the owncloud and apache, php on ubuntu 13.10. If that is possible could not tell how to do it?

            yes , you can run mysql in other server. In step 8,use the ip address of your mysql server instead of localhost.
            Make your remote database server accessable from owncloud server.
            It will work

  • Evgeniy

    Извините Шарад я в всем разобрался все работает спасибо большое за отличный пост !!!

    • http://www.sharadchhetri.com sharad chhetri

      after translation,

      Sorry I Sharad all figured out everything works thank you very much for the great post!

      Thankyou Evgeniy,keep reading our blog
      (Спасибо Евгений, продолжайте читать наш блог)

  • Evgeniy

    добрый день sharad как можно помочь вашему сайту ?

  • Evgeniy

    добрый день у меня есть вопрос как настроить отправку ссылок по почте?

    • http://www.sharadchhetri.com sharad chhetri

      You have to set mail configuration in file owncloud/config/config.php .
      The owncloud use PHPmailer script.

      Вы должны установить конфигурацию почты в файле OwnCloud / конфигурации / config.php.
      OwnCloud использование PHPMailer сценарий.

  • Evgeniy

    и еще один вопрос какие порты использует сервер owncloud для нормальной работы?

    • http://www.sharadchhetri.com sharad chhetri

      Owncloud using web server.Hence default port for Web Services is port 80 and 443.
      Mysql use the default port 3306 .

      OwnCloud помощью веб server.Hence порт по умолчанию для веб-служб является порт 80 и 443.
      Mysql использовать порт 3306 по умолчанию.

  • Evgeniy

    извиняюсь еще один вопрос как установить модель ldap для аутентификации active directory

    • http://www.sharadchhetri.com sharad chhetri

      Login into Owncloud dashboard with Admin user.
      See at right hand side bar, bottom. Click on App button.
      Now list will be open, click on “LDAP user and group backend” , enable it.
      Click on Admin User > Admin (at top right corner of dashboard)
      Now from “LDAP user and group backend” option will be enabled and you can set the configuration

      Вход в OwnCloud приборной панели с пользователем Админ.
      Смотреть на правой стороне панели, внизу. Нажмите на кнопку App.
      Теперь список будет открыт, нажмите на кнопку “пользователь LDAP и группы серверной”, включите его.
      Нажмите на Админ пользователей> Администратор (в верхнем правом углу панели)
      Теперь из “пользователь LDAP и группы серверной” опция активируется, и вы можете настроить конфигурацию

      • Evgeniy

        Спасибо но вот почту не получается настроить

        • http://www.sharadchhetri.com sharad chhetri

          Для почтового сервера, у вас есть для устранения себя.
          Вещи, чтобы проверить во время рассылки устранение неполадок
          (1) Является ли от OwnCloud сервере, вы в состоянии связаться с вашим почтовым сервером
          (2) тип аутентификации используется в почтовому серверу
          (3) Проверьте журналы в Mail Server
          (4) Кроме того, проверить журналы в OwnCloud сервере
          (5) Это ваш почтовый сервер учетные данные правильно

          For mail server ,you have to troubleshoot yourself.
          Things to check while mailing troubleshooting
          (1) Is from owncloud server,are you able to contact to your mail server
          (2) type of authentication used in Mail server
          (3) Check the logs in Mail Server
          (4) Also check the logs in owncloud server
          (5) Is your mail server credentials are correct

  • Ralphael

    would this install guide work on 14.04?

    • http://www.sharadchhetri.com sharad chhetri

      Hello Ralphael,

      It should also work in Ubuntu 14.04.
      I just downloaded the Ubuntu 14.04 , will write the post soon.

      Regards
      Sharad

  • fawzi

    hi Sharad,
    Thanks for the tutorial above.
    My ownCloud 6 server works fine on my Ubuntu 13.1, both with HTTP and HTTPS access.
    I also used the instructions from owncloud to allow uploads of files larger that 512MB and it works well in HTTP access. (http://doc.owncloud.org/server/6.0/admin_manual/configuration/configuring_big_file_upload.html)

    However in HTTPS access, my max file size limit is set back to 512MB. Do you know how to address this? is there a php file for https mode?
    thanks,

  • Armen

    Nice article but I have found this one
    http://example.com

    • sharadchhetri

      Hello Armen,

      Thankyou,I have checked your given URL. The post is nice. I have edited your comment because we do not promote backlinks.
      I hope you understand.