Last updated: March 15, 2026

Nextcloud’s external storage app lets you mount S3 buckets, WebDAV servers, FTP sites, and local directories directly into your Nextcloud file browser, creating a unified interface for all your data regardless of where it physically lives. Enable the External Storage support app in the admin interface, then create mount points by specifying storage type, credentials, and mount path. This guide covers configuration for all major backends with practical examples for developers managing multiple storage sources.

WebDAV URL format https://remote-server.com/remote.php/dav/files/username/


3.
- Provide credentials or use: an app password 4.
- S3 authentication failures - Confirm credentials are correct and the IAM user has s3:GetObject and s3:PutObject permissions for the specific bucket.
- Configure the hostname for: MinIO or other S3-compatible services: ```bash # MinIO configuration example Hostname - minio.example.com Port - 9000 ``` 4.
- Configure the remote subfolder: if needed WebDAV mounts support both basic authentication and OAuth2, depending on your server configuration.
- What are the most: common mistakes to avoid? The most frequent issues are skipping prerequisite steps, using outdated package versions, and not reading error messages carefully.

Prerequisites

Before configuring external storage, ensure you have:

- A working Nextcloud installation (version 27 or later recommended)
- The External Storage support app enabled in your Nextcloud admin settings
- Appropriate credentials or access keys for your chosen storage backend
- Sufficient permissions to create mount points in Nextcloud

To verify the external storage app is enabled, navigate to Apps > Your apps in the Nextcloud admin interface and confirm "External storage support" is active.

Step 1 - Adding External Storage via the Web Interface

The simplest method uses Nextcloud's web interface. Log in as an administrator and navigate to Settings > Administration > External storage.

Adding Local Storage

For mounting directories outside the default Nextcloud data folder:

1. In the External storage section, select Local from the storage dropdown
2. Enter a mount point name (e.g., `/media/backup-drive`)
3. Configure permissions. the web server user needs read/write access:

```bash
Ensure Nextcloud can access the directory
sudo chown -R www-data:www-data /mnt/shared-data
sudo chmod 755 /mnt/shared-data
  1. Set the folder name that will appear in Nextcloud
  2. Click the checkmark to save

The mounted directory now appears in Nextcloud’s file browser alongside your main storage.

Configuring S3-Compatible Storage

For AWS S3, MinIO, Backblaze B2, or other S3-compatible providers:

  1. Select Amazon S3 from the storage dropdown
  2. Enter your credentials:
    • Bucket name
    • Access key ID
    • Secret access key
    • Region (or leave blank for MinIO)
  3. Configure the hostname for MinIO or other S3-compatible services:
MinIO configuration example
Hostname - minio.example.com
Port - 9000
  1. Enable “SSL” for production deployments
  2. Save the configuration

The S3 bucket mounts as a folder in Nextcloud, with files stored remotely but accessible through the web interface. Files are not automatically downloaded. Nextcloud accesses them on-demand unless you enable caching.

WebDAV Mounts

For connecting to ownCloud, Nextcloud instances, or WebDAV-enabled servers:

  1. Select WebDAV from the storage dropdown
  2. Enter the WebDAV URL:
WebDAV URL format
https://remote-server.com/remote.php/dav/files/username/
  1. Provide credentials or use an app password
  2. Configure the remote subfolder if needed

WebDAV mounts support both basic authentication and OAuth2, depending on your server configuration.

Step 2 - Command-Line Configuration

For automated deployments or scripted setups, use the Nextcloud occ command:

List current external storage mounts
occ files_external:list

Create a S3 mount
occ files_external:amazon-s3 \
 --bucket=my-bucket \
 --hostname=s3.amazonaws.com \
 --region=us-east-1 \
 --access-key=AKIAIOSFODNN7EXAMPLE \
 --secret-key=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY \
 --mount-point=s3-archive \
 --user=admin

Create a local mount
occ files_external:local \
 --path=/mnt/external-drive \
 --mount-point=archive \
 --user=admin

The occ files_external:applicable command controls which users or groups can access specific mounts.

Step 3 - Implement Programmatic Access with the WebDAV API

Once external storage is mounted, access files programmatically using Nextcloud’s WebDAV endpoint:

import requests
from requests.auth import HTTPBasicAuth

base_url = "https://cloud.example.com/remote.php/dav/files/admin/"
auth = HTTPBasicAuth("admin", "your-app-password")

List files in external storage mount
response = requests.request(
 "PROPFIND",
 base_url + "s3-archive/",
 auth=auth,
 headers={"Depth": "1"}
)

print(response.text)

Upload a file
with open("backup.tar.gz", "rb") as f:
 response = requests.put(
 base_url + "s3-archive/backup.tar.gz",
 auth=auth,
 data=f,
 headers={"Content-Type": "application/gzip"}
 )

This approach works with any external storage backend. Nextcloud handles the translation between its WebDAV interface and the underlying storage type.

Performance Considerations

External storage introduces latency compared to local Nextcloud storage. Optimize performance with these strategies:

Enable caching in your mount configuration to store frequently accessed files locally:

Via occ command
occ files_external:option 1 enable_cache true

Configure preload for directories with predictable access patterns:

occ files_external:option 1 preallocate 100

Use the filesystem scanner sparingly. for large S3 buckets, consider using S3-native tools for bulk operations and only mount specific prefixes in Nextcloud.

Security Best Practices

When configuring external storage, follow these security practices:

Troubleshooting Common Issues

Permission denied errors - Verify the web server user has filesystem access to local mounts. Check SELinux or AppArmor policies on Linux systems.

S3 authentication failures - Confirm credentials are correct and the IAM user has s3:GetObject and s3:PutObject permissions for the specific bucket.

Slow performance - Enable caching, check network latency to the storage backend, and consider mounting only necessary subdirectories rather than entire buckets.

Mount not appearing - Clear the Nextcloud cache and verify the mount configuration is saved:

occ files_external:verify 1
occ maintenance:repair

Step 4 - Use Cases for Developers

External storage excels in several developer-focused scenarios:

Frequently Asked Questions

How long does it take to guide?

For a straightforward setup, expect 30 minutes to 2 hours depending on your familiarity with the tools involved. Complex configurations with custom requirements may take longer. Having your credentials and environment ready before starting saves significant time.

What are the most common mistakes to avoid?

The most frequent issues are skipping prerequisite steps, using outdated package versions, and not reading error messages carefully. Follow the steps in order, verify each one works before moving on, and check the official documentation if something behaves unexpectedly.

Do I need prior experience to follow this guide?

Basic familiarity with the relevant tools and command line is helpful but not strictly required. Each step is explained with context. If you get stuck, the official documentation for each tool covers fundamentals that may fill in knowledge gaps.

Is this approach secure enough for production?

The patterns shown here follow standard practices, but production deployments need additional hardening. Add rate limiting, input validation, proper secret management, and monitoring before going live. Consider a security review if your application handles sensitive user data.

Where can I get help if I run into issues?

Start with the official documentation for each tool mentioned. Stack Overflow and GitHub Issues are good next steps for specific error messages. Community forums and Discord servers for the relevant tools often have active members who can help with setup problems.

Related Articles