Software & AppsOperating SystemLinux

How To Add a Network Drive to Plex on Ubuntu

Ubuntu 1

In this tutorial, we will guide you step-by-step on how to add a network drive to Plex on Ubuntu. This process can be particularly useful if you want to store your media files on a network-attached storage (NAS) device or a shared folder on another computer, and stream them via Plex.

Quick Answer

To add a network drive to Plex on Ubuntu, you need to create a mount point, install CIFS Utilities, edit the fstab file, mount the network drive, test the configuration, and finally add the network drive to Plex through the web UI.


Before we begin, ensure you have the following:

  • Ubuntu system with Plex Media Server installed.
  • A network drive or a shared folder you want to add to Plex.
  • Terminal access and root privileges on your Ubuntu system.

Step 1: Creating a Mount Point

First, decide where you want the mounted files from the network drive to appear in your filesystem. For this tutorial, let’s choose /media/Plex.

Open a terminal and run the following command to create the directory:

sudo mkdir /media/Plex

This command uses the sudo prefix to run the command with root privileges. mkdir is the command to create a directory, and /media/Plex is the location where the directory is created.

Step 2: Installing CIFS Utilities

CIFS Utilities are necessary to mount network drives on Ubuntu. Install them by running the following command:

sudo apt-get install cifs-utils

The apt-get install cifs-utils command installs the CIFS utilities on your Ubuntu system.

Step 3: Editing the fstab File

The /etc/fstab file in Ubuntu tells the system what drives to mount and where.

Open the file for editing by running:

sudo gedit /etc/fstab

This command opens the /etc/fstab file in the text editor.

Step 4: Mounting the Network Drive

At the end of the /etc/fstab file, add a new line to mount the network drive. For example, if the IP address of your network drive is and the shared folder is named “Plex”, add the following line:

// /media/Plex cifs guest 0 0

If your network drive requires a username and password, use the following line instead:

// /media/Plex cifs username={{username}},password={{password}},iocharset=utf8,sec=ntlm 0 0

Replace {{username}} and {{password}} with your actual credentials.

Save the changes and exit the text editor.

Step 5: Testing the Configuration

To test the configuration, run the following command:

sudo mount -a

This command mounts all filesystems mentioned in /etc/fstab.

Open the file manager (Nautilus) and check if the network drive’s Plex folder is now visible in the left-hand sidebar under /media/Plex.

Step 6: Adding the Network Drive to Plex

Open the Plex Media Server web UI and click the “+” sign in the My Library section to add a new section. Select the type of media (e.g., Movies or TV shows) and choose the corresponding folder from the /media/Plex directory (which is the mounted network drive).


If you encounter permission issues and cannot write to the mounted network drive, try adding the uid and gid options to the /etc/fstab line. You can find the UID and GID for your user by running the command: sudo id user_name. Then, modify the /etc/fstab line to include the UID and GID, like this:

// /media/Plex cifs defaults,uid=1000,gid=1000 0 0

Replace user_name with your actual username.


You have now successfully added a network drive to Plex on Ubuntu. This process allows you to store and stream your media files from a network drive or a shared folder, providing a centralized and accessible location for all your media content. If you encounter any issues, refer to the Plex Media Server support forums for additional help.

What is Plex?

Plex is a media server that allows you to organize, stream, and access your media files from various devices. It can be installed on a computer or NAS device and provides a user-friendly interface for managing your media library.

Can I add multiple network drives to Plex?

Yes, you can add multiple network drives to Plex. Simply follow the steps outlined in this tutorial for each network drive you want to add. Make sure to choose a unique mount point for each drive to avoid conflicts.

Can I add a network drive from a different operating system?

Yes, you can add a network drive from a different operating system as long as it supports the CIFS/SMB protocol. The steps to mount the drive may vary slightly depending on the operating system, but the general concept remains the same.

Can I access Plex remotely after adding a network drive?

Yes, you can access Plex remotely after adding a network drive. As long as your Plex Media Server is accessible from outside your local network (e.g., through port forwarding or VPN), you can stream your media files from the network drive using the Plex app or web interface.

Can I remove a network drive from Plex?

Yes, you can remove a network drive from Plex. To do this, you need to unmount the network drive and remove the corresponding entry from the /etc/fstab file. Additionally, you may need to remove the library section associated with the network drive from the Plex Media Server web UI.

What should I do if I can’t see the network drive in Plex?

If you can’t see the network drive in Plex, make sure that the drive is properly mounted and accessible on your Ubuntu system. Double-check the /etc/fstab file for any errors in the mount configuration. If the network drive is mounted correctly but still not visible in Plex, try refreshing the Plex library or restarting the Plex Media Server.

How can I update the media files on the network drive in Plex?

Plex automatically scans for changes in your media library and updates the library accordingly. If you add, remove, or modify media files on the network drive, Plex will detect these changes during its regular library scans. However, you can also manually update the library by clicking the "Update Library" button in the Plex Media Server web UI.

Can I use a network drive without mounting it in Ubuntu?

No, you need to mount the network drive in Ubuntu to access its contents in Plex. Mounting the drive establishes a connection between the Ubuntu system and the network drive, allowing Plex to read and stream the media files.

Leave a Comment

Your email address will not be published. Required fields are marked *