Installing and using the second disk.

Hi @Emil_K,

Before we can help, the support template is still empty — all fields still say “replace me”. Please fill in at least the Nextcloud version and installation method.

On the volume mapping

Adding a volume in CasaOS maps a host directory into the container, but it does not tell Nextcloud to use that directory for data storage. Nextcloud’s data directory is configured separately in config.php. If Nextcloud was already set up before you added the volume, it was initialized with the old path and still points there regardless of the new mapping.

Two questions to move forward:

  1. Was Nextcloud already installed and used before you added the volume, or did you add it before the first run?

  2. What does datadirectory say in your config.php? You can find it by opening a terminal in the Nextcloud container and running:

grep datadirectory /var/www/html/config/config.php

If Nextcloud was already used and data exists at the old location, simply remapping the volume is not enough — the data needs to be migrated properly. There is a how-to that explains the underlying concepts well: HOWTO: Change / Move data directory after installation. The background section explains why a simple file move is not enough (config.php and database tables both need to be updated), which is useful to understand regardless of the deployment method.

A note on AI advice

Following suggestions from AI assistants (Gemini, ChatGPT, or others) for infrastructure configuration is risky — they often produce plausible-sounding steps that are subtly wrong or incomplete for your specific setup. For anything touching data storage it is worth cross-checking against the official documentation or this forum before applying.


h.t.h.


ernolf