Detailed Installation Guide
Introduction
This document describes:
-
Prepare your server
-
Prerequisites and how to download ownCloud
-
Install ownCloud
The descriptions are focussing on the Ubuntu distribution. Even if we try to make these steps as easy as possible by offering ready to use commands and scripts, you need to have sufficient knownledge about administrating a server environment which provides webservices. This document does not give any proposals securing your server.
Prepare your server
For more information about the requirements of your server, read the general prerequisites guide. The following section takes care about the procedures in detail.
Ubuntu 18.04 LTS Server
To prepare your Ubuntu 18.04 server for the use with ownCloud, follow the Ubuntu 18.04 preparation guide.
Install a Database
If you do not already have installed a supported database or using an existing one, follow the Manual Installation Databases guide.
Configure the Web Server
To configure your Apache Web Server for the use with ownCloud, follow the Apache preparation guide.
Physical Installation of ownCloud
To physically install ownCloud, you have to download the required package. After doing so, you can do the following steps manually, or use provided scripts. These scripts are benificial, because they also can be used for upgrading and ease the process a lot.
Download ownCloud
Before downloading the ownCloud package, change to a directory where you will save
your file temporarily. This can be, for example /tmp
. In further examples, we use tar archives and
the actual ownCloud Complete Package
. The package name for the complete package is formed the following:
owncloud-complete-yyyymmdd.archive_type
.
Download the archive of the latest ownCloud version:
-
Go to the ownCloud Download Page and select the package that fits your needs. You can download either the
.tar.bz2
or.zip
archive. Based on the example below, copy the link of the selected file and run following command to download it:wget https://download.owncloud.org/community/owncloud-complete-yyyymmdd.tar.bz2
-
Download the corresponding checksum file like:
wget https://download.owncloud.org/community/owncloud-complete-yyyymmdd.tar.bz2.md5 or wget https://download.owncloud.org/community/owncloud-complete-yyyymmdd.tar.bz2.sha256
-
Verify the MD5 or SHA256 sum:
sudo md5sum -c owncloud-x.y.z.tar.bz2.md5 < owncloud-x.y.z.tar.bz2 or sudo sha256sum -c owncloud-x.y.z.tar.bz2.sha256 < owncloud-x.y.z.tar.bz2
-
You can also verify the PGP signature:
wget https://download.owncloud.org/community/owncloud-complete-yyyymmdd.tar.bz2.asc gpg --verify owncloud-complete-yyyymmdd.tar.bz2.asc owncloud-complete-yyyymmdd.tar.bz2
Script Guided Installation
Use the Script Guided Installation if you want to easily install or upgrade ownCloud or manage ownership and permissions. The page contains detailed instructions about downloading and usage.
Using the Script Guided Installation, you can handle many useful installation and update options automatically. |
Command Line Guided Installation
Use these steps, if you want to do the basic setup without any changes or physical installation options. Consider using the Script Guided Installation if you plan improving your setup from step one.
-
Extract the archive contents and run the unpacking command for your tar archive:
tar -xjf owncloud-complete-yyyymmdd.tar.bz2
-
tar unpacks to a single
owncloud
directory. Copy the ownCloud directory to its final destination. When you are running the Apache HTTP server, you may safely install ownCloud in your Apache document root. Assuming you document root is in/var/www
.cp -r owncloud /var/www
Post physical installation, set the correct ownership and permissions upfront. To do so, it is suggested use the scripts from the Script Guided Installation.
Complete the Installation
After restarting Apache, you must complete your installation by running either the
Graphical Installation Wizard or on the command line with the occ
command.
After finalizing the installation, re-run the script provided in
Script Guided Installation
to secure your .htaccess
files. Your ownCloud instance is now ready to use.
Finalize Using the Graphical Installation Wizard
To finalize the installation using the the graphical installation wizard, refer to the Graphical Installation Wizard.
Finalize Using the Command Line
If you want to finalize the installation via the command line, use the following example
command. The command assumes, that you have unpacked the source to /var/www/owncloud/
.
Replace all the parameters according your needs.
cd /var/www/owncloud/
sudo -u www-data php occ maintenance:install \
--database "mysql" \
--database-name "owncloud" \
--database-user "root"\
--database-pass "password" \
--admin-user "admin" \
--admin-pass "password"
To use occ
refer to the occ command reference.
Admins of SELinux-enabled distributions may need to write new SELinux rules to complete their ownCloud installation; see the SELinux guide for a suggested configuration. |
Post Installation Configuration
After installing ownCloud successfully, ownCloud recommends that you perform some post installation tasks. These tasks help to configure background jobs or improve performance by caching.
Background Jobs
To read more about background jobs and how to configure them, read the Background Job Configuration guide.
Configure Caching
It is recommended to install and enable caching (PHP opcode Cache and/or Data Cache), which significantly improves performance. For more information read the Caching Configuration guide.
Notes
Headers
ownCloud has a mechanism to set headers programmatically.
These headers are set with the always directive to avoid errors when there are additional
headers set in the web servers configuration file like http.conf .
More information on headers can be found in the mod_headers documentation.
|
Managing Trusted Domains
All URLs used to access your ownCloud server must be white-listed in your config.php
file,
under the trusted_domains
setting. Users are allowed to log into ownCloud only when they
point their browsers to a URL that is listed in the trusted_domains
setting.
This setting is important when changing or moving to a new domain name. You may use IP addresses and domain names. |
A typical configuration may look like this:
'trusted_domains' => [
0 => 'localhost',
1 => 'server1.example.com',
2 => '192.168.1.50',
],
The loopback address, 127.0.0.1
, is automatically white-listed, so as long as you have access to the physical server you can always log in.
In the event that a load-balancer is in place, there will be no issues as long as it sends the correct X-Forwarded-Host
header.
For further information on improving the quality of your ownCloud installation, please see the configuration notes and tips guide. |
Admins of SELinux-enabled distributions such as CentOS, Fedora, and Red Hat Enterprise Linux may need to set new rules to enable installing ownCloud. See SELinux for a suggested configuration. |