TECHNICAL GUIDE

Use this guide as an implementation reference. Validate commands, policies and version-specific behaviour in a lab before applying changes to production systems.

1. Important: identify the ownCloud product and supported OS

ownCloud has multiple products. This guide refers to ownCloud Server Classic (10.x), not ownCloud.online and not ownCloud Infinite Scale (oCIS). Their installation methods and requirements are different. The classic server documentation lists a narrower supported platform matrix than newer Nextcloud releases; do not assume that the latest Ubuntu/PHP stack is supported.

Before deployment, check the exact ownCloud Server release's system requirements. The documentation's recommended environment has historically included Ubuntu 20.04, Apache 2.4, MariaDB and a specific PHP runtime. If your organisation requires Ubuntu 24.04 or newer PHP, verify explicit support or select a product/version that supports it. This guide explains the classic stack and must be pinned to a supported release combination.

2. Prepare the server

Use a clean supported Ubuntu LTS server, a sudo account, a DNS hostname such as files.example.com and a separate data volume. Update packages and install basic utilities:

sudo apt update && sudo apt full-upgrade -y\nsudo apt install -y curl wget unzip ca-certificates ufw\nlsb_release -a

Do not proceed with PHP packages from an unverified third-party repository. Confirm that the PHP version required by your ownCloud release is available for the selected Ubuntu version.

3. Install the compatible LAMP and Redis stack

Install Apache, MariaDB, Redis and the PHP runtime/extensions explicitly required by the selected ownCloud Classic release. For the documented classic stack, Apache with prefork and mod_php may be required; do not substitute PHP-FPM or a newer PHP major version unless the ownCloud release documentation says it is supported.

sudo apt install -y apache2 mariadb-server redis-server \\\n  libapache2-mod-php php php-mysql php-curl php-gd \\\n  php-mbstring php-intl php-xml php-zip php-bz2 php-redis\nsudo systemctl enable --now apache2 mariadb redis-server

The package names above are illustrative. Pin the exact PHP version and module packages to the official ownCloud requirements before installation.

4. Create a database

sudo mariadb
CREATE DATABASE owncloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;\nCREATE USER 'owncloud'@'localhost' IDENTIFIED BY 'REPLACE_WITH_STRONG_PASSWORD';\nGRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'localhost';\nFLUSH PRIVILEGES;\nEXIT;

Use a dedicated database user and keep the database service private to localhost. Secure MariaDB and remove anonymous/test accounts.

5. Download the matching ownCloud Server release

Download the server archive from the official ownCloud download page or repository for the selected Classic release. Verify the archive and signature/checksum before extraction.

cd /var/www\n# Download the exact supported ownCloud Server release archive first.\nsudo tar -xjf owncloud-RELEASE.tar.bz2\nsudo mkdir -p /var/owncloud-data\nsudo chown -R www-data:www-data /var/www/owncloud /var/owncloud-data\nsudo chmod 750 /var/owncloud-data

Replace RELEASE with the actual versioned archive name. Never use an arbitrary third-party package or an unpinned "latest" URL for a production deployment.

6. Configure Apache virtual host

sudo a2enmod rewrite headers env dir mime\nsudo nano /etc/apache2/sites-available/owncloud.conf
<VirtualHost *:80>\n  ServerName files.example.com\n  DocumentRoot /var/www/owncloud\n  <Directory /var/www/owncloud/>\n    Options +FollowSymlinks\n    AllowOverride All\n    Require all granted\n  </Directory>\n  ErrorLog ${APACHE_LOG_DIR}/owncloud_error.log\n  CustomLog ${APACHE_LOG_DIR}/owncloud_access.log combined\n</VirtualHost>
sudo a2ensite owncloud.conf\nsudo a2dissite 000-default.conf\nsudo apache2ctl configtest\nsudo systemctl reload apache2

Apply the Apache MPM and PHP module arrangement required by the ownCloud version. Do not enable conflicting MPM modules.

7. Complete the ownCloud installer

Open the hostname in a browser. Create the administrator account, specify /var/owncloud-data as the data directory and enter the ownCloud database credentials. Complete setup, then review the admin page for missing modules, permissions or background job warnings.

If the installer refuses the PHP or database version, treat that as a compatibility issue. Do not bypass the check or edit the platform requirement code.

8. Configure HTTPS, Redis and cron

After DNS is configured, install Certbot for Apache and issue a certificate:

sudo apt install -y certbot python3-certbot-apache\nsudo certbot --apache -d files.example.com

Configure Redis file locking and caching using the ownCloud manual for the exact release. Set background jobs to Cron and schedule the ownCloud cron script as the web server user. The CLI path and command should match the installed version.

9. Maintenance and migration considerations

Back up the database, data directory, configuration and custom apps together. Enable MFA, restrict trusted domains, configure SMTP, monitor disk usage and certificate expiry, and keep the server on a supported release. For large installations, review Redis, object storage and external storage options.

If you are evaluating ownCloud for a new deployment in 2026, compare ownCloud Server Classic with ownCloud Infinite Scale and Nextcloud before committing. Their architectures and support matrices differ significantly.

Official references

Conclusion

The most important step in an ownCloud Classic installation is selecting a supported product and dependency matrix. Pin the OS, PHP, database and ownCloud release first; then deploy the web stack, data directory, HTTPS and background jobs.

Found this useful?