In this guide, we are going to learn how to install ownCloud Server on Debian 11. If you need to have your own self-hosted cloud storage that provides a safe, secure, and compliant file synchronization and sharing solution, try ownCloud.
Table of Contents
Installing ownCloud Server on Debian 11
Prerequisites
In order to install and setup ownCloud on Debian 11, you need to have LAMP/LEMP Stack components installed. We use LAMP stack in this guide.
Ensure your system package cache is up-to-date.
apt updateBefore you can proceed, check about system requirements for ownCloud installation.
Install Apache Web Server;
Run the commands below to install Apache on Debian 11;
apt install apache2 -yInstall MariaDB on Debian 11
MariaDB 10.8 is the current latest version of MariaDB that is supported;
Hence, to install MariaDB 10.8, navigate to MariaDB repositories page and select your OS distro, Choose a MariaDB Server version and repository mirror.
The copy and run the repository installation commands;
apt install apt-transport-https curl gnupg2 -ywget -qO- https://mariadb.org/mariadb_release_signing_key.asc \
| gpg --dearmor > /etc/apt/trusted.gpg.d/mariadb.gpgecho \
'deb https://mirrors.xtom.nl/mariadb/repo/10.8/debian bullseye main' \
> /etc/apt/sources.list.d/mariadb.listYou can now install MariaDB 10.8 from the MariaDB repository using the command below;
apt updateapt install mariadb-serverInstall PHP
Install PHP 7.4 and Other Required Modules;
apt install php libapache2-mod-php php-{mysql,intl,curl,json,gd,xml,mbstring,zip} -yInstall ownCloud Server
OwnCloud is not included by default on Debian 11 repositories. However, there is repo for each Linux distribution maintained by ownCloud itself.
There are available different ownCloud repos for various Debian release versions.
To install ownCloud repositories for Debian 11 server;
echo \
'deb http://download.opensuse.org/repositories/isv:/ownCloud:/server:/10/Debian_11/ /' \
> /etc/apt/sources.list.d/isv:ownCloud:server:10.listcurl -fsSL \
https://download.opensuse.org/repositories/isv:ownCloud:server:10/Debian_11/Release.key \
| gpg --dearmor > /etc/apt/trusted.gpg.d/isv_ownCloud_server_10.gpgOnce again, re-synchronize system packages to their latest versions.
apt updateOnce the update is done, install owncloud.
apt install owncloud-complete-files -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
owncloud-deps
The following NEW packages will be installed:
owncloud-complete-files
0 upgraded, 1 newly installed, 0 to remove and 94 not upgraded.
Need to get 65.1 MB of archives.
After this operation, 304 MB of additional disk space will be used.
Get:1 http://download.opensuse.org/repositories/isv:/ownCloud:/server:/10/Debian_11 owncloud-complete-files 10.11.0-1+7.1 [65.1 MB]
Fetched 65.1 MB in 37s (1,776 kB/s)
Selecting previously unselected package owncloud-complete-files.
(Reading database ... 38071 files and directories currently installed.)
Preparing to unpack .../owncloud-complete-files_10.11.0-1+7.1_all.deb ...
Unpacking owncloud-complete-files (10.11.0-1+7.1) ...
Setting up owncloud-complete-files (10.11.0-1+7.1) ...
Configure Apache for ownCloud
When ownCloud is installed, it places its web files under the /var/www/owncloud directory.
In order to configure Apache to server the ownCloud content, you need to create ownCloud Apache configuration file where you can define the ownCloud directory as your root directory.
Copy and paste the command below to create owncloud.conf configuration file.
cat > /etc/apache2/sites-available/owncloud.conf << 'EOL'
Alias / "/var/www/owncloud/"
<Directory /var/www/owncloud/>
Options +FollowSymlinks
AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/owncloud
SetEnv HTTP_HOME /var/www/owncloud
</Directory>
EOL
Verify Apache configuration syntax.
apachectl -tEnable ownCloud site.
a2ensite owncloud.confDisable default Apache site;
a2dissite 000-default.confEnable additional recommended Apache modules.
a2enmod rewrite mime unique_id phpRestart Apache if the configuration is fine.
systemctl restart apache2Create ownCloud Database and User
Run the mysql_secure_installation script to remove test databases, disable remote root login e.t.c.
mysql_secure_installationLogin to MariaDB database server and create ownCloud database and database user.
mysqlIf you already enabled password authentication, then login via;
mysql -u root -pNext, execute the commands below to create ownCloud database and database user.
create database ownclouddb;grant all on ownclouddb.* to ocadmin@localhost identified by "StrongP@ss";flush privileges;
quitFinalize ownCloud Configuration
To complete ownCloud installation and configuration, you need to access it via the browser using the address http://<server-IP>.
When you access the ownCloud server address, you are welcomed by the ownCloud configuration interface.
- Set the ownCloud admin user and password and define the ownCloud data directory (/var/www/owncloud/data is the default).

- Set the database connection details as created above.

Once you done with configuration, click Finish setup to finalize ownCloud configuration on Debian 11.
When configuration completes, you will get to a login page.
Enter your admin user login details to login to ownCloud dashboard.

Login with your Admin user account details you defined during setup. After a successful login, you will land on ownCloud dashboard.

You can now create different folders and share with your relevant users. Enjoy.
You can read our other guides by following the links below;


Ahoi. I’ve tried this on a Debian 11 and got stuck at this point.
root@owncloud-new:~# apt update
Get:2 http://download.opensuse.org/repositories/isv:/ownCloud:/server:/10/Debian_11 InRelease [1,527 B]
Hit:3 http://security.debian.org/debian-security bullseye-security InRelease
Hit:4 http://deb.debian.org/debian bullseye InRelease
Hit:5 http://deb.debian.org/debian bullseye-updates InRelease
Get:1 https://download.owncloud.org/download/repositories/10.4.1/prod/Debian_10 InRelease
Err:1 https://download.owncloud.org/download/repositories/10.4.1/prod/Debian_10 InRelease
Clearsigned file isn’t valid, got ‘NOSPLIT’ (does the network require authentication?)
Reading package lists… Done
E: Failed to fetch http://download.owncloud.org/download/repositories/10.4.1/prod/Debian_10/InRelease Clearsigned file isn’t valid, got ‘NOSPLIT’ (does the network require authentication?)
E: The repository ‘http://download.owncloud.org/download/repositories/10.4.1/prod/Debian_10 InRelease’ is not signed.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Any Idea how to fix this.
Redards
Uwe
Hi,
Kindly check the repo installation section again. Guide has been updated.