{"id":7425,"date":"2025-08-18T08:00:51","date_gmt":"2025-08-18T08:00:51","guid":{"rendered":"https:\/\/blog.ssdnodes.com\/blog\/?p=7425"},"modified":"2025-08-19T09:27:04","modified_gmt":"2025-08-19T09:27:04","slug":"install-nextcloud-on-debian-12-lets-encrypt","status":"publish","type":"post","link":"https:\/\/www.ssdnodes.com\/blog\/install-nextcloud-on-debian-12-lets-encrypt\/","title":{"rendered":"How To Install Nextcloud on Debian 12 with Snap and Let\u2019s Encrypt"},"content":{"rendered":"<p>Looking for a tutorial on how to install Nextcloud on Debian 12 and secure it with a Let's Encrypt SSL certificate? You're in the right place!<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10360 size-full\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/2.jpg\" alt=\"Install Nextcloud on Debian with Let's Encrypt\" width=\"579\" height=\"386\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/2.jpg 579w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/2-300x200.jpg 300w\" sizes=\"auto, (max-width: 579px) 100vw, 579px\" \/><\/p>\n<p><a href=\"https:\/\/nextcloud.com\/\" target=\"_blank\" rel=\"noopener\">Nextcloud<\/a> is an open source platform that offers a modern content collaboration platform for managing your files, with capabilities such as real-time document editing, video chat &amp; groupware on mobile, desktop and web. Nextcloud is similar to Dropbox and Google Drive, and was forked from the ownCloud open source software by some of the original ownCloud developers.<\/p>\n<h2>Installing Nextcloud on Debian 12 with Let's Encrypt<\/h2>\n<p>To install Nextcloud on Debian 12 with a Let's Encrypt certificate, you'll first update the package index, install the Snap package manager for Debian, use it to install Nextcloud, configure a Nextcloud administrative account, then you'll set up Let's Encrypt using the <code>nextcloud.enable-https<\/code> command.<\/p>\n<h3>Note<\/h3>\n<p>If you want to skip all the technical steps of setting up Nextcloud on your server and have it installed in minutes, you can use our tried and tested <strong>1-click<\/strong> Nextcloud application. Just choose a <a href=\"https:\/\/www.ssdnodes.com\/\">server<\/a>, and while prompted to choose the operating system, choose\u00a0<strong>Nextcloud<\/strong> from the dropdown menu. This will set up Nextcloud\u00a0in minutes! However, if you prefer to get your hands dirty, keep reading.<\/p>\n<h2>Prerequisites<\/h2>\n<p>To follow this tutorial, you'll need:<\/p>\n<ul>\n<li>A Debian 12 server. Get your VPS hosting from a reputable and trustworthy provider like <strong>SSD Nodes<\/strong>. We offer powerful Debian servers and the best deals. Take a look at our <a href=\"https:\/\/ssdnodes.com\/\" target=\"_blank\" rel=\"noopener\">offerings<\/a>\u00a0and prepare for your mind to be blown \ud83e\udd2f.<\/li>\n<\/ul>\n<p>Check out our\u00a0<a href=\"https:\/\/www.ssdnodes.com\/blog\/tutorial-setting-up-and-securing-ssh-based-authentication\/\">How to access your server using SSH<\/a>\u00a0guide to learn how to access your server and create a\u00a0<code>sudo<\/code>\u00a0user.<\/p>\n<h2>Step 1: Updating the Package Cache<\/h2>\n<p>Start by updating the packages in the package manager cache to the latest available versions using the following command:<\/p>\n<pre><code>sudo apt update<\/code><\/pre>\n<h2>Step 2: Installing Nextcloud on Debian 12<\/h2>\n<p>To install Nextcloud, we can take advantage of the <a href=\"https:\/\/snapcraft.io\/\" target=\"_blank\" rel=\"noopener\">Snap<\/a> packaging tool, which allows software organizations to publish software in a single package with all dependencies, configurations, and auto-updating features.<\/p>\n<p>First, install the Snap packaging tool with the following command:<\/p>\n<pre><code>sudo apt install snapd -y<\/code><\/pre>\n<p>Run the following command to install the Nextcloud snap package:<\/p>\n<pre><code>sudo snap install nextcloud<\/code><\/pre>\n<p>This will download and install Nextcloud on your system, and you will receive an output similar to the following:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10321\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/install-nextcloud-1024x188.webp\" alt=\"nextcloud installed on debian\" width=\"600\" height=\"110\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/install-nextcloud-1024x188.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/install-nextcloud-300x55.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/install-nextcloud-768x141.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/install-nextcloud.webp 1426w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>To confirm that the installation was successful, run the following command:<\/p>\n<pre><code>snap changes nextcloud<\/code><\/pre>\n<p>You should receive the following output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10323\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/snap-changes-nextcloud-1024x188.webp\" alt=\"debian snap changes nextcloud\" width=\"600\" height=\"110\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/snap-changes-nextcloud-1024x188.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/snap-changes-nextcloud-300x55.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/snap-changes-nextcloud-768x141.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/snap-changes-nextcloud.webp 1426w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>For more information on the Nextcloud package, you can use the following command:<\/p>\n<pre><code>snap info nextcloud<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10326\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/snap-info-nextcloud-1024x981.webp\" alt=\"snap nextcloud info command\" width=\"600\" height=\"575\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/snap-info-nextcloud-1024x981.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/snap-info-nextcloud-300x287.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/snap-info-nextcloud-768x736.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/snap-info-nextcloud.webp 1426w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>This will give you information such as the publisher, contact information, commands, services, and other metrics.<\/p>\n<h2>Step 3: Configuring your Nextcloud Administrative Account<\/h2>\n<p>Although you can configure your Nextcloud admin account on the web interface, it is best to avoid making your unsecured Nextcloud configuration accessible on the Internet.<\/p>\n<p>You can use the <code>nextcloud.manual-install<\/code> command to configure a Nextcloud admin account directly from the command line by passing it a username and a password like so:<\/p>\n<pre><code>sudo \/snap\/bin\/nextcloud.manual-install your_user password<\/code><\/pre>\n<p>Make sure to replace <code>your_user<\/code> and <code>your_password<\/code> with your preferred username and password.<\/p>\n<p>As a result, you should see the following output:<\/p>\n<pre><code>Nextcloud was successfully installed<\/code><\/pre>\n<p>With this, you now need to add your server's domain name and IP address to your Nextcloud trusted domains.<\/p>\n<h2>Step 4: Configuring Trusted Domains<\/h2>\n<p>By default, Nextcloud only responds to web requests that are sent to the <code>localhost<\/code> hostname. This makes us unable to access Nextcloud via our server's IP address or our domain name. To solve this and make Nextcloud accessible to the outside world, we\u2019ll need to change the trusted domains setting.<\/p>\n<p>To add an additional trusted domain to Nextcloud on Debian, run the following command:<\/p>\n<pre><code>sudo \/snap\/bin\/nextcloud.occ config:system:set trusted_domains 1 --value=example.com<\/code><\/pre>\n<p>Repeat this command for each domain name of yours with an incremented number, and make sure to replace <code>example.com<\/code> with your domain name or IP address. For example to add another domain:<\/p>\n<pre><code>sudo \/snap\/bin\/nextcloud.occ config:system:set trusted_domains 2 --value=cloud.example.com<\/code><\/pre>\n<p>And to add your IP address:<\/p>\n<pre><code>sudo \/snap\/bin\/nextcloud.occ config:system:set trusted_domains 3 --value=your_ip_address<\/code><\/pre>\n<p>Note the increments in the <code>trusted_domains<\/code> parameter.<\/p>\n<p>To see all your trusted domains, use the following command:<\/p>\n<pre><code>sudo \/snap\/bin\/nextcloud.occ config:system:get trusted_domains<\/code><code><\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10324\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/trusted-domains-1024x248.webp\" alt=\"nextcloud trusted domains on debian server\" width=\"600\" height=\"146\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/trusted-domains-1024x248.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/trusted-domains-300x73.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/trusted-domains-768x186.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/trusted-domains.webp 1426w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>Next, you'll secure your Nextcloud web server using HTTPS with a Let's Encrypt SSL certificate.<\/p>\n<h2>Step 5: Nextcloud Let's Encrypt Setup on Debian<\/h2>\n<p>To secure your Nextcloud server with HTTPS, add a Let's Encrypt SSL certificate to your installation using the following command:<\/p>\n<pre><code>sudo \/snap\/bin\/nextcloud.enable-https lets-encrypt<\/code><\/pre>\n<p>You'll be presented with a few requirements:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10325\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/letsencrypt-1024x707.png\" alt=\"letsencrypt for nextcloud on debian\" width=\"600\" height=\"414\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/letsencrypt-1024x707.png 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/letsencrypt-300x207.png 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/letsencrypt-768x530.png 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/letsencrypt.png 1426w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>Make sure your server meets these requirements and hit\u00a0<strong>Y<\/strong>. Next, type in your email and domain name.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10327\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/letsencrypt-done-1024x279.webp\" alt=\"successful nextcloud letsencrypt setup\" width=\"600\" height=\"163\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/letsencrypt-done-1024x279.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/letsencrypt-done-300x82.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/letsencrypt-done-768x209.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/letsencrypt-done.webp 1426w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>Restart Nextcloud:<\/p>\n<p><code>sudo snap restart nextcloud<\/code><\/p>\n<p>With this, you can now access your Nextcloud server throughout the Web via a secure\u00a0<a href=\"https:\/\/www.ssdnodes.com\/blog\/an-introduction-to-the-http-protocol-and-its-role-in-the-web\/\">HTTPS<\/a>\u00a0protocol.<\/p>\n<h2>Step 6: Using the Nextcloud Web Interface<\/h2>\n<p>With Nextcloud configured, navigate to your domain name or IP with your web browser:<\/p>\n<pre><code>https:\/\/your_domain_or_IP<\/code><\/pre>\n<p><strong>Note:<\/strong> You may temporarily see a message informing you that Nextcloud is in <strong>Maintenance Mode<\/strong>, wait for a few minutes while Nextcloud sets things up, and refresh the page.<\/p>\n<p>You should be moved to a login screen. Use the username and password you configured earlier.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10328\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/UI-1024x488.webp\" alt=\"nextcloud user interface\" width=\"600\" height=\"286\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/UI-1024x488.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/UI-300x143.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/UI-768x366.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/UI-1536x732.webp 1536w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2023\/05\/UI.webp 1594w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<h2>Congrats<\/h2>\n<p>You've successfully installed Nextcloud on your Debian 12 server, and secured it with a Let's Encrypt SSL certificate. You can now upload your files and collaborate with others on the cloud, using <a href=\"https:\/\/ssdnodes.com\/\" target=\"_blank\" rel=\"noopener\">your own private VPS server<\/a>.<\/p>\n<p>For more on information on Nextcloud, check out their <a href=\"https:\/\/nextcloud.com\/\" target=\"_blank\" rel=\"noopener\">official website<\/a><\/p>\n<h2>Reader Alert!<\/h2>\n<p>If you feel that the technical instructions in this tutorial are time-consuming, or beyond your expertise, you can choose a very convenient and practical solution, ready-made, fully and professionally tested, and developed by SSD Nodes (That is us \ud83d\ude0a). Just visit <a href=\"https:\/\/www.ssdnodes.com\/\">our website<\/a>, choose the server\u2019s specifications that fit your needs, and while prompted to choose among the operating systems and the 1-Click Applications we have, choose Nextcloud from the dropdown menu, complete your checkout, and in a couple of minutes our algorithms will take care of all the technical aspects smoothly and effortlessly, just for you!<\/p>\n<h2>Installing Nextcloud on Ubuntu<\/h2>\n<p>To install Nextcloud on Ubuntu, take a look at our How To Install and Configure Nextcloud on Ubuntu article.<\/p>\n<h2>FAQ<\/h2>\n<h3>Does Nextcloud support end-to-end encryption?<\/h3>\n<p>Yes, Nextcloud supports end-to-end encryption for securing data. This feature encrypts files on the client side before they are uploaded to the server, ensuring that only the user has access to the unencrypted data.<\/p>\n<h3>What are the best practices for Nextcloud backups?<\/h3>\n<p>Regularly back up the Nextcloud data directory and database. Use tools like rsync for file backups and mysqldump for database dumps. Automate the process and store backups in a separate, secure location.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Install Nextcloud on Ubuntu 24.04 with Snap and secure it using Let&#8217;s Encrypt SSL. Follow this tutorial to set up a reliable cloud storage solution.<\/p>\n","protected":false},"author":19,"featured_media":10358,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[18,30],"tags":[179,180],"class_list":["post-7425","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops","category-tutorials","tag-debian","tag-nextcloud"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/posts\/7425","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/comments?post=7425"}],"version-history":[{"count":21,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/posts\/7425\/revisions"}],"predecessor-version":[{"id":10359,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/posts\/7425\/revisions\/10359"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/media\/10358"}],"wp:attachment":[{"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/media?parent=7425"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/categories?post=7425"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/tags?post=7425"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}