Select Page

Advent

ownCloud is an open-source report sharing server and collaboration platform that may retailer your individual content material, like paperwork and images, in a centralized location. This permits you to take keep watch over of your content material and safety by way of no longer depending on third-party content material web hosting services and products like Dropbox.

On this educational, we will be able to set up and configure an ownCloud example on an Ubuntu 18.04 server.

Necessities

So as to whole the stairs on this information, you are going to want the next:

  • A sudo person and firewall to your server: You’ll create a person with sudo privileges and arrange a fundamental firewall by way of following the Ubuntu 18.04 initial server setup guide.
  • A LAMP stack: ownCloud calls for a cyber web server, a database, and PHP to operate correctly. Putting in a LAMP stack (Linux, Apache, MySQL, and PHP) server fulfills all of those necessities. Observe this guide to put in and configure this device.
  • An SSL certificates: How you put this up is dependent upon whether or not or no longer you might have a website identify that resolves on your server.
    • You probably have a website identify… one of the best ways to protected your web site is with Let’s Encrypt, which supplies loose, depended on certificate. Observe the Let’s Encrypt guide for Apache to set this up.
    • Should you would not have a website… and you might be simply the use of this configuration for trying out or non-public use, you’ll use a self-signed certificates as a substitute. This gives the similar form of encryption, however with out the area validation. Observe the self-signed SSL guide for Apache to get arrange.

Step 1 – Putting in ownCloud

The ownCloud server package deal does no longer exist throughout the default repositories for Ubuntu. Then again, ownCloud maintains a devoted repository for the distribution that we will upload to our server.

To start, obtain their liberate key the use of the curl command and import it with the apt-key application with the upload command:

  • curl https://obtain.owncloud.org/obtain/repositories/10.0/Ubuntu_18.04/Unlock.key | sudo apt-key upload -

The ‘Unlock.key’ report incorporates a PGP (Beautiful Excellent Privateness) public key which apt will use to ensure that the ownCloud package deal is unique.

Along with uploading the important thing, create a report referred to as owncloud.listing within the resources.listing.d listing for apt. The report will comprise the deal with to the ownCloud repository.

  • echo 'deb http://obtain.owncloud.org/obtain/repositories/10.0/Ubuntu_18.04/ /' | sudo tee /and many others/apt/resources.listing.d/owncloud.listing

Now, we will use the package deal supervisor to search out and set up ownCloud. In conjunction with the primary package deal, we will be able to additionally set up a couple of further PHP libraries that ownCloud makes use of so as to add additional capability. Replace your native package deal index and set up the whole lot by way of typing:

  • sudo apt replace
  • sudo apt set up php-bz2 php-curl php-gd php-imagick php-intl php-mbstring php-xml php-zip owncloud-files

The entirety we’d like is now put in at the server, so subsequent we will end the configuration so we will start the use of the carrier.

Step 2 — Adjusting the Report Root

The ownCloud package deal we put in copies the cyber web recordsdata to /var/www/owncloud at the server. Recently, the Apache digital host configuration is ready as much as serve recordsdata out of a unique listing. We want to trade the DocumentRoot environment in our configuration to indicate to the brand new listing.

You to find which digital host recordsdata reference your area identify or IP deal with the use of the apache2ctl application with the DUMP_VHOSTS possibility. Clear out the output by way of your server’s area identify or IP deal with to search out which recordsdata you wish to have to edit in the following couple of instructions:

  • sudo apache2ctl -t -D DUMP_VHOSTS | grep server_domain_or_IP

The output will most likely glance one thing like this:

Output

*:443 server_domain_or_IP (/and many others/apache2/sites-enabled/server_domain_or_IP-le-ssl.conf:2) port 80 namevhost server_domain_or_IP (/and many others/apache2/sites-enabled/server_domain_or_IP.conf:1)

Within the parentheses, you’ll see every of the recordsdata that reference the area identify or IP deal with we’re going to use to get right of entry to ownCloud. Those are the recordsdata you’ll be able to want to edit.

For every fit, open the report in a textual content editor with sudo privileges:

  • sudo nano /and many others/apache2/sites-enabled/server_domain_or_IP.conf

Inside of, seek for the DocumentRoot directive. Exchange the road in order that it issues to the /var/www/owncloud listing:

Instance DocumentRoot edit


    . . .
    DocumentRoot /var/www/owncloud
    . . .

Save and shut the report when you find yourself completed. Whole this procedure for every of the recordsdata that referenced your area identify (or IP deal with for those who didn’t configure a website on your server).

When you find yourself completed, test the syntax of your Apache recordsdata to ensure there have been no detectable typos on your configuration:

  • sudo apache2ctl configtest

Output

Syntax OK

Relying to your configuration, you may even see a caution about environment ServerName globally. So long as the output ends with Syntax OK, you’ll forget about that caution. Should you see further mistakes, return and test the recordsdata you simply edited for errors.

In case your syntax test handed, reload the Apache carrier to turn on the brand new adjustments:

  • sudo systemctl reload apache2

Apache must now know the way to server your ownCloud recordsdata.

Step 3 – Configuring the MySQL Database

Ahead of we transfer directly to the cyber web configuration, we want to arrange the database. All over the web-based configuration procedure, we will be able to want to supply an database identify, a database username, and a database password in order that ownCloud can attach and set up its knowledge inside MySQL.

Start by way of logging into your database with the MySQL administrative account:

Should you arrange password authentication for MySQL root account, you could have to make use of this syntax as a substitute:

Create a devoted database for ownCloud to make use of. We will be able to identify the database owncloud for readability:

  • CREATE DATABASE owncloud;

Notice: Each and every MySQL remark should finish with a semi-colon (;). Be sure you test that that is provide in case you are experiencing a subject.

Subsequent, create a separate MySQL person account to regulate the newly created database. Growing one-function databases and accounts is a good suggestion from a control and safety point of view. As with the naming of the database, make a selection a username that you just want. We elected to head with the identify owncloud on this information.

  • GRANT ALL ON owncloud.* to 'owncloud'@'localhost' IDENTIFIED BY 'owncloud_database_password';

Caution: Be sure you put a real password the place the command states: owncloud_database_password

With the person assigned get right of entry to to the database, carry out the flush privileges operation to be sure that the working example of MySQL is aware of in regards to the contemporary privilege project:

You’ll now go out the MySQL consultation by way of typing:

With the ownCloud server put in and the database arrange, we’re in a position to show our consideration to configuring the ownCloud utility.

Step 4 – Configuring ownCloud

To get right of entry to the ownCloud cyber web interface, open a cyber web browser and navigate to the next deal with:

https://server_domain_or_IP

Notice: In case you are the use of a self-signed SSL certificates, you are going to most probably be introduced with a caution since the certificates isn’t signed by way of one in all your browser’s depended on government. That is anticipated and commonplace. Click on the correct button or hyperlink to continue to the ownCloud admin web page.

You must see the ownCloud cyber web configuration web page on your browser.

Create an admin account by way of opting for a username and a password. For safety functions it’s not advisable to make use of one thing like “admin” for the username:

ownCloud Admin Account

Subsequent, depart the Information folder environment as-is and scroll right down to the database configuration segment.

Fill out the main points of the database identify, database username, and database password you created within the earlier segment. Should you used the settings from this information, each the database identify and username will likely be owncloud. Go away the database host as localhost:

ownCloud database configuration

Click on the End setup button to complete configuring ownCloud the use of the tips you have got supplied. You’re going to be taken to a login display the place you’ll check in the use of your new account:

ownCloud login screen

To your first login, a display will seem the place you’ll obtain packages to sync your recordsdata on quite a lot of units. You’ll obtain and configure those now or do it at a later time. When you find yourself completed, click on the x within the top-right nook of the splash display to get right of entry to the primary interface:

ownCloud Main Interface

Right here, you’ll create or add recordsdata on your non-public cloud.

Conclusion

ownCloud can reflect the functions of common third-party cloud garage services and products. Content material may also be shared between customers or externally with public URLs. The good thing about ownCloud is that the tips is saved in a spot that you just keep watch over and set up and not using a 1/3 occasion.

Discover the interface and for extra capability, set up plugins the use of ownCloud’s app store.