how to mount host directories inside a proxmox lxc container

Proxmox supports the creation of custom mountpoints inside a lxc container straight from the proxmox container .conf file:

locate your container conf file under /etc/pve/lxc/<ID>.conf and add the following:


thats it!

edit: another way, in the same file, as pointed out in the comments is:

lxc.mount.entry: /bkup bkup none bind,create=dir,optional 0 0

This method works with migrations!

Note: Do not put a ‘/’ before the target

People who use pve-zsync or have problems regarding the backup of the container might want to check out this alternative.


  • morfair Reply

    Migration don’t work with this method.

    • Felix Brucker Reply

      That’s right, the container is bound to that host with that specific mount path.

  • Jared Reply

    They have a new method of doing this now, fyi:

    This works as of 2015-09-13 using lxc-pve: 1.1.3-1 .
    add this to the .conf file in /etc/pve/lxc
    lxc.mount.entry: /bkup bkup none bind,create=dir,optional 0 0
    Note: Do not put a ‘/’ before the target

    • Felix Brucker Reply

      thanks 🙂

      I prefer the original one above because of the easier syntax, though.

  • J_Ordieres Reply

    Excellent solution.

    It does work perfect for me
    Thank you !

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.