{"id":70042,"date":"2022-10-25T15:03:20","date_gmt":"2022-10-25T15:03:20","guid":{"rendered":"https:\/\/www.techrepublic.com\/?p=4004039"},"modified":"2022-10-25T15:03:20","modified_gmt":"2022-10-25T15:03:20","slug":"how-to-deploy-nextcloud-25-on-ubuntu-server-22-04","status":"publish","type":"post","link":"https:\/\/cloudnewshub.com\/?p=70042","title":{"rendered":"How to deploy Nextcloud 25 on Ubuntu Server 22.04"},"content":{"rendered":"<figure id=\"attachment_4004045\" aria-describedby=\"caption-attachment-4004045\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-article wp-image-4004045\" src=\"http:\/\/cloudnewshub.com\/wp-content\/uploads\/2022\/10\/how-to-deploy-nextcloud-25-on-ubuntu-server-22-04.jpg\" alt=\"Close up of an unrecognizable young businessman holding a laptop in a server room\" width=\"770\" height=\"513\"><figcaption id=\"caption-attachment-4004045\" class=\"wp-caption-text\">Image: Myvisuals\/Adobe Stock<\/figcaption><\/figure>\n<p>Nextcloud is always pushing the envelope of what on-premises cloud servers can be and do. With their latest release, Nextcloud shifts some of the focus to digital well-being with the help of a complete redesign of the UI. There\u2019s more personalization, more universal access, much-improved applications, a built-in photo uploader and editor, AI-powered facial and object recognition for uploaded photos, improved Talk, a more performant email client, better contact organization and more.<\/p>\n<p><strong>SEE: <a href=\"https:\/\/www.techrepublic.com\/resource-library\/whitepapers\/hiring-kit-cloud-engineer\/\" target=\"_blank\" rel=\"nofollow noopener sponsored noreferrer\">Hiring Kit: Cloud Engineer<\/a> (TechRepublic Premium)<\/strong><\/p>\n<p>What\u2019s most striking about Nextcloud 25 is the UI. The designers and developers have really gone out of their way to make the platform much more user-friendly and modern. As usual, there are also multiple routes for getting Nextcloud installed. However, I want to go the traditional route and install it on Ubuntu Server 22.04.<\/p>\n<h2>What you\u2019ll need to install Nextcloud 25<\/h2>\n<p>To install Nextcloud 25, you\u2019ll need a running instance of Ubuntu Server 22.04 and a user with sudo privileges. That\u2019s it.<\/p>\n<h2>How to install the necessary requirements<\/h2>\n<p>The first thing you must do is install the web and database servers with the command:<\/p>\n<p><code>sudo apt-get install apache2 mysql-server -y<\/code><\/p>\n<p>Start and enable them both with:<\/p>\n<p><code>sudo systemctl enable --now apache2<br \/><code>sudo systemctl enable --now mysql<\/code><\/code><\/p>\n<p>Next, install the php dependencies with:<\/p>\n<p><code>sudo apt-get install php zip libapache2-mod-php php-gd php-json php-mysql php-curl php-mbstring php-intl php-imagick php-xml php-zip php-mysql php-bcmath php-gmp zip -y<\/code><\/p>\n<h2>How to set the MySQL root password<\/h2>\n<p>For some reason, the mysql_secure_installation failed me. Instead, I had to set the MySQL admin password manually. First log into the MySQL console with:<\/p>\n<p><code>sudo mysql<\/code><\/p>\n<p>Once there, set the admin password with:<\/p>\n<p><code>ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password by 'PASSWORD';<\/code><\/p>\n<p>Where PASSWORD is a strong\/unique password.<\/p>\n<p>Exit from the console with exit.<\/p>\n<h2>How to create the database and user<\/h2>\n<p>Next, we can create the database. To do that, log back into the MySQL console with:<\/p>\n<p><code>mysql -u root -p<\/code><\/p>\n<p>Create the database with:<\/p>\n<p><code>CREATE DATABASE nextcloud;<\/code><\/p>\n<p>Create the new user with:<\/p>\n<p><code>CREATE USER 'nextcloud'@'localhost' IDENTIFIED BY 'PASSWORD';<\/code><\/p>\n<p>Where PASSWORD is a unique and strong password.<\/p>\n<p>Give the new user the necessary permissions with the command:<\/p>\n<p><code>GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud'@'localhost';<\/code><\/p>\n<p>Flush the privileges and exit the console with the commands:<\/p>\n<p><code>FLUSH PRIVILEGES;<br \/><code>exit<\/code><\/code><\/p>\n<h2>How to download and unpack the Nextcloud file<\/h2>\n<p>Download the Nextcloud source with the command:<\/p>\n<p><code>wget https:\/\/download.nextcloud.com\/server\/releases\/latest.zip<\/code><\/p>\n<p>Install unzip with:<\/p>\n<aside class=\"pinbox right\">\n<h3 class=\"heading\">Open source: Must-read coverage<\/h3>\n<\/aside>\n<p><code>sudo apt-get install unzip -y<\/code><\/p>\n<p>Unpack the downloaded file with:<\/p>\n<p><code>unzip latest.zip<\/code><\/p>\n<p>Move the new directory into the Apache document root with:<\/p>\n<p><code>sudo mv nextcloud \/var\/www\/html\/<\/code><\/p>\n<p>Grant the proper permissions with:<\/p>\n<p><code>sudo chown -R www-data:www-data \/var\/www\/html\/nextcloud<\/code><\/p>\n<h2>How to configure Apache for Nextcloud<\/h2>\n<p>We now have to create an Apache configuration file with the command:<\/p>\n<p><code>sudo nano \/etc\/apache2\/sites-available\/nextcloud.conf<\/code><\/p>\n<p>In that file, paste the following:<\/p>\n<p><code>Alias \/nextcloud \"\/var\/www\/html\/nextcloud\/\"<\/code><\/p>\n<p><code>&lt;Directory \/var\/www\/html\/nextcloud\/&gt;<br \/><code>Require all granted<br \/><code>AllowOverride All<br \/><code>Options FollowSymLinks MultiViews<\/code><\/code><\/code><\/code><\/p>\n<p><code>&lt;IfModule mod_dav.c&gt;<\/code><\/p>\n<p><code>Dav off<br \/><code>&lt;\/IfModule&gt;<br \/><code>&lt;\/Directory&gt;<\/code><\/code><\/code><\/p>\n<p>Enable the new site with:<\/p>\n<p><code>sudo a2ensite nextcloud<\/code><\/p>\n<p>Enable the necessary Apache modules:<\/p>\n<p><code>sudo a2enmod rewrite headers env dir mime<\/code><\/p>\n<p>Increase the PHP memory limit with the command:<\/p>\n<p><code>sudo sed -i '\/^memory_limit =\/s\/=.*\/= 512M\/' \/etc\/php\/7.4\/apache2\/php.ini<\/code><\/p>\n<p>Restart Apache:<\/p>\n<p><code>sudo systemctl restart apache2<\/code><\/p>\n<h2>How to complete the installation<\/h2>\n<p>Finally, open a web browser and point it to http:\/\/SERVER\/nextcloud, where SERVER is the IP address or domain of the hosting server. You should be greeted by the web-based installer, where you must create an admin user and fill in the details for the database (<strong>Figure A<\/strong>).<\/p>\n<p><strong>Figure A<\/strong><\/p>\n<figure id=\"attachment_4004040\" aria-describedby=\"caption-attachment-4004040\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-article wp-image-4004040\" src=\"http:\/\/cloudnewshub.com\/wp-content\/uploads\/2022\/10\/how-to-deploy-nextcloud-25-on-ubuntu-server-22-04-1.jpg\" alt width=\"770\" height=\"628\"><figcaption id=\"caption-attachment-4004040\" class=\"wp-caption-text\">The Nextcloud 25 web-based installer.<\/figcaption><\/figure>\n<p>Click Install and allow the magic to happen under the hood. When it finishes, you\u2019ll find yourself on the new Nextcloud Hub, logged in as the admin user (<strong>Figure B<\/strong>).<\/p>\n<p><strong>Figure B<\/strong><\/p>\n<figure id=\"attachment_4004041\" aria-describedby=\"caption-attachment-4004041\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-article wp-image-4004041\" src=\"http:\/\/cloudnewshub.com\/wp-content\/uploads\/2022\/10\/how-to-deploy-nextcloud-25-on-ubuntu-server-22-04-2.jpg\" alt width=\"770\" height=\"616\"><figcaption id=\"caption-attachment-4004041\" class=\"wp-caption-text\">The new Nextcloud interface is a subtle, but important upgrade from the previous iterations.<\/figcaption><\/figure>\n<p>And there you have it, you\u2019ve just installed the latest and greatest release from the fine developers of Nextcloud. Enjoy that refreshed interface and all the new features.<\/p>\n<p><em><strong>Subscribe to TechRepublic\u2019s <a href=\"https:\/\/www.youtube.com\/channel\/UCKyMiy1zmJ7aZ8aP6DLZLIA\" target=\"_blank\" rel=\"nofollow noopener sponsored noreferrer\">How To Make Tech Work on YouTube<\/a> for all the latest tech advice for business pros from Jack Wallen.<\/strong><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Image: Myvisuals\/Adobe Stock Nextcloud is always pushing the envelope of what on-premises cloud servers can be and do. With their latest release, Nextcloud shifts some of the focus to digital well-being with the help of a complete redesign of the UI. There\u2019s more personalization, more universal access, much-improved applications, a built-in photo uploader and editor, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":70043,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[40,783,596,177,562],"tags":[],"class_list":["post-70042","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cloud","category-cloudsync","category-linux","category-open-source","category-server"],"_links":{"self":[{"href":"https:\/\/cloudnewshub.com\/index.php?rest_route=\/wp\/v2\/posts\/70042","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudnewshub.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudnewshub.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudnewshub.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudnewshub.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=70042"}],"version-history":[{"count":0,"href":"https:\/\/cloudnewshub.com\/index.php?rest_route=\/wp\/v2\/posts\/70042\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudnewshub.com\/index.php?rest_route=\/wp\/v2\/media\/70043"}],"wp:attachment":[{"href":"https:\/\/cloudnewshub.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=70042"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudnewshub.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=70042"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudnewshub.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=70042"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}