Category Archives: OwnCloud

ownCloud: upgrading your installation

ownCloud logo

ownCloud logo

Upgrade your ownCloud software with this step by step instruction. This post describes the procedure to upgrade the software. Follow the steps for a save and secure updating of your server. For a more verbose description of this procedure you can also check the upgrade page.


This step by step guide assumes you have a data folder outside your ownCloud installation. Check this in your ~/public_html/owncloud/config/config.php  file. The setting 'datadirectory'  should point to a directory outside your ownCloud installation.

Check your version in the admin panel (admin -> Personal info):

Open a (ssh) shell on your linux box. Then su to the user that runs the ownCloud installation and execute the command (in the installation folder; normally this is on ~/public_html/owncloud):

When you navigate to the site you will see the message below. It indicates that your installation is in maintenance mode:

ownCloud maintenance message

ownCloud maintenance message

Check your version with (execute in installation folder):

Goto the download page and copy the link; then execute the command below in your terminal session

Stop the Apache webserver:

Rename your current installation directory and unpack the archive in a new folder outside of your ownCloud directory with the command (a subdirectory ownCloud will be created by the tar command):

Copy the old configuration file to your new ownCloud folder:

Also copy any apps you have installed in your ownCloud instance!

Now start the actual upgrade by executing the command below (again execute this in the installation folder):

If everything went fine you should see something like this:

As you can see maintenance mode is automatically turned off and your server is ready to serve files again after you have re-started the Apache webserver:

Navigate to your site and check that things are still working as expected. In some cases you have to press the update button in your browser that appears when navigating to the site. If everything is working fine don’t forget to remove the old installation files and the archive you downloaded.

Remember: this step by step guide assumes you have a data folder outside your ownCloud installation. Check this in your ~/public_html/owncloud/config/config.php. The setting ‘datadirectory’ should point to a directory outside your ownCloud installation.

Happy ownClouding!

Share

OwnCloud 7 installation on Ubuntu / VirtualMin

owncloud_logoOwnCloud 7

Store your files, folders, contacts, photo galleries, calendars and more on a server of your choosing. Access them from your mobile device, your desktop, or a web browser. Access your data wherever you are, whenever you need it.

Download the OwnCloud 7 software

Download the OwnCloud 7 software at this location (copy link address of the bz2 file). Use curl to download the file directly to your Ubuntu server:

Extract the files in your document folder (an OwnCloud directory will be created) with the command:

Now an OwnCloud directory is created. You have to set the ownership of the files manually; do this with the following command:

After that you have to set the permission a bit more secure by executing the command:

Use the crontab for scheduled tasks

For better performance and more reliable operation use the system cron tab for OwnCloud scheduled tasks. Add an entry to the OwnCloud user crontab:

crontab -u [owncloud_user] -e

If this is your first crontab edit session choose your favorite editor (mine is vi). Add a line to the end of the crontab temporary file:

Adding the line above to your crontab takes care for executing the cron.php file every 15 minutes on your system (even when no users visit your site as is the case with the AJAX configuration).

Create the MySQL database

OwnCloud 7 does not store the uploaded files in the MySQL database. It uses the database for user administration. We have to create a MySQL database for the OwnCloud installation. Go to your VirtualMin interface (easiest way to accomplish this). Goto Webmin -> Servers -> MySQL database server  (start MySQL server if needed).

Select Create a new database. Assign the database a name and press Create .
Select “User permissions” and select Create new user . Type a username and password. Type localhost  in the Host field. Select no permissions and press Create .
Return to the database list and choose Database permissions . Choose Create new database permission . Select the database you just created. Type in the Username field the exact same name you typed in the previous step. Type in the Hosts field localhost . Select all permissions and press Create .

Now the database is setup; in the browser navigate to your OwnCloud 7 installation. Fill out the form that appears; press Finish  and you are ready to use OwnCloud 7.

Download a client for your OwnCloud 7 installation. In the example below I use the Mac OS X version.

OwnCloud not in the webroot?

If you don’t install the OwnCloud software in the webroot (ie ~/public_html) then you have to overwrite the webroot. Edit the OwnCloud configuration file at ~/public_html/owncloud/config/config.php. Add an antry to the CONFIG array:

‘overwritewebroot’ => ‘/owncloud’

Increase upload size

Login to your admin account on owncloud. Go to the Admin page. Below File handling specify the new upload size. This setting has to be equal or less than the PHP setting. In virtualmin go to your domain configuration. Select Services -> PHP 5 Configuration -> Resource limits. Increase both the values for “Maximum file upload size” and “Maximum HTTP POST size” to the same value as you have set in the owncloud admin panel.

Add your existing files locally

You can copy your files directly to the owncloud data directory [owncloud_data_directory]/[user]/files/[folder]

After you have copied the files you have to let owncloud know you did this without using the owncloud interface. Owncloud has to rescan his files structure; use this command:

Enable DropBox external storage

With OwnCloud 7 you can enable external storage. With external storage you can access, for example you dropbox files, as if they were part of your OwnCloud. Enable the “External storage app” through the admin interface (Apps).

First you have to tell DropBox about your OwnCloud app. Go to the DropBox developers page. Select the App Console on the left. Configure this page as shown below:
OwnCloud 7

 

 

 

 

 

Select “Create App”.

Enter the OAuth redirect URI as follows:

Take note of the AppKey and the App Secret; you have to use this in your OwnCloud configuration:

OwnCloud 7
Select Grant access  and the DropBox screen appears for granting your application access. Press Allow and your configuration is complete; a green light will appear next to the foldername in OwnCloud to indicate correct configuration.

Share