Ready to install Nextcloud on Ubuntu 24.04 with Let's Encrypt? In this tutorial, I'll simplify this process and provide you with clear instructions to set up and configure your server with Nextcloud using the Snap package manager.
Nextcloud 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 & 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.
Installing Nextcloud on Ubuntu 24.04 with Let's Encrypt
To install Nextcloud on Ubuntu 24.04 with a Let's Encrypt certificate, you'll first update the package index, use the Snap package manager to install Nextcloud, then configure a Nextcloud administrative account using the command line. Finally you'll set up Let's Encrypt using the nextcloud.enable-https
command.
Note
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 1-click Nextcloud application. Just choose a server, and while prompted to choose the operating system, choose Nextcloud from the dropdown menu. This will set up Nextcloud in minutes! However, if you prefer to get your hands dirty, keep reading.
Prerequisites
To follow this tutorial, you'll need:
- An Ubuntu 24.04 server with a non-root user with
sudo
privileges. If you haven't noticed, we offer extremely powerful Ubuntu servers at the globe's absolute lowest price. Take a look at our offerings and prepare for your mind to be blown 🤯.
Check out our How to access your server using SSH guide to learn how to access your server and create a sudo
user.
Step 1: Updating the Package Cache
Start by updating the packages in the package manager cache to the latest available versions using the following command:
sudo apt update
Step 2: Installing Nextcloud on Ubuntu Using Snap
To install Nextcloud, we can take advantage of the Snap packaging tool for Ubuntu, which allows software organizations to publish software in a single package with all dependencies, configurations, and auto-updating features.
Run the following command to install the Nextcloud snap package:
sudo snap install nextcloud
This will download and install Nextcloud on your system, and you will receive an output similar to the following:
To confirm that the installation was successful, run the following command:
snap changes nextcloud
You should receive the following output:
For more information on the Nextcloud package, you can use the following command:
snap info nextcloud
This will give you information such as the publisher, contact information, commands, services, and other metrics.
Step 3: Configuring your Nextcloud Administrative Account
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.
You can use the nextcloud.manual-install
command to configure a Nextcloud admin account directly from the command line by passing it a username and a password like so:
sudo nextcloud.manual-install your_user your_password
Make sure to replace your_user
and your_password
with your preferred username and password.
As a result, you should see the following output:
Nextcloud was successfully installed
With this, you now need to add your server's domain name and IP address to your trusted domains.
Step 4: Configuring Trusted Domains
By default, Nextcloud only responds to web requests that are sent to the localhost
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’ll need to change the trusted domains setting.
To add an additional trusted domain to Nextcloud, run the following command:
sudo nextcloud.occ config:system:set trusted_domains 1 --value=example.com
Repeat this command for each domain name of yours with an incremented number, and make sure to replace example.com
with your domain names or IP address. For example to add another domain:
sudo nextcloud.occ config:system:set trusted_domains 2 --value=cloud.example.com
And to add your IP address:
sudo nextcloud.occ config:system:set trusted_domains 3 --value=your_ip_address
Note the increments in the trusted_domains
parameter.
To see all your trusted domains, use the following command:
sudo nextcloud.occ config:system:get trusted_domains
With this, you can now install a Let's Encrypt SSL certificate.
Step 5: Nextcloud Let's Encrypt Setup for Ubuntu Servers
It is important to secure your Nextcloud server with HTTPS. To do so, add a Let's Encrypt SSL certificate to your Nextcloud installation using the following command:
sudo nextcloud.enable-https lets-encrypt
You'll be presented with a few requirements:
Make sure your server meets these requirements and hit Y. Next, type in your email and domain name.
Restart Nextcloud:
sudo snap restart nextcloud
With this, you can now access your Nextcloud server throughout the Web via a secure HTTPS protocol.
Step 6: Using the Nextcloud Web Interface
With Nextcloud configured, navigate to your domain name or IP with your web browser:
https://your_domain_or_IP
Note: You may temporarily see a message informing you that Nextcloud is in Maintenance Mode, wait for a few minutes while Nextcloud sets things up, and refresh the page.
You should be moved to a login screen. Use the username and password you configured earlier.
You will be greeted with a message that suggests you take advantage of different Nextcloud features with different recommended file templates.
In the Nextcloud web dashboard, you can manage your files, set your location for weather data and customize your Nextcloud experience. You can explore different features and pages in the user interface to learn more about what you can accomplish with Nextcloud.
Congrats
You've successfully installed Nextcloud on your Ubuntu 24.04 server with a Let's Encrypt SSL certificate, and you can now manage your files and collaborate with others on the cloud, using your own private server. For more on information on Nextcloud, check out their official website.
Reader Alert!
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 😊). Just visit our website, choose the server’s 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!
Installing Nextcloud on Debian
To install Nextcloud on Debian, check out our How To Install and Configure Nextcloud on Debian article.
FAQ
How can Nextcloud be deployed using Kubernetes?
Nextcloud can be deployed on Kubernetes by using Helm charts or custom manifests. This allows for scalable and manageable installations across various environments, leveraging Kubernetes' orchestration capabilities.
What are the system requirements for installing Nextcloud on Ubuntu 24.04?
Nextcloud requires a server running Ubuntu 24.04, with at least 2 GB of RAM and 500 MB of storage for the base installation.
How do I set up a reverse proxy for Nextcloud?
A reverse proxy for Nextcloud can be set up using Nginx or Apache. Configure the proxy to forward requests to the Nextcloud server, enhancing security and load balancing. Ensure SSL is configured for secure connections.