Ready-to-use server

File Server

Simple Network Attached Storage

File Server screenshots

An easy to use file server that combines Windows-compatible network file sharing with a web based file manager. TurnKey File Server includes support for SMB, FTP, SFTP, NFS, WebDAV and rsync file transfer protocols. The server is configured to allow server users to manage files in private or public storage. Based on Samba and WebDAV CGI.

This appliance includes all the standard features in TurnKey Core, and on top of that:

  • SSL support out of the box.

  • Webmin module for configuring Samba.

  • Includes popular compression support (zip, rar, bz2).

  • Includes flip to convert text file endings between UNIX and DOS formats.

  • WebDAV CGI providing WebUI and WebDAV access.

  • File server (Samba) configuration:

    • Pre-configured workgroup: WORKGROUP

    • Pre-configured netbios name: FILESERVER

    • Configured root as administrative samba user.

    • Configured shares:

      • Users home directory.

      • Public storage.

      • CD-ROM configuration with automount and umount hooks (/media/cdrom). (disabled by default).

    • NOTE: Due to the removal of libpam-smbpass (see issue #1188), new Samba users must have their passwords explictly set separately when created. However, if you create a Samba user using smbpasswd, then a new Linux user of the same name, with the same password is automatically created (including home directory). E.g.:

      # smbpasswd -a new_user
      New SMB password:
      Retype new SMB password:
      Added user new_user.
      # ls /home/
      new_user
  • Access your files securely from anywhere via WebDAV CGI:

    • Web GUI access to your files, with online previews of major formats and drag-n-drop support.

    • Pre-configured authentication (Samba).

    • Pre-configured repositories (storage, user home directories).

  • Default shared storage: /srv/storage

  • Accessing file server via samba on the command line:

    smbclient //1.0.0.61/storage -Uroot
    mount -t cifs //1.0.0.61/storage /mnt -o username=root,password=PASSWORD

Credentials (passwords set at first boot)

  • Webmin, SSH, Samba: username root

  • Web based file manager (WebDAV CGI):

    • username root (or Samba users)

Stable version: 19.0 (changelog)

Usage details & Logging in for Administration

No default passwords: For security reasons there are no default passwords. All passwords are set at system initialization time.

Ignore SSL browser warning: browsers don't like self-signed SSL certificates, but this is the only kind that can be generated automatically. If you have a domain configured, then via Confconsole Advanced menu, you can generate free Let's Encypt SSL/TLS certificates.

Web - point your browser at either:

  1. http://12.34.56.789/ - not encrypted so no browser warning
  2. https://12.34.56.789/ - encrypted with self-signed SSL certificate

Note: some appliances auto direct http to https.

Username for Samba & Web based file manager (WebDAV CGI):
Login as username root (or other valid Samba user)

Username for OS system administration:

Login as root except on AWS marketplace which uses username admin.

  1. Point your browser to:
  2. Login with SSH client:
    ssh root@12.34.56.789
    

    Special case for AWS marketplace:

    ssh admin@12.34.56.789
    

* Replace 12.34.56.789 with a valid IP or hostname.

Documentation

Sharing files in a hostile/untrusted environment

Only file sharing protocols that are encrypted should be accessible from a hostile or untrusted environment - e.g. publicly accessible via the internet. As a general rule, it is safest to only make protocols that are explicitly wrapped in an encryption layer available from hostile networks. Currently those protocols are SCP/SFTP, Rsync, SSHFS (all wrapped in an SSH layer) and FTPS (wrapped in SSL/TLS).

Newer versions of SMB/CIFS (explicitly SMBv3) also support encryption, but encryption was historically never a consideration. So it is recommended to either use either a VPN or SSH tunnel to connect specific external sites that need CIFS/SMB access. If you are sure that you want to expose "naked" CIFS/SMB please consult the Samba security information first.

Web UI upload file size

Please see the Fileserver web UI (WebDAV-CGI) upload file size page.

TKLBAM backups

TKLBAM works fine with the TurnKey Fileserver. However please be aware that when storing lots of files and/or large files and/or files that regularly change significantly can cause backup and restore times to become quite significant. It can also cause backup storage costs to "blow out" and become quite costly. So you may prefer to exclude some less important files from your TKLBAM backups and just back them up locally. If you do do that, to make TKLBAM configuration easier, it is recommended to store the files to be excluded from the remote backup in a separate directory to the files to include in the backup. Please see the TKLBAM docs for more details on configuration.

VM vs LXC container

When running a TurnKey Fileserver locally on ProxmoxVE, to provide tighter control and greater separation, it may be preferable to run it within a KVM VM. However many users may prefer to use an LXC guest.

By default there may be some limitations when running in LXC. Many of the filesharing protocols provided by TurnKey Fileserver work fine within an LXC container OOTB, although there are some limitations where further configuration is required. See below for NFS configuration requirements.

For additional/advanced LXC configuration, please see the Proxmox wiki.

NFS in ProxmoxVE LXC container

TurnKey Fileserver includes NFS by default. It's enabled and should "just work" when installed from ISO or using an AMI (AWS). However on LXC, it won't work by default and additional steps are required on the host:

  1. Ensure that the NFS kernel module package - nfs-kernel-server - is installed on the Proxmox host:
    apt update
    apt install nfs-kernel-server
    
  2. Ensure that you use a privileged container. If you have an existing Fileserver container, then either create a new privileged container and transfer your data (e.g. using TKLBAM) or create a Proxmox backup and launch a new LXC server from your backup.
  3. Disable the container's AppAmour confinement by editing the container config (on the host). Where xxx is your container ID, add this line to /etc/pve/lxc/xxx.conf:
    lxc.apparmor.profile: unconfined
  4. Ensure that the NFS ports are open - i.e. in the Turnkey firewall if enabled.

Note you can't mount an NFS share within an LXC container. If you require an NFS inside a container, mount it to a directory on the host, then mount that directory within the guest.

Fileserver (inc MediaServer & TorrentServer)

Also see other Fileserver related notes

Update/increase WebDAV CGI upload file size

The default web UI for (Samba based) file management in TurnKey Fileserver (inc MediaServer & Torrent server) is WebDAV CGI. By default the maximum upload filesize is 1GB. However this can be tweaked easily by updating the WebDAV CGI's config file: /var/www/webdavcgi/webdav.conf

This is what the relevant section of the default config file looks like:

## -- POST_MAX_SIZE
## maximum post size (only POST requests)
## EXAMPLE: $POST_MAX_SIZE = 1_073_741_824; # 1GB
$POST_MAX_SIZE = 1_073_741_824;

As may be obvious, to increase (or decrease) that max file size, update the value of $POST_MAX_SIZE. As may also be obvious, the value is in bytes, with a '_' separator rather than a comma which is often used to make large numbers human readable. For example, to increase the max file size to 2GB, update the relevant line to look like this:

$POST_MAX_SIZE = 2_147_483_648;

To apply the update, restart Apache:

systemctl restart apache2