Detailed Installation Guide
- Prepare Your Server
- Installation of ownCloud Binaries
- Complete the Installation
- Post Installation Configuration
This document describes:
How to prepare your server
Prerequisites and how to download ownCloud
Installation of ownCloud
The following descriptions focus 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 knowledge about administrating a server environment which provides web services.
|This document does not offer proposals about how to secure your server. Therefore, we strongly recommend checking out the Hardening and Security Guidance before the installation and to keep it on hand through out.|
For more information on the requirements of your server, read the general prerequisites guide. The following sections describe the procedures in detail.
To prepare your Ubuntu 18.04 server for the use with ownCloud, follow the Ubuntu 18.04 preparation guide. This guide installs PHP up to version 7.3 only.
To prepare your Ubuntu 20.04 server for the use with ownCloud, follow the Ubuntu 20.04 preparation guide. This guide installs PHP 7.4
If you do not already have a supported database installed, follow the Manual Database Installation guide.
To configure your Apache web server for use with ownCloud, follow the Apache preparation guide.
To install ownCloud binaries, you have to download the required package. After doing so, you can perform the following steps manually or use the provided scripts. These scripts are convenient since they can also be used for upgrading which eases the process a lot.
Before downloading ownCloud, change to a directory where you want to save
the file temporarily. This can be, for example
/tmp. In further examples, we use tar archives or the complete ownCloud bundle. The name for the complete archive looks like this:
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
.ziparchive. Based on the example below, copy the link of the selected file and run the following command to download it:
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-complete-yyyymmdd.tar.bz2.md5 < owncloud-complete-yyyymmdd.tar.bz2 or sudo sha256sum -c owncloud-complete-yyyymmdd.tar.bz2.sha256 < owncloud-complete-yyyymmdd.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
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.|
Use the following commands if you want to do the basic setup without any changes and physical installation options. Consider using the Script-Guided Installation if you plan on 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
ownclouddirectory. Copy the ownCloud directory to its final destination. If you are running the Apache HTTP server, you may safely install ownCloud in your Apache document root. Assuming your document root is in
cp -r owncloud /var/www
After the installation, set the correct ownership and permissions. To do so, we suggest using the scripts from the Script-Guided Installation.
After restarting Apache, you must complete your installation by running either the
Graphical Installation Wizard or on the command line with the
After finalizing the installation, re-run the script provided in
to secure your
.htaccess files. Your ownCloud instance is now ready to use.
To finalize the installation using the the graphical installation wizard, refer to the Graphical Installation Wizard.
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
Replace all the parameters according to 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"
On how 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.|
After installing ownCloud successfully, ownCloud recommends that you perform some post installation tasks. These tasks help configure background jobs or improve performance by caching.
|At this point, we’d also like to remind you to consult the Hardening and Security Guidance section.|
To read more about background jobs and how to configure them, read the Background Job Configuration guide.
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.
ownCloud has a mechanism to set headers programmatically.
These headers are set with the
All URLs used to access your ownCloud server must be white-listed in your
trusted_domains setting. Users are allowed to log in to ownCloud only when they
point their browsers to a URL that is listed in the
|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
|For further information on improving the quality of your ownCloud installation, 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.|