{"id":1351,"date":"2021-03-11T16:59:14","date_gmt":"2021-03-11T16:59:14","guid":{"rendered":"https:\/\/dft.wiki\/?p=1351"},"modified":"2026-04-21T13:37:35","modified_gmt":"2026-04-21T17:37:35","slug":"private-cloud-with-nextcloud-21-on-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/dft.wiki\/?p=1351","title":{"rendered":"Private Cloud with NextCloud 29 on Ubuntu"},"content":{"rendered":"<p>This instance of NextCloud will be installed on the server. If you wish to have it using Docker or Snap see the previous post [<a href=\"https:\/\/dft.wiki\/?p=183\">Link<\/a>].<\/p>\n<p>If you don&#8217;t have Apache + PHP + MySQL running follow these easy steps before starting with the NextCloud it self:<\/p>\n<pre>sudo apt update &amp;&amp; sudo apt upgrade -y\r\nsudo apt install apache2 -y\r\nsudo systemctl start mysql &amp;&amp; sudo systemctl enable mysql\r\nsudo systemctl start apache2 &amp;&amp; sudo systemctl enable apache2\r\nsudo apt install php8.3 php8.3-cli php8.3-{bz2,curl,mbstring,intl} -y\r\nsudo apt install mysql-server -y\r\nsudo systemctl start mysql &amp;&amp; sudo systemctl enable mysql<\/pre>\n<p><strong>Configuring Apache VHost<\/strong><\/p>\n<pre>sudo nano \/etc\/apache2\/sites-available\/000-default.conf<\/pre>\n<pre>&lt;Directory \/var\/www\/html\/&gt;\r\n  Require all granted\r\n  AllowOverride All\r\n  Options FollowSymLinks MultiViews\r\n  &lt;IfModule mod_dav.c&gt;\r\n    Dav off\r\n  &lt;\/IfModule&gt;\r\n&lt;\/Directory&gt;<\/pre>\n<pre>sudo a2enmod rewrite headers env dir mime\r\nsudo systemctl restart apache2<\/pre>\n<p><strong>Installing NextCloud<\/strong><\/p>\n<pre>wget https:\/\/download.nextcloud.com\/server\/releases\/nextcloud-<strong>29.0.3<\/strong>.zip\r\nsudo apt install unzip -y\r\nsudo rm -rf \/var\/www\/html\r\nsudo unzip nextcloud-<strong>29.0.3<\/strong>.zip -d \/var\/www\/\r\nsudo mv \/var\/www\/nextcloud \/var\/www\/html\r\nsudo chown -R www-data:www-data \/var\/www\/html\/\r\nsudo apt install php8.3-mysql php8.3-zip php8.3-dom php8.3-xml php8.3-gd -y<\/pre>\n<p>Get the latest at [<a href=\"https:\/\/nextcloud.com\/install\/#instructions-server\">Link<\/a>].<\/p>\n<p><strong>MySQL Configuration<\/strong><\/p>\n<p>Create the database, create the user, give privileges, and flush MySQL privileges:<\/p>\n<pre>sudo mysql<\/pre>\n<pre>CREATE DATABASE nextcloud_db;\r\nCREATE USER nextcloud_user@localhost IDENTIFIED BY '<strong>nextcloud_password<\/strong>';\r\nGRANT ALL PRIVILEGES ON nextcloud_db.* TO nextcloud_user@localhost;\r\nFLUSH PRIVILEGES;\r\nEXIT;<\/pre>\n<p><strong>UI Installation<\/strong><\/p>\n<p>Navigate to http:\/\/example.com and complete the installation on the web-ui.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4307\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2021\/03\/Screenshot-from-2024-07-02-15-18-23.png\" alt=\"\" width=\"375\" height=\"1203\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2021\/03\/Screenshot-from-2024-07-02-15-18-23.png 375w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2021\/03\/Screenshot-from-2024-07-02-15-18-23-319x1024.png 319w\" sizes=\"auto, (max-width: 375px) 100vw, 375px\" \/><\/p>\n<p>Create the Admin account then, enter the credentials to the DB.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4306 size-medium\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2021\/03\/Screenshot-from-2024-07-02-14-25-14-286x300.png\" alt=\"\" width=\"286\" height=\"300\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2021\/03\/Screenshot-from-2024-07-02-14-25-14-286x300.png 286w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2021\/03\/Screenshot-from-2024-07-02-14-25-14.png 744w\" sizes=\"auto, (max-width: 286px) 100vw, 286px\" \/><\/p>\n<p>Feel free to install all the plugins to test them in a sandbox but avoid using them in production (publicly reachable) whenever possible.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-4308\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2021\/03\/Screenshot-from-2024-07-02-15-21-44-1024x946.png\" alt=\"\" width=\"640\" height=\"591\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2021\/03\/Screenshot-from-2024-07-02-15-21-44-1024x946.png 1024w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2021\/03\/Screenshot-from-2024-07-02-15-21-44-300x277.png 300w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2021\/03\/Screenshot-from-2024-07-02-15-21-44-768x709.png 768w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2021\/03\/Screenshot-from-2024-07-02-15-21-44.png 1254w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>Done!<\/p>\n<hr \/>\n<p><strong>BONUS<\/strong><\/p>\n<p><strong>OwnCloud<\/strong> is another opensource alternative to NextCloud, try it out and see what suits better to your needs:<\/p>\n<pre>sudo apt install docker.io -y\r\nsudo docker run --name OwnCloud --restart=unless-stopped -v \/opt\/OwnCloudData:\/mnt\/data\/ -d -e OWNCLOUD_DOMAIN=owncloud.example.com:8080 -p80:8080 owncloud\/server<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>This instance of NextCloud will be installed on the server. If you wish to have [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-1351","post","type-post","status-publish","format-standard","hentry","category-web"],"_links":{"self":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/1351","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1351"}],"version-history":[{"count":12,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/1351\/revisions"}],"predecessor-version":[{"id":5505,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/1351\/revisions\/5505"}],"wp:attachment":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1351"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1351"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1351"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}