{"id":11046,"date":"2021-12-07T21:52:52","date_gmt":"2021-12-07T18:52:52","guid":{"rendered":"https:\/\/kifarunix.com\/?p=11046"},"modified":"2024-03-18T07:54:31","modified_gmt":"2024-03-18T04:54:31","slug":"install-owncloud-server-on-debian-11","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-owncloud-server-on-debian-11\/","title":{"rendered":"Install ownCloud Server on Debian 11"},"content":{"rendered":"\n<p>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&nbsp;<a href=\"https:\/\/owncloud.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">ownCloud<\/a>.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#installing-own-cloud-server-on-debian-11\">Installing ownCloud Server on Debian 11<\/a><ul><li><a href=\"#prerequisites\">Prerequisites<\/a><\/li><li><a href=\"#install-apache-web-server\">Install Apache Web Server;<\/a><\/li><li><a href=\"#install-maria-db-on-debian-11\">Install MariaDB on Debian 11<\/a><\/li><li><a href=\"#install-php\">Install PHP<\/a><\/li><li><a href=\"#install-own-cloud-server\">Install ownCloud Server<\/a><\/li><li><a href=\"#configure-apache-for-own-cloud\">Configure Apache for ownCloud<\/a><\/li><li><a href=\"#create-own-cloud-database-and-user\">Create ownCloud Database and User<\/a><\/li><li><a href=\"#finalize-own-cloud-configuration\">Finalize ownCloud Configuration<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"installing-own-cloud-server-on-debian-11\">Installing ownCloud Server on Debian 11<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"prerequisites\">Prerequisites<\/h3>\n\n\n\n<p>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.<\/p>\n\n\n\n<p>Ensure your system package cache is up-to-date.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>apt update<\/code><\/pre>\n\n\n\n<p>Before you can proceed, check about <a href=\"https:\/\/doc.owncloud.com\/server\/next\/admin_manual\/installation\/system_requirements.html#officially-supported-environments\" target=\"_blank\" rel=\"noreferrer noopener\">system requirements for ownCloud installation<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-apache-web-server\">Install Apache Web Server;<\/h3>\n\n\n\n<p>Run the commands below to install Apache on Debian 11;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install apache2 -y<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-maria-db-on-debian-11\">Install MariaDB on Debian 11<\/h3>\n\n\n\n<p>MariaDB 10.8 is the current latest version of MariaDB that is supported;<\/p>\n\n\n\n<p>Hence, to install MariaDB 10.8, navigate to MariaDB repositories page and select your OS distro, Choose a MariaDB Server version and repository mirror.<\/p>\n\n\n\n<p>The copy and run the repository installation commands;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install apt-transport-https curl gnupg2 -y<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>wget -qO- https:\/\/mariadb.org\/mariadb_release_signing_key.asc \\\n| gpg --dearmor &gt; \/etc\/apt\/trusted.gpg.d\/mariadb.gpg<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>echo \\\n'deb https:\/\/mirrors.xtom.nl\/mariadb\/repo\/10.8\/debian bullseye main' \\\n&gt; \/etc\/apt\/sources.list.d\/mariadb.list<\/code><\/pre>\n\n\n\n<p>You can now install MariaDB 10.8 from the MariaDB repository using the command below;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt update<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install mariadb-server<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-php\">Install PHP<\/h3>\n\n\n\n<p>Install PHP 7.4 and Other Required Modules;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install php libapache2-mod-php php-{mysql,intl,curl,json,gd,xml,mbstring,zip} -y<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-own-cloud-server\">Install ownCloud Server<\/h3>\n\n\n\n<p>OwnCloud is not included by default on Debian 11 repositories. However, there is repo for each Linux distribution maintained by ownCloud itself.<\/p>\n\n\n\n<p>There are available different&nbsp;<a rel=\"noreferrer noopener\" href=\"https:\/\/software.opensuse.org\/download\/package?package=owncloud-complete-files&amp;project=isv%3AownCloud%3Aserver%3A10\" target=\"_blank\">ownCloud repos<\/a>&nbsp;for various Debian release versions.<\/p>\n\n\n\n<p>To install ownCloud repositories for Debian 11 server;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo \\\n'deb http:\/\/download.opensuse.org\/repositories\/isv:\/ownCloud:\/server:\/10\/Debian_11\/ \/' \\\n&gt; \/etc\/apt\/sources.list.d\/isv:ownCloud:server:10.list<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -fsSL \\\nhttps:\/\/download.opensuse.org\/repositories\/isv:ownCloud:server:10\/Debian_11\/Release.key \\\n| gpg --dearmor &gt; \/etc\/apt\/trusted.gpg.d\/isv_ownCloud_server_10.gpg<\/code><\/pre>\n\n\n\n<p>Once again, re-synchronize system packages to their latest versions.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt update<\/code><\/pre>\n\n\n\n<p>Once the update is done, install owncloud.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install owncloud-complete-files -y<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>\nReading package lists... Done\nBuilding dependency tree       \nReading state information... Done\nSuggested packages:\n  owncloud-deps\nThe following NEW packages will be installed:\n  owncloud-complete-files\n0 upgraded, 1 newly installed, 0 to remove and 94 not upgraded.\nNeed to get 65.1 MB of archives.\nAfter this operation, 304 MB of additional disk space will be used.\nGet:1 http:\/\/download.opensuse.org\/repositories\/isv:\/ownCloud:\/server:\/10\/Debian_11  owncloud-complete-files 10.11.0-1+7.1 [65.1 MB]\nFetched 65.1 MB in 37s (1,776 kB\/s)                                                                                                                                        \nSelecting previously unselected package owncloud-complete-files.\n(Reading database ... 38071 files and directories currently installed.)\nPreparing to unpack ...\/owncloud-complete-files_10.11.0-1+7.1_all.deb ...\nUnpacking owncloud-complete-files (10.11.0-1+7.1) ...\nSetting up owncloud-complete-files (10.11.0-1+7.1) ...\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"configure-apache-for-own-cloud\">Configure Apache for ownCloud<\/h3>\n\n\n\n<p>When ownCloud is installed, it places its web files under the&nbsp;<strong><code>\/var\/www\/owncloud<\/code><\/strong>&nbsp;directory.<\/p>\n\n\n\n<p>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.<\/p>\n\n\n\n<p>Copy and paste the command below to create <code>owncloud.conf<\/code> configuration file.<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>\ncat > \/etc\/apache2\/sites-available\/owncloud.conf << 'EOL'\nAlias \/ \"\/var\/www\/owncloud\/\"\n\n&lt;Directory \/var\/www\/owncloud\/&gt;\n  Options +FollowSymlinks\n  AllowOverride All\n\n &lt;IfModule mod_dav.c&gt;\n  Dav off\n &lt;\/IfModule&gt;\n\n SetEnv HOME \/var\/www\/owncloud\n SetEnv HTTP_HOME \/var\/www\/owncloud\n\n&lt;\/Directory&gt;\nEOL\n<\/code><\/pre>\n\n\n\n<p>Verify Apache configuration syntax.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apachectl -t<\/code><\/pre>\n\n\n\n<p>Enable ownCloud site.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>a2ensite owncloud.conf<\/code><\/pre>\n\n\n\n<p>Disable default Apache site;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>a2dissite 000-default.conf<\/code><\/pre>\n\n\n\n<p>Enable additional recommended Apache modules.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>a2enmod rewrite mime unique_id php<\/code><\/pre>\n\n\n\n<p>Restart Apache if the configuration is fine.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl restart apache2<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"create-own-cloud-database-and-user\">Create ownCloud Database and User<\/h3>\n\n\n\n<p>Run the <code><strong>mysql_secure_installation<\/strong><\/code> script to remove test databases, disable remote root login e.t.c.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql_secure_installation<\/code><\/pre>\n\n\n\n<p>Login to MariaDB database server and create ownCloud database and database user.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql<\/code><\/pre>\n\n\n\n<p>If you already enabled password authentication, then login via;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql -u root -p<\/code><\/pre>\n\n\n\n<p>Next, execute the commands below to create ownCloud database and database user.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>create database ownclouddb;<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>grant all on ownclouddb.* to ocadmin@localhost identified by \"StrongP@ss\";<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>flush privileges;\nquit<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"finalize-own-cloud-configuration\">Finalize ownCloud Configuration<\/h3>\n\n\n\n<p>To complete ownCloud installation and configuration, you need to access it via the browser using the address&nbsp;<strong>http:\/\/&lt;server-IP&gt;<\/strong>.<\/p>\n\n\n\n<p>When you access the ownCloud server address, you are welcomed by the ownCloud configuration interface.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Set the ownCloud admin user and password and define the ownCloud data directory (<strong>\/var\/www\/owncloud\/data<\/strong>&nbsp;is the default).<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1172\" height=\"650\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/12\/create-admin-acc.png\" alt=\"Install ownCloud Server on Debian 11\" class=\"wp-image-11055\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/12\/create-admin-acc.png?v=1638902136 1172w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/12\/create-admin-acc-768x426.png?v=1638902136 768w\" sizes=\"(max-width: 1172px) 100vw, 1172px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Set the database connection details as created above.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1302\" height=\"820\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/12\/define-db-connection-details.png\" alt=\"\" class=\"wp-image-11056\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/12\/define-db-connection-details.png?v=1638902180 1302w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/12\/define-db-connection-details-768x484.png?v=1638902180 768w\" sizes=\"(max-width: 1302px) 100vw, 1302px\" \/><\/figure>\n\n\n\n<p>Once you done with configuration, click&nbsp;<strong>Finish setup<\/strong>&nbsp;to finalize ownCloud configuration on Debian 11.<\/p>\n\n\n\n<p>When configuration completes, you will get to a login page.<\/p>\n\n\n\n<p>Enter your admin user login details to login to ownCloud dashboard.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1158\" height=\"770\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/12\/owncloud-login-page.png\" alt=\"\" class=\"wp-image-11057\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/12\/owncloud-login-page.png?v=1638902219 1158w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/12\/owncloud-login-page-768x511.png?v=1638902219 768w\" sizes=\"(max-width: 1158px) 100vw, 1158px\" \/><\/figure>\n\n\n\n<p>Login with your Admin user account details you defined during setup. After a successful login, you will land on ownCloud dashboard.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1911\" height=\"593\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/12\/owncloud-ui.png\" alt=\"\" class=\"wp-image-11058\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/12\/owncloud-ui.png?v=1638902243 1911w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/12\/owncloud-ui-768x238.png?v=1638902243 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/12\/owncloud-ui-1536x477.png?v=1638902243 1536w\" sizes=\"(max-width: 1911px) 100vw, 1911px\" \/><\/figure>\n\n\n\n<p>You can now create different folders and share with your relevant users. Enjoy.<\/p>\n\n\n\n<p>You can read our other guides by following the links below;<\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/configure-owncloud-openldap-authentication\/\" target=\"_blank\" rel=\"noreferrer noopener\">Configure ownCloud OpenLDAP Authentication<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-owncloud-desktop-client-on-centos-8\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install ownCloud Desktop Client on CentOS 8<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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<\/p>\n","protected":false},"author":1,"featured_media":11059,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121,249,39],"tags":[3958,4320,4322,4321],"class_list":["post-11046","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","category-owncloud","category-storage","tag-debian-11","tag-install-owncloud-on-debian-11","tag-owncloud-server","tag-owncloud-server-on-debian-11","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/11046"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=11046"}],"version-history":[{"count":7,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/11046\/revisions"}],"predecessor-version":[{"id":21597,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/11046\/revisions\/21597"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/11059"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=11046"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=11046"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=11046"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}