Sync your files with Nextcloud for a private cloud without Google.

  • Nextcloud allows you to set up a private cloud with synchronization of files, calendars and contacts on your own server, without depending on Google.
  • Installing with Docker Compose, MariaDB, and Redis improves performance and makes it easier to integrate OnlyOffice or Collabora for online document editing.
  • Enabling 2FA, using HTTPS, and setting up automatic backups are key to securing your data against failures and unauthorized access.
  • To handle large hard drives, combining direct copies (scp/rsync) with occ reduces times compared to using only the synchronization client.

Sync your files with Nextcloud for a private cloud without Google.

Set up your own private cloud with Nextcloud It's one of the best ways to stop relying on Google Drive, Dropbox, or OneDrive and regain control over your important files, photos, and documents. Instead of uploading your digital life to third-party servers, you can keep everything at home or on a VPS, with encryption, apps for all your devices, and virtually no storage limits beyond the disk you install.

If you also want to synchronize entire hard drivesshare calendars and contacts, edit documents collaboratively and connect your cloud Along with other services in your home lab, Nextcloud fits like a glove. In this comprehensive guide, you'll see how to set it up with Docker Compose, how to fine-tune performance with MariaDB and Redis, how to integrate it with OnlyOffice or Collabora to work on Office-type documents, and how to avoid common problems like endless synchronizations of hundreds of gigabytes.

What is Nextcloud and why is it worth setting up?

Nextcloud is a private cloud platform Nextcloud is an open-source project that originated in 2016 as a fork of OwnCloud, led by Frank Karlitschek, the creator of the original project. Since then, the community has embraced Nextcloud, and today it is one of the most comprehensive self-hosted storage and collaboration solutions available.

Compared to OwnCloud, Nextcloud has moved much fasterThe development is more active, the community is larger, and the list of included features is considerably more extensive. In addition to typical file storage, it incorporates applications such as Talk for video calls, Deck for managing tasks on Kanban boards, and Notes for quick notes, among many others.

The driving force behind it all is that the platform is 100% open sourceIt's licensed under AGPLv3, which means you can audit, modify, and redistribute its code. You're not at the mercy of a company that might change terms, shut down the service, or analyze your documents to train AI models or sell advertising.

The advantages of Nextcloud compared to Google Drive or Dropbox It runs on your own server: it could be a cheap VPS, a mini PC in your living room, or even a Raspberry Pi 4. The storage limit isn't a subscription plan, but rather the hard drive you connect. You can expand it by changing drives or adding new ones, without paying extra monthly fees.

Sync files with Nextcloud

Advantages over Google Drive, OwnCloud and Seafile

If you compare Nextcloud with Google DriveThe key change lies in privacy and control. With Google, you get a highly polished and collaborative experience, but you relinquish sole control over your data. With Nextcloud, on the other hand, you decide where your data is stored, who has access, what is encrypted, and how backups are performed.

In pure usability, Google still wins.Especially for users who don't want to complicate things, but with Nextcloud you get pretty close to that convenience: you have a desktop client, mobile apps, a very polished web interface and collaborative document editing if you integrate OnlyOffice or Collabora.

Compared to OwnCloud, Nextcloud is the logical choice today. For new setups. The project has received more support from the community, the release schedule is faster, and almost all the guides, apps, and tutorials you'll find focus on Nextcloud. Given the same level of effort, it's worth investing in the more vibrant ecosystem.

If you compare it to SeafileThings change: Seafile usually wins in pure synchronization performance, especially with very large libraries and many small files. Nextcloud, however, is much more comprehensive in terms of features (calendar, contacts, notes, video calls, integrations, etc.). Ultimately, Seafile is ideal if you just want to synchronize files at top speed; Nextcloud, if you want a cloud-based work suite.

Key features of Nextcloud: more than just a shared folder

The first big piece is file synchronizationNextcloud keeps your folders up to date across your server and all your devices: Windows, macOS, Linux distributions, and Android or iOS mobile devices. You can choose which subfolders to sync on each machine (selective sync) to avoid filling up your laptop's hard drive with all your cloud content.

Each change is recorded using a version control system.This allows you to recover previous versions of documents or files that you may have accidentally edited or overwritten. Furthermore, the sharing system is highly granular: public links with passwords, expiration dates, read-only permissions, upload-only access, and more.

Another powerful section is the calendar and contacts feature.Using CalDAV and CardDAV standards, Nextcloud allows you to keep your calendar and address book synchronized across clients like Thunderbird, Apple Calendar, compatible Android apps, and even other servers. It's quite common to set up Nextcloud to replace Google Calendar and Google Contacts on your mobile device.

Collaboration on Office-type documents is resolved integrating OnlyOffice or Collabora Online. OnlyOffice offers better compatibility and formatting with Microsoft Office documents (docx, xlsx, pptx, etc.) and generally runs more smoothly in production environments. Collabora, based on LibreOffice Online, is the alternative if you're looking for something completely free, although its compatibility with complex Office documents isn't always perfect.

To all this we must add the ecosystem of apps that expand the server's functionality: from an integrated PDF viewer to task managers, Kanban board, internal messaging, quick notes, or even integration with external monitoring and automation tools.

When does it make sense to use Nextcloud (and when doesn't)

Nextcloud fits perfectly into several fairly clear profilesFor example, families with many devices who want to have photos, school documents, ID cards, and important papers in one centralized place, accessible from anywhere, but without uploading everything to Google.

It is also ideal for small businesses or teams of 5 to 50 people for those who don't want to pay for Google Workspace or Microsoft 365, or who prefer that their customer data never leaves their infrastructure. You can create users, groups, share folders by department, and set up a kind of intranet for files and collaboration.

If you are a freelancer or developerNextcloud serves as project storage, automatic laptop backup, and a quick sharing point between different machines. You can keep your documentation repository, templates, budgets, and everything you use daily without relying on third parties.

In homelab environments, Nextcloud is almost a classic.It serves as glue between other services, as a storage backend for Home Assistant, as a source and destination for automations in n8n, or as a backup repository for other containers.

However, there are cases where it is not the right tool.If you don't have or want a server or VPS, if you don't feel like keeping it up-to-date with updates, or if you need something that works "without touching anything" from the first minute, sticking with Google Drive or similar services might be the most sensible option.

Hardware, software and minimum technical level requirements

To set up Nextcloud with some performance enjoyment You'll need, as a base, a CPU with at least 2 cores (a modern Celeron, a Ryzen 3, or a Raspberry Pi 4 will do), 2 GB of RAM as a minimum, and 4 GB recommended if you'll have multiple users. For more powerful setups, 8 GB or more is appreciated.

In terms of storage, the reasonable minimum is around 20 GB just for the system and containers, plus you have to add the space where your files will go: from 100 GB for basic personal use to several terabytes if you are going to upload photo libraries, raw videos or backups of other systems.

At the software level, the most convenient thing to do is work on Linux. (Ubuntu, Debian, or similar), with Docker and Docker Compose already installed. You will need SSH access if the server is remote and some familiarity with the terminal to create directories, edit files, and run basic Docker commands.

You don't need to be a system administratorBut it is helpful to understand what a container, a volume, and a port are, and to have a basic understanding of databases to know what you are touching when configuring MariaDB for Nextcloud.

Install Nextcloud with Docker Compose step by step

Deploying with Docker Compose greatly simplifies the installation process.Because it encapsulates Nextcloud, the MariaDB database, and Redis into separate but orchestrated services with a single YAML file. This way, you can start the entire stack with a single command and update it relatively easily.

The first step is to create a working directory On your server, you'll store the docker-compose.yml file, the .env file with the environment variables, and the volumes that each service will use. Inside that folder, you'll write the Compose script, declaring the Nextcloud, database, and Redis services, their ports, volumes, and internal networks.

In the .env file you define passwords and sensitive parametersThis includes the database username and password, the Nextcloud database name, the Redis password, or the JWT keys if you're integrating OnlyOffice. It's crucial that these passwords are long and unique to avoid security issues.

Once the docker-compose.yml file is ready, you start the containers. You can use something like `docker compose up -d`, which will download the necessary images and run them in the background. You can monitor the logs of each service with `docker compose logs -f service_name` to see if there are any errors during startup.

When everything is up and running, you access it from the browser To your server's IP address and the port you've defined (8080 is usually used by default if there's no reverse proxy in front). From another device on the network, you'll use the server's local IP address or, if you already have a domain and proxy, the corresponding HTTPS URL.

Initial configuration: admin user, MariaDB, Redis and domains

The first time you access the web interfaceNextcloud will ask you to create an administrator user: choose a username, a strong password, and proceed to the database connection section.

In the database section, select MariaDB/MySQL Then you enter the username, password, database name, and host that you defined in the .env file and in docker-compose. Normally, the host is not localhost, but the name of the container's service, something like db.

When you finish that screen and click on finish installationNextcloud creates the necessary tables and starts the environment for the first time. From there, you can log in as an admin and start fine-tuning the configuration.

One of the recommended adjustments is to integrate Redis Use Redis as a cache to reduce the load on the database and speed up requests. To do this, edit the Nextcloud config.php file and add the Redis configuration section, specifying the host, port, cache type, and password (if using). Then restart the container for the new configuration to take effect.

Another important point is declaring trusted domains from which you will access. In config.php you have a trusted_domains array where you must add the local IP address, the internal or public domain you use, and even additional addresses if you will be accessing it via multiple routes. Alternatively, some deployments allow you to pass these domains as a NEXTCLOUD_TRUSTD_DOMAINS variable in Compose.

File synchronization: desktop, mobile, and selective folders

Once the server is up and running, it's time to connect your devices.On Windows, macOS or Linux computers, you download the official Nextcloud client from the project website, install it, and on the first boot, you provide the server URL (IP with port or HTTPS domain) and your credentials.

The client will ask you which local folder you want to synchronize. with your cloud and which remote folders you want replicated on that machine. It's a good idea to take advantage of selective synchronization so you don't have to copy all the content if you have a huge server and a laptop with limited storage.

On Android and iOS phones you install the official Nextcloud app From the corresponding store, you also specify the server URL and username/password, and from the settings you can activate the automatic upload of newly taken photos and videos, decide if they are only uploaded via WiFi or also with data, etc.

Thanks to selective synchronization, also on the desktop For example, you can keep your work folder always up-to-date on your laptop, but store large photo collections in the cloud without taking up local space. You can change which folders are included or excluded at any time from the client preferences.

Calendars and contacts with CalDAV and CardDAV

Sync your files with Nextcloud to have a private cloud without Google

Nextcloud includes dedicated apps for calendar and contacts. These features are activated from the applications section of the web interface. Simply go to Apps, find Calendar and Contacts, and click activate to start using them.

In the Calendar app you can create multiple calendars (For example, one personal calendar, one work calendar, and one shared with your partner or team). Each calendar has its own CalDAV URL that you can use to connect to it from external clients.

If you use Thunderbird on your desktopYou can integrate your Nextcloud calendars by creating a new calendar on the network, choosing CalDAV as the format, and entering the CalDAV URL along with your username and password. This way, your appointments will appear in Thunderbird and stay synchronized.

On macOS or iOS, integration is done through Internet Accounts.You can add a CalDAV account or directly select the custom calendar account option, specifying the Nextcloud server, your username, and password. From there, you'll see your Nextcloud calendars in the system's Calendar app.

The process with contacts is very similarActivate the Contacts app, create or import your address book, and obtain the CardDAV URL. In clients like Thunderbird, you can use extensions such as CardBook (or the native integration, depending on the version) for synchronization, and on compatible mobile devices, you can add the CardDAV account to make Nextcloud your contacts backend, replacing Google.

OnlyOffice and Collabora: collaborative editing in the cloud

If you want to get closer to the Google Docs-type experience But on your own cloud, integrating an editing server like OnlyOffice or Collabora is practically essential. They allow you to open text documents, spreadsheets, and presentations directly from your browser and enable multiple people to work simultaneously.

OnlyOffice is generally recommended for production environmentsCompanies and users who need maximum compatibility with Microsoft Office files. Its handling of complex formats, macros, and styles is generally more faithful to Office than that of Collabora.

The typical Docker Compose installation adds an extra service For OnlyOffice, this involves declaring the corresponding image, ports, and a shared JWT secret with Nextcloud to secure communications. This same secret is also defined in your stack's .env file.

Once the OnlyOffice container is up and runningInstall the OnlyOffice app from the Nextcloud Apps section, go into the settings, and specify the document server URL (usually http://onlyoffice:80 if you share a Docker network) and the configured JWT secret. Save the changes, and you can now open documents directly from the web interface.

Collabora Online is the 100% free software alternativeIt's based on LibreOffice Online. The process is similar: you launch its container, install the "Collabora Online" app on Nextcloud, and enter the Collabora server URL in the configuration. It's a good option for personal use or home labs where open source is prioritized over full Office compatibility.

Essential apps and extensions for Nextcloud

One of Nextcloud's biggest strengths is its app storewith hundreds of extensions developed by both the official team and the community. From the web interface itself, you can explore, install, and update these applications with just a couple of clicks.

Notes stands out among the most useful apps.A very simple note-taking editor, compatible with Markdown and synced across all your devices. It's ideal for quick lists, notes, ideas, or small internal documents.

Tasks adds integrated task management It also syncs with CalDAV, so you can view your to-dos from compatible external clients. It supports deadlines, priorities, and separate lists.

Deck turns Nextcloud into a mini Trello Internal, with Kanban boards, cards, labels, and collaborative tasks. Very practical for organizing small projects or coordinating teamwork without relying on external services.

Talk offers chats and video calls directly from your serverwithout needing to use other messaging services. For many small teams, it can cover a large part of their internal communication, integrating with existing users and groups on Nextcloud.

Finally, the PDF viewer and other document viewers They allow you to open large files directly in the browser, without downloading them first. This is especially convenient when working with many invoices, manuals, or long documents.

Security: 2FA, automatic backups, and HTTPS

Assuming Nextcloud is secure is not enoughYou should take a few minutes to configure basic security features. The first of these is two-factor authentication (2FA), available in the security section of your user profile.

Activating 2FA involves scanning a QR code Use an app like Google Authenticator, Authy, or similar, and use the temporary code they generate each time you log in. That way, even if someone steals your password, they won't be able to log in without that second factor.

The second pillar is regular backupsThe usual practice is to create a backup script that briefly stops the containers (or puts Nextcloud into maintenance mode), dumps the MariaDB database, and copies the data directory to another location, disk, or even another server. This script is marked as executable and scheduled in cron to run every night during off-peak hours.

In addition to the database and data, it's also advisable to save the config.php file. and the key files of your Docker deployment, in case at some point you need to set up the stack on another machine and want everything to remain the same, including trusted domains, paths, and custom parameters.

The third security measure is the use of HTTPSIn production, you shouldn't expose Nextcloud over plain HTTP; the standard practice is to place it behind a reverse proxy like Caddy, Traefik, or Nginx Proxy Manager and obtain TLS certificates from Let's Encrypt. This encrypts the traffic between your devices and the server, which is especially important if you're accessing it from outside your local network.

Integration with other services: n8n, Home Assistant and more

Nextcloud shines even brighter when you connect it to other pieces of your homelabOne of the most common integrations is with n8n, a visual automation tool similar to Node-RED.

In n8n you can use the Nextcloud node to download or upload files to and from your cloud within automated workflows: receive emails, process attachments and archive them in specific Nextcloud folders, move files according to their type, etc.

It also works very well with Home Assistant.You can use Nextcloud as external storage for configurations, backups, or data generated by automations (camera captures, logs, etc.), centralizing all the history of your smart home in one place.

Furthermore, it is common to combine Nextcloud with proxies such as Traefik To expose multiple services under the same domain with distinct subdomains, all protected by automatic TLS certificates. This allows you to have cloud.yourdomain.com for Nextcloud, ha.yourdomain.com for Home Assistant, and so on.

Typical problems and how to solve them

When setting up Nextcloud, it's relatively common to encounter errors. such as database connection failures, complaints about untrusted domains, or problems with Redis. The good news is that almost all of them have a quick fix if you know where to look.

If a message like “Database connection failed” appearsThe first thing to check is that the database container is running (using `docker ps`), that the environment variables in the `.env` file match what you entered during installation, and that the host is the service name (`db`) and not `localhost` or an incorrect IP address. Reviewing the MariaDB container logs also helps detect authentication errors.

The classic “trusted domain” error pops up This happens when you access the site from a domain or IP address that is not on the trusted domains list. It can be resolved by adding that IP address or domain to the trusted_domains array in config.php and reloading the page.

If Nextcloud cannot connect to RedisCheck that the Redis container is running, that your host and password (if using AUTH) are correctly defined in config.php, and that there are no errors in the Redis container logs. Sometimes small typos in the password are the culprit.

When file synchronization is desperately slowThis, especially with many small operations, is often a symptom of insufficient caching or poor PHP configuration. Enabling Redis as a cache, adjusting PHP's memory limits, and reviewing your stack parameters usually improves the situation significantly.

In the specific case of OnlyOffice or Collabora, which “don’t work”This is usually due to a mismatch in the JWT key between the document server and the Nextcloud configuration, or because the URL used is not accessible from the Nextcloud container. Checking both sides and reviewing the container logs usually reveals the problem quickly.

Synchronize large hard drives without waiting days: a trick with scp and occ

A very common case is wanting to upload an entire hard drive at once. Upload 100, 200, or more gigabytes to your Nextcloud and keep it synchronized afterward. If you try to do the first upload using only the desktop sync client, even if you're on the same local network, the process can be extremely slow.

The Nextcloud client is not optimized for initial bulk ingestions of hundreds of gigabytes, and in many cases it can take days to complete that first upload. To avoid this bottleneck, there is a much more efficient approach: first copy the data directly to the server via SSH (for example, with scp or rsync) and then tell Nextcloud to index those files.

The idea is to copy the contents of the disk to the corresponding user's data folder on the Nextcloud server. Once the copy is complete, you run the Nextcloud occ command to scan those directories and register them in the database, so they appear on the web as if they had been uploaded from the sync client.

This makes the initial import much faster.This is especially true when the server and source machine are on the same local network with good speed. The problem arises later: when you add synchronization of that folder from the desktop client, it doesn't always recognize that the files already on the local disk are the same as those on the server.

If the client does not detect that both sides are in the same state (same paths, names, sizes, dates, etc.), it will try to "correct" the situation by downloading all the files again from the server to your hard drive, as if it were an initial synchronization from scratch, which is exactly what we want to avoid.

To maximize the chances that the customer will recognize that everything matchesIt's important that the folder structure on the local side is identical to that on the server and that the files haven't been modified between the scp copy and the synchronization setup. Even so, there are cases where the Nextcloud client still fails to match the states and forces a full download.

In those situations, the most reliable strategy usually involves By using rsync directly between the local disk and the server's data path whenever you want to update large changes, using Nextcloud only as an access and sharing interface. It's not as convenient as a fully transparent synchronization, but it avoids massive duplicate transfers when working with collections of hundreds of gigabytes.

If what you're looking for is fully automatic continuous synchronization Without having to resort to manual rsync, assume that the Nextcloud client can be a bottleneck in the initial ingestion of very large data, and consider letting it run once even if it takes a long time, in exchange for making the incremental synchronizations lighter later on.

Ultimately, Nextcloud gives you a private cloud very similar to Google Drive. But with total control in your hands: you can install it on your own server, synchronize files and entire disks, keep calendars and contacts away from Google, edit documents online, expand functions with dozens of apps and connect it with other services in your homelab, all while adjusting performance, security and backups to your liking so that your private cloud is truly yours.


You might be interested in:
How to remove viruses on Android
Follow us on Google News