# External Storage auf Nextcloud

[Add external storage failed at "action needs authentication failed - wrong password" - ℹ️ Support - Nextcloud community](https://help.nextcloud.com/t/add-external-storage-failed-at-action-needs-authentication-failed-wrong-password/213089/6)

[\[Bug\]: Can't save global credentials in external storage · Issue #49829 · nextcloud/server](https://github.com/nextcloud/server/issues/49829)

[Using the occ command — Nextcloud latest Administration Manual latest documentation](https://docs.nextcloud.com/server/latest/admin_manual/occ_command.html#files-external-label)

## Files external

These commands are used for managing Nextcloud’s *External Storage* feature. In addition to replicating the configuration capabilities in the Web UI, additional capabilities include exporting / importing configurations, scanning *External Storage* mounts that require login credentials, and configuring update notifications (if supported by the storage type).

Note

These commands are only available when the “External storage support” app (`<span class="pre">files_external</span>`) is enabled.

Available commands for the “files\_external” namespace:

```
files_external:applicable  Manage applicable users and groups for a mount
files_external:backends    Show available authentication and storage backends
files_external:config      Manage backend configuration for a mount
files_external:create      Create a new mount configuration
files_external:delete      Delete an external mount
files_external:export      Export mount configurations
files_external:import      Import mount configurations
files_external:list        List configured admin or personal mounts
files_external:notify      Listen for active update notifications for a configured external mount
files_external:option      Manage mount options for a mount
files_external:scan        Scan an external storage for changed files
files_external:verify      Verify mount configuration
```

<div class="highlight-default notranslate" id="bkmrk-"><div class="highlight"><button class="copybtn o-tooltip--left" data-clipboard-target="#codecell80" data-tooltip="Copy"><svg class="icon icon-tabler icon-tabler-copy" fill="none" height="44" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" viewbox="0 0 24 24" width="44" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0z" fill="none" stroke="none"></path><rect height="12" rx="2" width="12" x="8" y="8"></rect><path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"></path></svg></button></div></div>`<span class="pre">files_external:scan</span>` provides the ability to provide a username and/or password for cases where login credentials are used.

Use `<span class="pre">files_external:export</span>` to export all admin mounts to stdout, and `<span class="pre">files_external:export</span> <span class="pre">[user_id]</span>` to export the mounts of the specified Nextcloud user.

Use `<span class="pre">files_external:import</span> <span class="pre">[filename]</span>` to import legacy JSON configurations, and to copy external mount configurations to another Nextcloud server.

## Beispiel

Hello ![:slight_smile:](https://help.nextcloud.com/images/emoji/twitter/slight_smile.png?v=12 ":slight_smile:") I Could solve my Issue using this solution (Thanks to jtr) :

Connect to your VM (Shell Linux) hosting your NextCloud. Use SU.  
Go to the Folder hosting NextCloud with the occ file. (This step should look evidence for everyone , but I am Noob hahaha, I give advices for Noob ![:stuck_out_tongue:](https://help.nextcloud.com/images/emoji/twitter/stuck_out_tongue.png?v=12 ":stuck_out_tongue:") )

And write this :

Here , you can do this :  
sudo -u www-data php occ files\_external:list

You can see the bad External Drives and delete it with :  
sudo -u www-data php occ files\_external:delete X

Then , you can re-create good ones by using this command :  
sudo -u www-data php occ files\_external:create Blabla ‘sfpt’ password::password -c host=X.X.X.X -c share=/X/ -c root=/X/ -c domain=workgroup -c user=X -c password=X

Replace : X with Yours ![:wink:](https://help.nextcloud.com/images/emoji/twitter/wink.png?v=12 ":wink:")

Have a nice day ![:slight_smile:](https://help.nextcloud.com/images/emoji/twitter/slight_smile.png?v=12 ":slight_smile:")