Rancher and Rancher-NFS simple how to

Rancher is an awesome container management platform and they offer a great ‘quick start guide‘, if you really want to get up and running quickly. Unfortunately I found the persistent storage section a bit limited and I had some troubles figuring out how I could use my Synology NAS as a shared storage for my containers. In my setup I use Cattle, which is the default environment.

Prepare your NAS
The first thing I encountered is that the latest version of Rancher-NFS v0.6.5 only supports NFS version 4, so make sure that your NFS server is configured to support NFS version 4 on my Synology NAS this was easily done by just checking the checkbox ‘Enabled NFSv4 support’. I won’t go in to deeper details about configuring the NFS server and assume this is already available in your environment and that a share is created for use with Rancher.

Prepare Rancher

    1. Install the Rancher-NFS service
      Go to Catalog -> Library and select the Rancher-NFS service.
    2. Fill in the IP address, hostname or FQDN of your NAS service and the path to the share.
    3. Create a volume, this can be done manually in

      Infrastructure -> Storage -> Add Volume.

      Another option is create the volume while creating a new service. Go to

      Stacks -> Add Service.

      At the end of the page there is a tab ‘Volumes’, first type the Volumename, this will be a new folder within the share on the NFS server. Then type : and the mountpoint within the container. In this example I mounted ‘/root’. At the driver type ‘rancher-nfs’.

      Volumes – ‘volumetest:/root’
      Volume Driver – ‘rancher-nfs’

    4. That’s it, the volume will be created.


Volumes will not automatically deleted when the service is deleted, they will show up as detached instead, to check this, go to;

Infrastructure -> Storage

As you can see, once figured out it is quite simple 🙂

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

2 Replies to “Rancher and Rancher-NFS simple how to”

  1. Hi,

    Did you happened to setup a shared volume across multiple host?

    I have two (2) hosts, host1 is where my [1] dockerized nfs-server is setup.

    Applications on host1 spins up successfully when adding volumes with “rancher-nfs” as its volume driver with no errors.

    My current problem is for applications from host2, it’s stuck in “In progress” state.

    [2] Screenshot of the logs on nfs-driver on host2.

    [1] https://hub.docker.com/r/itsthenetwork/nfs-server-alpine/
    [2] https://prntscr.com/hxh9lf

Leave a Reply

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