---
title: "Connect a NAS shared folder as a file source"
description: "Add a CIFS/SMB file server in ARGENT, create a file source from a shared folder and set a sync schedule, then manage syncing and read the log"
canonical_url: "https://docs.ardge.com/en/knowledge/argent/nas-file-source"
---
# Connect a NAS shared folder as a file source

> Add a CIFS/SMB file server in ARGENT, create a file source from a shared folder and set a sync schedule, then manage syncing and read the log

## Overview

Most of a company's existing documents sit in shared folders on a NAS. ARGENT can connect a CIFS/SMB shared folder directly as a file source, so you don't have to upload files one by one.

Once the file source is created, ARGENT fetches the files from the shared folder and processes them into vectors. On each later sync, the system compares the folder contents and processes the files that were added, deleted or updated. Syncs can run automatically on a schedule, or you can start them by hand.

This article covers adding a CIFS/SMB file server, creating a file source from one of its folders, then managing syncs and reading the log.

## What you'll learn

- Add a CIFS/SMB file server in ARGENT and load its shared folders
- Create a file source from a chosen folder in the shared folder, and set a sync schedule
- Start and stop syncs, and check each sync's file changes in the log

**Estimated time: about 15 minutes** (not counting the time it takes to process the files into vectors)

## Applies to

- ARGENT 1.0.1 and later

## Before you begin

- You have set up the **Model Connection** — see [Set up the model connection in ARGENT](https://docs.ardge.com/en/knowledge/argent/model-connection)
- The ARX device and the NAS are on networks that can reach each other
- The target shared folder on the NAS allows CIFS/SMB access

## What you'll need

Adding a file server takes the following three pieces of information. Get them before you start:

<table>
<thead>
  <tr>
    <th>
      Information
    </th>
    
    <th>
      What it's for
    </th>
    
    <th>
      Where to find it
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        The NAS's IP address or hostname
      </strong>
    </td>
    
    <td>
      Sets the connection target
    </td>
    
    <td>
      The NAS's network settings page
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        An account that can access the shared folder
      </strong>
    </td>
    
    <td>
      Passes CIFS/SMB authentication
    </td>
    
    <td>
      The NAS's user management page
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        That account's password
      </strong>
    </td>
    
    <td>
      Passes CIFS/SMB authentication
    </td>
    
    <td>
      Same as above
    </td>
  </tr>
</tbody>
</table>

## Step 1: Add a CIFS/SMB file server

You add the file server on the page where you create the file source — there's no separate page to go to.

1. Go to the **File Sources** page and click **Add File Sources**
2. Under **Source Type**, choose **Select from NAS**
3. Click **+** to the right of the **NAS Source** field to open the **Add File Server** dialog
4. Fill in the fields as follows
5. Click **Add Server**

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Value
    </th>
    
    <th>
      Rules and notes
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Server Name
      </strong>
    </td>
    
    <td>
      A name that identifies this server
    </td>
    
    <td>
      Required
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        IP Address / Hostname
      </strong>
    </td>
    
    <td>
      The NAS's IP address or hostname, such as <code>
        192.168.0.100
      </code>
    </td>
    
    <td>
      Required
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Username
      </strong>
    </td>
    
    <td>
      An account that can access the shared folder
    </td>
    
    <td>
      Required
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Password
      </strong>
    </td>
    
    <td>
      That account's password
    </td>
    
    <td>
      Required
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Shared Folder
      </strong>
    </td>
    
    <td>
      Select from the dropdown
    </td>
    
    <td>
      Required. The list only loads after the first three connection fields are filled in
    </td>
  </tr>
</tbody>
</table>

When the server is added, the page shows **Server Added / Server '' has been successfully added.** and the server appears in the **NAS Source** dropdown.

![The Add File Sources page with Select from NAS selected](https://docs.ardge.com/screenshots/knowledge/en/argent/nas-file-source/step-1-1.webp)

![The Add File Server dialog](https://docs.ardge.com/screenshots/knowledge/en/argent/nas-file-source/step-1-2.webp)

![The Manage NAS Source dialog](https://docs.ardge.com/screenshots/knowledge/en/argent/nas-file-source/step-1-3.webp)

<tip>

**Maintain servers in one place in Manage NAS Source:**

Click the gear icon to the right of the **NAS Source** field to open the **Manage NAS Source** dialog, where you can edit or delete the servers you've added. Before you delete a server, the dialog lists the **Affected file sources**.

</tip>

## Step 2: Create the file source and set a sync schedule

1. Enter a name in the **Source Name** field
2. In **NAS Source**, select the server you added in Step 1
3. In the **Select Folder:** list, select the folder to include
4. Under **Sync Schedule**, check **Enabled** and choose the **Days** and **Time** to sync. If you don't want automatic syncs, uncheck **Enabled**
5. Click **Create**

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Value
    </th>
    
    <th>
      Rules and notes
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Source Name
      </strong>
    </td>
    
    <td>
      A name that identifies the file source
    </td>
    
    <td>
      Required. No leading or trailing spaces, and must not match an existing file source's name
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        NAS Source
      </strong>
    </td>
    
    <td>
      The server you added in Step 1
    </td>
    
    <td>
      Required. With no server added yet, it shows <strong>
        No server available. Please add a remote server first.
      </strong>
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Select Folder:
      </strong>
    </td>
    
    <td>
      The folder to include
    </td>
    
    <td>
      Required. A folder can be used by only one file source
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Sync Schedule
      </strong>
    </td>
    
    <td>
      The days and time for automatic syncs
    </td>
    
    <td>
      When enabled, choose at least one day
    </td>
  </tr>
</tbody>
</table>

<note>

**Supported file formats and sizes:**

Each file can be up to 150 MB. Supported formats include TXT, MD, HTML, JSON, PDF, DOCX, PPTX, PNG, JPG, XLSX and CSV. For details, see [What file formats and limits does ARGENT support?](https://docs.ardge.com/en/knowledge/argent/formats-and-limits).

</note>

When the file source is created, the page shows **File synchronization task has been created and started.** and returns to the **File Sources** page. In the list, the row's **Path of Origin** column shows the server name and folder path, the **Last Run** column shows the sync status, and the **Next Schedule** column shows when the next automatic sync runs.

![The folder list shown after choosing a NAS source](https://docs.ardge.com/screenshots/knowledge/en/argent/nas-file-source/step-2-1.webp)

![A folder selected and the sync schedule set](https://docs.ardge.com/screenshots/knowledge/en/argent/nas-file-source/step-2-2.webp)

![The file source list and sync progress after creating](https://docs.ardge.com/screenshots/knowledge/en/argent/nas-file-source/step-2-3.webp)

## Step 3: Manage syncs and read the log

In the **File Sources** list, the sync icon at the right of each row changes with the current state:

- **While a sync is running**: clicking it opens the **Stop Sync** confirmation dialog. Click **Stop** to end the current sync, and the page shows **Sync job has stopped**
- **While no sync is running**: clicking it opens the **Start Sync** confirmation dialog. Click **Start** to run a sync right away, and the page shows **Sync job has started**

The action menu to the right of the sync icon offers the following:

<table>
<thead>
  <tr>
    <th>
      Option
    </th>
    
    <th>
      What it does
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Edit
      </strong>
    </td>
    
    <td>
      Change the source name and sync schedule
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Log
      </strong>
    </td>
    
    <td>
      View the results of past syncs
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Delete
      </strong>
    </td>
    
    <td>
      Delete this file source. You can't delete it while an agent still uses it
    </td>
  </tr>
</tbody>
</table>

The **Log** shows one row per sync, with these columns:

<table>
<thead>
  <tr>
    <th>
      Column
    </th>
    
    <th>
      Contents
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        #
      </strong>
    </td>
    
    <td>
      The sync's sequence number
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Start Time
      </strong>
      
       / <strong>
        End Time
      </strong>
    </td>
    
    <td>
      When the sync started and ended
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Trigger
      </strong>
    </td>
    
    <td>
      <strong>
        Schedule
      </strong>
      
       or <strong>
        Manual
      </strong>
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Status
      </strong>
    </td>
    
    <td>
      The sync's result
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Total Size
      </strong>
      
       / <strong>
        Total Files
      </strong>
    </td>
    
    <td>
      The size and number of files the source covered when the sync ended
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Files Added
      </strong>
      
       / <strong>
        Files Deleted
      </strong>
      
       / <strong>
        Files Updated
      </strong>
    </td>
    
    <td>
      The number of files the sync added, removed and reprocessed
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Files Not Supported
      </strong>
    </td>
    
    <td>
      The number of files skipped because their format isn't supported
    </td>
  </tr>
</tbody>
</table>

Click any row in the log to open **File Results**, which lists the **File Path**, **Status**, **Failure Reason** and **Processed At** for each file that sync processed. For what each status means, see [What do the file source statuses mean?](https://docs.ardge.com/en/knowledge/argent/source-statuses).

![The Stop Sync confirmation dialog](https://docs.ardge.com/screenshots/knowledge/en/argent/nas-file-source/step-3-1.webp)

![The file source row's action menu](https://docs.ardge.com/screenshots/knowledge/en/argent/nas-file-source/step-3-2.webp)

![The Log dialog](https://docs.ardge.com/screenshots/knowledge/en/argent/nas-file-source/step-3-3.webp)

## Troubleshooting

<table>
<thead>
  <tr>
    <th>
      Message
    </th>
    
    <th>
      Likely cause
    </th>
    
    <th>
      What to do
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        Failed to add server: <error>
      </code>
    </td>
    
    <td>
      The username or password is wrong, or the NAS can't be reached
    </td>
    
    <td>
      On the NAS, confirm the account can access the shared folder, and confirm the networks can reach each other
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        Failed to load shared folders: invalid data format returned from server.
      </code>
    </td>
    
    <td>
      The shared folder list the NAS returned can't be parsed
    </td>
    
    <td>
      Confirm the NAS's CIFS/SMB service is working, then try again
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        Name is already being used by another file source
      </code>
    </td>
    
    <td>
      The <strong>
        Source Name
      </strong>
      
       matches an existing file source
    </td>
    
    <td>
      Use a different name
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        No leading or trailing spaces allowed
      </code>
    </td>
    
    <td>
      The <strong>
        Source Name
      </strong>
      
       starts or ends with a space
    </td>
    
    <td>
      Remove the spaces
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        Folder is already being used by another file source
      </code>
    </td>
    
    <td>
      Another file source already uses that folder
    </td>
    
    <td>
      Choose a folder that isn't in use yet
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        Select at least one day.
      </code>
    </td>
    
    <td>
      <strong>
        Sync Schedule
      </strong>
      
       is enabled but no day is chosen
    </td>
    
    <td>
      Choose at least one day, or uncheck <strong>
        Enabled
      </strong>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        Failed to load folder list.
      </code>
    </td>
    
    <td>
      The server's directory structure couldn't be read during creation
    </td>
    
    <td>
      Confirm the server is still reachable, then try again
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        Failed to start the synchronization task. Please try again later.
      </code>
    </td>
    
    <td>
      The file source was created, but the sync job didn't start
    </td>
    
    <td>
      Go back to the <strong>
        File Sources
      </strong>
      
       list and click the row's sync icon to start it by hand
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        This file source is in use by an AI Agent. Remove it in the agent's settings, then try again later.
      </code>
    </td>
    
    <td>
      The file source you're deleting is still linked to an agent
    </td>
    
    <td>
      Unlink it on that agent's <strong>
        File Source
      </strong>
      
       tab first
    </td>
  </tr>
</tbody>
</table>

![The error shown when a folder is already used by another file source](https://docs.ardge.com/screenshots/knowledge/en/argent/nas-file-source/troubleshooting.webp)

## Next steps

Once the file source has finished processing, you can create an agent that uses it — see [Create your first AI agent](https://docs.ardge.com/en/knowledge/argent/first-ai-agent).

## Related articles

- [Should I use Manual Upload or Select from NAS for a file source?](https://docs.ardge.com/en/knowledge/argent/local-or-remote)
- [What do the file source statuses mean?](https://docs.ardge.com/en/knowledge/argent/source-statuses)
- [What file formats and limits does ARGENT support?](https://docs.ardge.com/en/knowledge/argent/formats-and-limits)


## Sitemap

See the full [sitemap](https://docs.ardge.com/sitemap.md) for all pages.
