# How to manage external media and storage for Nextcloud snap

**URL:** <https://help.nextcloud.com/t/how-to-manage-external-media-and-storage-for-nextcloud-snap/216039>\
**Category:** 📑 How to\
**Tags:** snap, external\_storage\
**Created:** [January 27, 2025, 9:35am UTC](https://help.nextcloud.com/t/how-to-manage-external-media-and-storage-for-nextcloud-snap/216039 "2025-01-27T09:35:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![scubamuc](https://help.nextcloud.com/user_avatar/help.nextcloud.com/scubamuc/32/63165_2.png) [@scubamuc](https://help.nextcloud.com/u/scubamuc)\
**Post date:** [January 27, 2025, 9:35am UTC](https://help.nextcloud.com/t/how-to-manage-external-media-and-storage-for-nextcloud-snap/216039/1 "2025-01-27T09:35:59Z")

</div>

[**Managing external media and storage**](https://github.com/nextcloud-snap/nextcloud-snap/wiki/Managing-external-media,-shares-and-storage)

[Snap confinement](https://snapcraft.io/docs/snap-confinement) is a **security feature** and determines the amount of access an application has to system resources, such as files, the network, peripherals and services. Thus your Nextcloud snap is securely confined from the host system. Unless you specifically allow the Nextcloud snap to access the `/media` or `/mnt` directories on the **host** system, you will not be able to access any other directory outside of the confinement.

## External media, network shares and storage

External media can be any device (e.g. external disk partition, SAMBA network, NFS network, SSHFS network etc.). The device should be available at system boot and mounted in `/etc/fstab` on host.

## What permissions should external media have?

See [FAQ’s](https://github.com/nextcloud-snap/nextcloud-snap/wiki/FAQ's) and [Snap confinement](https://snapcraft.io/docs/snap-confinement)

[**Removable media**](https://github.com/nextcloud-snap/nextcloud-snap/wiki/Configure-Nextcloud-snap#removable-media) or [**external storage**](https://github.com/nextcloud-snap/nextcloud-snap/wiki/Configure-Nextcloud-snap#removable-media) **must** be mounted to either `/media` or `/mnt` as **root** with **root** permissions and **connected** to Snap!

The interface providing the ability to access removable media is not automatically connected upon install, so if you’d like to use external storage (or otherwise use a device in `/media` or `/mnt` for data), you need to give the snap permission to access removable media by connecting that interface:

```bash
sudo snap connect nextcloud:removable-media

```

* * *

## How can I connect local or external media?

See [Connect external media](https://github.com/nextcloud-snap/nextcloud-snap/wiki/Configure-Nextcloud-snap#removable-media)

```bash
sudo snap connect nextcloud:removable-media

```

* * *

## How can I connect a USB media device?

See [Connect USB device](https://github.com/nextcloud-snap/nextcloud-snap/wiki/Configure-Nextcloud-snap#removable-media)

```bash
sudo snap connect nextcloud:removable-media

```

### Mount directory

> **Tip** : Ensure USB-boot is disabled in BIOS or use the `--nofail` option in `/etc/fstab` for headless boot, especially when connecting an external USB-device.
> 
> **Tip** : Its **not** recommended to use the “automount” directory `/media/$USER/`. Prefer creating a dedicated directory `/media/nextcloud/` or `/mnt/nextcloud/` and mounting the dedicated directory in `/etc/fstab`.

## Data directory

- [Change data directory](https://github.com/nextcloud-snap/nextcloud-snap/wiki/Configure-Nextcloud-snap#removable-media)
- [Change data directory, procedure to move or define data directory](https://github.com/nextcloud-snap/nextcloud-snap/wiki/Wiki-Change-data-directory#change-nextcloud-snap-data-directory)
- [Default path](https://github.com/nextcloud-snap/nextcloud-snap/wiki/Default-path#where-is-my-stuff)

## Network and local shares

- [How to add samba shares and local shares to Nextcloud snap](https://help.nextcloud.com/t/how-to-add-samba-shares-and-local-shares-to-nextcloud-snap/216040/)

## [**Permissions and snap confinement**](https://github.com/nextcloud-snap/nextcloud-snap/wiki/Default-path#permissions-and-confinement)

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [February 1, 2025, 8:47am UTC](https://help.nextcloud.com/t/how-to-manage-external-media-and-storage-for-nextcloud-snap/216039/2 "2025-02-01T08:47:49Z")

</div>


