Skip to main content
This page describes the technical setup of the Local Folder data source. For a general description of source types, see Knowledge Bases.

How Does the Path Work?

Internally, VARIOS AI uses the base directory /data/Data/KnowledgebaseDocuments inside the container. The share folder you specify in the UI is a relative subfolder within this base directory. The actual path is composed as follows:
/data/Data/KnowledgebaseDocuments + <Share Folder>
Example: If you enter /legal-texts as the share folder, the application looks inside the container at:
/data/Data/KnowledgebaseDocuments/legal-texts
Hidden files (starting with . or ~) and symlinks are automatically skipped. The path .. (relative paths upward) is not allowed for security reasons.

Docker Compose Configuration

For the container to access your local files, a volume must be configured in the docker-compose.yml. In the on-premise configuration, the default setup looks like this:
services:
  php:
    volumes:
      # ... other volumes ...
      - "./KnowledgebaseDocuments:/data/Data/KnowledgebaseDocuments"
This means: The folder ./KnowledgebaseDocuments on the host (relative to the docker-compose.yml directory) is mounted inside the container at /data/Data/KnowledgebaseDocuments.
1

Create the folder on the host

Create the folder that will be mounted as a volume and add subfolders as needed.
mkdir -p ./KnowledgebaseDocuments/legal-texts
2

Place documents

Copy or move the desired documents into the folder.
cp /path/to/document.pdf ./KnowledgebaseDocuments/legal-texts/
3

Configure the share folder in the UI

In the source configuration, enter the subfolder as the share folder, e.g. /legal-texts. Click Test connection to verify that the folder is reachable.
4

Set up synchronization

Choose an interval (Manual, every hour, every day, etc.) or click Sync now to read the documents immediately.
Check permissions: The process inside the container must have read access to the mounted files. Pay attention to file permissions (especially on Linux systems).

Mount Custom Folders as Volumes

You can also mount a different host path as a volume, e.g. a network share or any directory on the server:
services:
  php:
    volumes:
      # ... other volumes ...
      - "./KnowledgebaseDocuments:/data/Data/KnowledgebaseDocuments"
      # Mount a custom directory additionally:
      - "/srv/company-documents:/data/Data/KnowledgebaseDocuments/company-documents:ro"
In this example, /srv/company-documents on the host is made available inside the container at /data/Data/KnowledgebaseDocuments/company-documents (read-only :ro). In the UI, enter /company-documents as the share folder.
If the source is read-only, it is recommended to mount the volume as read-only (:ro). This prevents accidental modifications by the container.

Mount Network Shares (SMB / NFS)

Documents often need to be read from a network drive (e.g. Windows share or NAS). To do this, mount the network share on the host first, then bind it into the container via a volume.
1. Install package
sudo apt update && sudo apt install -y cifs-utils
2. Create mount point
sudo mkdir -p /mnt/smb-documents
3. Create credentials file (recommended so that passwords are not stored in /etc/fstab)
sudo nano /etc/smbcredentials
Contents:
username=my-user
password=my-password
domain=WORKGROUP
Restrict permissions:
sudo chmod 600 /etc/smbcredentials
4. Add permanent mount to /etc/fstab
//192.168.1.100/Documents /mnt/smb-documents cifs credentials=/etc/smbcredentials,uid=1000,gid=1000,file_mode=0644,dir_mode=0755,iocharset=utf8 0 0
5. Mount and verify
sudo mount -a
ls /mnt/smb-documents
6. Add to docker-compose.yml
services:
  php:
    volumes:
      # ... other volumes ...
      - "./KnowledgebaseDocuments:/data/Data/KnowledgebaseDocuments"
      - "/mnt/smb-documents:/data/Data/KnowledgebaseDocuments/smb-documents:ro"
In the UI, enter /smb-documents as the share folder.
Make sure the network share is mounted before starting the Docker containers. Otherwise, an empty folder will be mounted into the container. With the entry in /etc/fstab, this happens automatically at system startup.
After mounting, always use Test connection in the UI to verify that the share folder is reachable and readable inside the container.

Common Errors and Solutions

Error MessageCauseSolution
”Share folder could not be found”Folder does not exist in the containerCheck volume: Is the host path correct? Was the folder created? Does the share folder name match?
”Share folder could not be read”Missing read permissionsCheck file permissions on the host (chmod/chown). The container process typically runs as a specific user.
Path with .. is rejectedSecurity check prevents relative pathsUse only simple subfolder names (e.g. /docs), no ../ constructs.
SMB share not mounted after restartEntry in /etc/fstab is missing or incorrectCheck /etc/fstab and test with sudo mount -a.
NFS mount hangs during bootNetwork is not ready when mount is attemptedEnsure the _netdev option is set in /etc/fstab so the mount only occurs after network initialization.