JustToThePoint English Website Version
JustToThePoint en español
Colaborate with us

How to setup Turnkey Linux Fileserver on Proxmox VE.

Logic will get you from A to B. Imagination will take you everywhere, Albert Einstein

Topology and Limits

Turnkey Linux is an open source project developing a free virtual appliance library that features the very best server-oriented open source software. TurnKey File Server is a relatively easy to use file server that combines Windows-compatible network file sharing with a web based file manager.

Download template, create the LXC Container, first configuration

  1. Download the template. In Proxmox’s web interface, click on your local storage LVM (Logical Volume Manager, your Proxmox storage management system that allows you to create, resize, and manage logical volumes on your physical storage devices, e.g., local(myserver)), go to CT Templates, click on Templates, select debian-12-turnkey-fileserver···.tar.gz, and download it.

  2. Create the LXC Container. Go to your Proxmox node (e.g., Node myserver), and click create CT button:

    • Node (e.g., myserver), give it a container ID (e.g., 100), hostname (e.g., filemanager), and most importantly a root password. This is the Linux root user’s password inside the container.
    • Template: Storage (local or any storage you prefer), template (select the previously downloaded template, ebian-12-turnkey-fileserver···.tar.gz).
    • Disks. Apart from rootfs (Root Disk, 8GB), if you want extra storage, add a second disk (mp0): Storage: mypool; Path: /mnt/mydata; Disk size (100 GB).
    • CPU: Keep default (1–2 vCPUs, 512 MB RAM) or increase if needed.
    • Network: Set a static IP address, IPv4: 192.168.1.15/24; Gateway: 192.168.1.1.
    • Leave the rest default, check Start after created, and click Finish.
  3. Turnkey Linux Fileserver. First Configuration. In your Proxmox web interface, select your new LXC container under your Node (e.g., myserver, CT 100), Console, click Start now(if you did not click on Start after created), and provide the credentials that you specify earlier. You will be prompted for a new password for the Samba Root Account. This is different from the Linux’s root account for your container! You could skip any additional optional configurations except be sure to click Install to install all security updates.

Webmin System Administration UI

  1. Access webmin. Open your favorite browser and point your browser to: [HTTPS:] + dirIP (your container’s static IP address) + “:” + [12321], so you get access to your Webmin System Administration UI.

  2. Login. Go to Webmin and ignore SSL browser warning (Advanced…, Accept the Risk and continue): browsers don’t like self-signed SSL certificates, but this is the only kind that can be generated automatically. Type in the root and password that you created earlier. This the is Linux root account in your container (not the Samba root account).

  3. Create a New Linux User. Under System, select Users and Groups, click Create a New User (e.g., nmaximo7), fill in your desired username and password, leave every else as default, and press Create.

  4. Create a New Group. Still under User and Groups, click on the Local Groups tab, click Create a New Group. Write a Group Name (e.g., family), select its Members (add the newly created user(s), e.g., nmaximo7), and hit Create. Groups make it easy to manage permissions of files and directories because you do so in the group level.

  5. Change Ownership and Permissions of Your Shared Directory. Go to Tools, File Manager in Webmin. Navigate go to your second disk or previous Samba share that you created when you were creating the container (e.g., /mnt/mydata), click on Tools, Change ownership, so we change the ownership of our share to our user (e.g., nmaximo7), group (e.g., family), and typically recursive (so subfolders and files also change), press Change for these changes to make effect. Besides, Tools, Change permissions, and you will typically want 775: Owner (7 -nmaximo7- Read, Write, Execute), Group (7 -family- Read, Write, Execute), Others (5, Read, NO Write, Execute)-

  6. Confirm Samba Users. In Servers, Samba Windows File Sharing Select all the predefined Samba shares (homes, cdrom, storage), and press on Deleted Selected Shares. Then, select Convert Users to synchronize the Linux user and Samba users. In Unix user to covert, select Only linux users or UID ranges:YOUR-USER (e.g., nmaximo7), then Use this pasword. type in your password, click on Convert Users. This Linux user is now a Sambar user, too. Selecting Samba Users you should see these new linux users as Samba users, too. image info

  7. Remaining in Servers, Samba Windows File Sharing, let’s create a new share by click on Create a new file share: Share name (e.g., homedata, the name that it appears to the end-user for the share), Directory to share (the resource’s path that you want to share, e.g., /mnt/mydata), Create with owner (e.g., nmaximo7) and permission (755). Click on the share to select, press on Security and Access Control and make sure that Writable is enable (yes) (we want to be able to read and write in the Share), then Save, Return to share list, Restart Samba Server to force the current configuration to be applied.

Access your Samba share from your NixOS system

  1. //192.168.1.15/homedata is the UNC path to your Samba share.
  2. ~/fileserver is the local mount point.
  3. -o username=YOUR-SAMBA-USER,password=YOUR-SAMBA-PASSWORD are your SAMBA user credentials.
  4. vers=3.0 specifies the SMB protocol version.

Alternatively, sudo mount.cifs //192.168.1.15/homedata ~/fileserver -o username=YOUR-SAMBA-USER,password=YOUR-SAMBA-PASSWORD,vers=3.0,uid=$(id -u),gid=$(id -g)

//192.168.1.15/homedata /home/YOUR-SAMBA-USER/fileserver cifs username=YOUR-SAMBA-USER,password=YOUR-SAMBA-PASSWORD,vers=3.0,uid=$(id -u),gid=$(id -g) 0 0

mount -a # Test the mount

In NixOS, add the following configuration to your configuration.nix file:

  fileSystems."/home/YOUR-SAMBA-USER/fileserver" = {
    device = "//192.168.1.15/homedata";
    fsType = "cifs";
    options = [
      "username=YOUR-SAMBA-USER"
      "password=YOUR-SAMBA-PASSWORD"
      "vers=3.0"
      "uid=1000"
      "gid=1000"
      "rw"  # Ensure read-write access
    ];
  };

Troubleshooting

 sudo mount.cifs //192.168.1.15/homedata /mnt/fileserver -o username=nmaximo7,password=MyPASSWORD,vers=3.0
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
  1. Ensure that the Samba user (nmaximo7) exists and has the correct password.In the Turnkey Linux Fileserver container, check the Samba users: pdbedit -L (it will list all Samba users).

  2. Add the user to the Samba database:smbpasswd -a nmaximo7. Besides, run smbpasswd -e nmaximo7 to make sure the user is enabled in the local smbpasswd file.

    For some reason I cannot explain, this was not done by the Turnkey Linux Fileserver!!! Make sure to add the user to the Samba database by running: smbpasswd -a nmaximo7.

  3. Verify Share Permissions. In the Webmin UI, go to Servers, Samba Windows File Sharing. Select the share (homedata) and click Security and Access Control. Ensure that: Writable is set to Yes, Valid Users includes nmaximo7, and Valid Groups includes the group family.

  4. In the Turnkey Linux Fileserver container:

# Ensure that the directory being shared (/mnt/mydata) has the correct ownership and permissions:
chown -R nmaximo7:family /mnt/mydata

root@filemanager /mnt# ls -la
drwxr-xr-x  2 nmaximo7 family  2 Jan 15 01:16 mydata
root@filemanager /mnt# ^C
# 755, Owner nmaximo7, Group: family

nano /etc/samba/smb.conf
[homedata]
   path = /mnt/mydata
   read only = no
   writeable = yes
   valid users = nmaximo7
   create mask = 0775
   directory mask = 0775

# Restart the Samba service to apply changes
systemctl restart smbd

apt update && apt install smbclient

# Test access to the share
smbclient //localhost/homedata -U nmaximo7
Bitcoin donation

JustToThePoint Copyright © 2011 - 2025 Anawim. ALL RIGHTS RESERVED. Bilingual e-books, articles, and videos to help your child and your entire family succeed, develop a healthy lifestyle, and have a lot of fun. Social Issues, Join us.

This website uses cookies to improve your navigation experience.
By continuing, you are consenting to our use of cookies, in accordance with our Cookies Policy and Website Terms and Conditions of use.