This guide explains how to setup a remote distribution point using FreeNAS as the SMB server and storage location for your images.

FreeNAS SMB Share

This example uses a ZFS volume named storage and a dataset named cd_images.  Make any changes to match your environment.

  1. Select Account -> Groups -> Add Group from the left navigation menu
  2. Enter cdsharewriters for the group name and click ok
  3. Select Account -> Users -> Add User from the left menu
  4. Enter cd_share_rw for the username
  5. Deselect Create a new primary group
  6. Change the primary group to cdsharewriters
  7. Fill in a full name and passwordRemember the password, you will need it later
  8. Create another user called cd_share_ro this time leave the default primary group settings as is – Remember the password, you will need it later
  9. Create a new ZFS Dataset named cd_images on the storage volume.  I would disable compression and dedup but I’ll leave that up to you, Also ensure it has enough space to hold your images.
  10. Open the FreeNAS Shell from the left navigation menu
    cd /mnt/storage/cd_images
    mkdir images
    mkdir resources
    exit
  11. Select Storage from the top menu and select the cd_images dataset
  12. Select Change Permissions
  13. Change Owner (group): to cdsharewriters
  14. Check all mode checkboxes except Other Write
  15. Check Set permission recursively
  16. Click Change
  17. Select Sharing from the left menu and select Windows Shares -> Add Windows Share
  18. Enter cd_share for the name
  19. For the path enter
    /mnt/storage/cd_images
  20. Click Advanced Mode and paste the following in Auxiliary Parameters

    valid users = @cdsharewriters, cd_share_ro
    create mask = 02775
    directory mask = 02775
    guest ok = no
    writable = yes
    browsable = yes
    read list = @cdsharewriters, cd_share_ro
    write list = @cdsharewriters
    force create mode = 02775
    force directory mode = 02775
    force group = +cdsharewriters
    
  21. Click Ok

That’s all for the FreeNAS side, to setup CloneDeploy to use the share, follow the guide for changing the image storage location.

in Additional Help