{"id":17257,"date":"2023-06-15T22:18:14","date_gmt":"2023-06-15T19:18:14","guid":{"rendered":"https:\/\/kifarunix.com\/?p=17257"},"modified":"2024-03-10T09:53:52","modified_gmt":"2024-03-10T06:53:52","slug":"install-owncloud-server-on-debian-12","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-owncloud-server-on-debian-12\/","title":{"rendered":"Install ownCloud Server on Debian 12"},"content":{"rendered":"\n<p>In this guide, we are going to learn how to install ownCloud Server on Debian 12. 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-12\">Installing ownCloud Server on Debian 12<\/a><ul><li><a href=\"#system-requirements\">System Requirements<\/a><\/li><li><a href=\"#run-system-update\">Run system update<\/a><\/li><li><a href=\"#install-apache-web-server\">Install Apache Web Server;<\/a><\/li><li><a href=\"#install-maria-db-on-debian-12\">Install MariaDB on Debian 12<\/a><\/li><li><a href=\"#install-php-on-debian-12\">Install PHP on Debian 12<\/a><\/li><li><a href=\"#installing-own-cloud-server-on-debian-12-1\">Installing ownCloud Server on Debian 12<\/a><ul><li><a href=\"#install-own-cloud-repository\">Install ownCloud repository<\/a><\/li><li><a href=\"#install-own-cloud-repository-signing-key\">Install ownCloud Repository Signing Key<\/a><\/li><li><a href=\"#install-own-cloud-server\">Install ownCloud Server<\/a><\/li><\/ul><\/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-12\">Installing ownCloud Server on Debian 12<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"system-requirements\">System Requirements<\/h3>\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=\"run-system-update\">Run system update<\/h3>\n\n\n\n<p>Ensure your system package cache is up-to-date.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">apt update<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-apache-web-server\">Install Apache Web Server;<\/h3>\n\n\n\n<p>Check how to install Apache web server on Debian 12 by following the guide below;<\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-apache-web-server-on-debian-12\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install Apache Web Server on Debian 12<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-maria-db-on-debian-12\">Install MariaDB on Debian 12<\/h3>\n\n\n\n<p>MariaDB 10.11 is the current latest version of MariaDB that is supported and is the current available version on the default Debian 12 repositories.<\/p>\n\n\n\n<p>Hence, to install MariaDB 10.11, check the guide below;<\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-mariadb-10-on-debian-12\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install MariaDB 10 on Debian 12<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-php-on-debian-12\">Install PHP on Debian 12<\/h3>\n\n\n\n<p>Debian 12 default repositories ship with PHP 8.2. ownCloud at the moment suppors only upto the PHP 7.4 LTS Service even though it has reached its end of life.<\/p>\n\n\n\n<p>Thus, you need to install PHP 7.4 and other Required Modules for ownCloud;<\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/how-to-install-php-8-on-debian-12\/#install-php-7-x-8-0-8-1-on-debian-12\">Install PHP 7.4 on Debian 12<\/a><\/p>\n\n\n\n<p>Verify the version of PHP installed;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php -v<\/code><\/pre>\n\n\n\n<pre class=\"scroll-sz\"><code>\nPHP 7.4.33 (cli) (built: Jun  9 2023 07:41:51) ( NTS )\nCopyright (c) The PHP Group\nZend Engine v3.4.0, Copyright (c) Zend Technologies\n    with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies\n<\/code><\/pre>\n\n\n\n<p>Install extra PHP modules;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install libapache2-mod-php7.4 php7.4-{mysql,intl,curl,gd,xml,mbstring,zip} -y<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"installing-own-cloud-server-on-debian-12-1\">Installing ownCloud Server on Debian 12<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"install-own-cloud-repository\">Install ownCloud repository<\/h4>\n\n\n\n<p>OwnCloud is not included by default on Debian 12 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 href=\"https:\/\/software.opensuse.org\/download\/package?package=owncloud-complete-files&amp;project=isv%3AownCloud%3Aserver%3A10\" target=\"_blank\" rel=\"noreferrer noopener\">ownCloud repos<\/a>&nbsp;for various Debian release versions. Unfortunately, as of this writing, there isn&#8217;t a repo for Debian 12. Hence, we will a repo for Debian 11, which can be installed as follows;<\/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<h4 class=\"wp-block-heading\" id=\"install-own-cloud-repository-signing-key\">Install ownCloud Repository Signing Key<\/h4>\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<h4 class=\"wp-block-heading\" id=\"install-own-cloud-server\">Install ownCloud Server<\/h4>\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<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<pre class=\"wp-block-code\"><code>ls -1 \/var\/www\/owncloud<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>\napps\napps-external\nassets\nAUTHORS\nCHANGELOG.md\nconfig\nconsole.php\nCOPYING\ncore\ncron.php\ndata\ndb_structure.xml\netc\nindex.html\nindex.php\nlib\nocc\nocm-provider\nocs\nocs-provider\npublic.php\nREADME.md\nremote.php\nresources\nrobots.txt\nsettings\nstatus.php\nupdater\nversion.php\n<\/code><\/pre>\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. Ensure the output is <strong><code>Syntax OK<\/code><\/strong>.<\/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 php7.4<\/code><\/pre>\n\n\n\n<p>Update ownership of the ownCloud root directory;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chown -R www-data: \/var\/www\/owncloud<\/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 12\" 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=\"Install ownCloud Server on Debian 12\" 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 12.<\/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=\"Install ownCloud Server on Debian 12\" 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=\"Install ownCloud Server on Debian 12\" 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 12. If you need to have your own self-hosted cloud<\/p>\n","protected":false},"author":10,"featured_media":17261,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[39,121,249],"tags":[6894,6893,6892,6895,4322],"class_list":["post-17257","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-storage","category-howtos","category-owncloud","tag-debian-12-owncloud","tag-debian-12-owncloud-server","tag-install-owncloud-server-on-debian-12","tag-owncloud-debian-12","tag-owncloud-server","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\/17257"}],"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\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=17257"}],"version-history":[{"count":4,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/17257\/revisions"}],"predecessor-version":[{"id":20777,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/17257\/revisions\/20777"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/17261"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=17257"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=17257"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=17257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}