
The demand for autonomy and control over our data is at an all-time high thanks to the unprecedented pace at which the digital landscape is evolving. Most commercial cloud offerings often leave us questioning the security and privacy of our digital lives.
And that’s why the call for self-hosting is gaining momentum. It has gained substantial popularity in recent years as individuals and organizations seek to break free from the shackles of commercial cloud offerings.
In this blog post, we introduce Nextcloud, a leading open-source, self-hosted cloud solution that gives you full control over your data. We’ll go over the benefits of Nextcloud and how to host it on Acorn.
Nextcloud is a popular, open source, self-hosted cloud storage platforms, making it a good alternative to commercial cloud storage solutions like Dropbox or Google Drive. Nextcloud actually goes beyond just file sharing, by providing a wide range of features that enable you to store, manage, collaborate, and communicate while having everything under your control. This makes it a good choice for organizations who want to collaborate with their teams and still have control over their data.
Let us look at some of the features of Nextcloud that make it popular:
When it comes to running Nextcloud, there are multiple options that users can choose from
Depending on your use case and requirements, you can choose one of the options. Our focus for this post will be self-hosting on your own server.
Even when it comes to running Nextcloud on your server, there are multiple ways users can install Nextcloud. One of the most popular and recommended ways to install Nextcloud using their all-in-one Docker image and deploying it as a container.
In this post, we are going to deploy Nextcloud on Acorn. Acorn is a fully managed cloud hosting platform that includes a fantastic cloud sandbox where you can run any containerized apps for up to two hours at no cost. It's perfect for evaluating a product like Nextcloud without having to provide a credit card or set up a home lab.
The other great thing about Acorn, is that even complex deployments like Nextcloud, that require a container working with a database, and a storage volume can be packaged as an Acorn image and deployed by anyone. I've created a Nextcloud Acorn that you can launch by just clicking this link. Acorn will ask you to create an account, but all you need to provide is your GitHub id, and you'll have access to the sandbox.
If you'd rather build your own Acornfile for Nextcloud I've documented the steps below. First let's get the Acorn CLI configured. The CLI allows you to interact with the Acorn Runtime as well as Acorn to deploy and manage your applications. Refer to the Installation documentation to install Acorn CLI for your environment.
The key step in deploying any application on Acorn is creating an Acornfile. An Acornfile describes how to build, develop, and run containerized applications. The best part about authoring an Acornfile is that you don’t need to learn anything new as it is similar to a YAML file.
Below is the Acornfile file that we’ve created to deploy Nextcloud on Acorn. You can also find this file in this repo.
services: mariadb: { image: "ghcr.io/acorn-io/mariadb:v10.11.#-#" } containers: { nextcloud: { image: "nextcloud:apache" env: { "MYSQL_HOST": "@{services.mariadb.address}" "MYSQL_DATABASE": "@{services.mariadb.data.dbName}" "MYSQL_USER": "@{services.mariadb.secrets.user.username}" "MYSQL_PASSWORD": "@{services.mariadb.secrets.user.password}" "PHP_UPLOAD_LIMIT": "1G" } dependsOn: ["mariadb"] ports: publish: "80/http" dirs: "/var/www/html": "volume://nextcloud-data" } } volumes: "nextcloud-data": size: "2G"
We define a few things in this Acornfile:
The MariaDB service that we are using in this can be used with any other Acorn that you create. Similarly, you can use any external storage service or configure a volume for the data to persist. You can read about running Nextcloud using Acorn on a home lab setup for a more advanced and personalized setup.
Read more about Acornfiles and the various components that make up an Acornfile.
To deploy the application to Acorn, first log in to Acorn using the following command:
acorn login acorn.io Navigate your browser to https://acorn.io/auth/login?p=pbfld5wf768qc5wjp298hxhngt67b4klzmrlb66jh8vmk4zgct9k2c and login Gtk-Message: 17:28:46.029: Not loading module "atk-bridge": The functionality is provided by GTK natively. Please try to not load it. • Setting default project to acorn.io/techmaharaj/acorn ✔ Login to beta.acorn.io as techmaharaj succeeded
This will open the Acorn portal where you can log in using your GitHub account. Once logged in, the control will return to the terminal and you should have successfully configured Acorn CLI on your system which is now connected to Acorn.
To deploy Nextcloud on Acorn, navigate to the directory with the Acorn file and execute the following command
acorn run -n nextcloud .
This will start the deployment process and Nextcloud will be deployed on Acorn. By default, all applications are deployed to Acorn’s Free sandbox mode which allows you to try and run applications for up to 2 hours after which it will be shutdown. You can upgrade to a pro account if you'd like to run the workload longer and pay for cloud resources as you use them.
Navigate to the Acorn portal to see the application
We can see that the Nextcloud is successfully deployed to Acorn along with the MariaDB service as well. To access the Nextcloud dashboard, click on the arrow next to the running status.
With this, we have successfully deployed Nextcloud to Acorn. With just two commands and an Acornfile we were able to deploy Nextcloud. That’s the beauty of Acron. It makes deploying and managing applications simpler.
If you want to try Nextcloud, just launch this one-click Acorn link. All you need is a GitHub account and Acorn will spin up a Nextcloud instance for you to try.
To leverage the full benefits of Nextcloud, one needs to pay attention to critical aspects like storage, networking, security, and the like. Below are some best practices that can transform your Nextcloud setup from a simple file-sharing application to a robust platform. These are especially applicable if you're hosting your own Nextcloud server in a home lab or private server.
Optimizing your Nextcloud instance on Acorn is easier thanks to the Acorn file. This single file is easy to use and allows you to configure everything from network to security, storage, and scalability. Refer to Nextcloud’s configuration settings to learn more about how you can fine-tune your setup.
In this blog post, we saw how Nextcloud, with its robust features and unwavering focus on privacy, offers a compelling option for secure data management and collaboration. From file sharing to office suite and chat, Nextcloud serves as a great alternative to commercial cloud services for enterprises and individuals.
Deploying Nextcloud with Acorn CLI is a breeze but it's even easier with the One-click installation option. It’s time to embrace true digital autonomy with self-hosting Nextcloud on Acorn.