> For the complete documentation index, see [llms.txt](https://docs.elimity.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.elimity.com/import-agents-windows-file-shares/step-by-step-deployment-guide.md).

# Step-by-step deployment guide

{% hint style="warning" %}
We no longer actively support the Windows File Shares import agent. New users should refer to [the NTFS gateway](https://docs.elimity.com/gateways-ntfs/) instead.
{% endhint %}

## 1. Creating a source in Elimity Insights

Firstly create a new Windows File Shares source in Elimity Insights, but do not enable automatic imports. Instead, generate API credentials for this source and note down the resulting identifier and token.

## 2. Configuring the agent

To configure your import agent, mount a JSON configuration file at `/app/config/config.json` with the properties listed below. Refer to the following attachment for a starting point:

{% file src="/files/OPt4r6Q92RcYTk2tYxXB" %}

Edit the following properties in this file to configure the import agent to your needs:

<table data-full-width="true"><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>insights_certificate</code></td><td><code>object</code></td><td>Configuration to set up an mTLS connection with your Elimity Insights server</td></tr><tr><td><code>insights_certificate.certificate_file</code></td><td><code>string</code></td><td>File path where the agent can find your mTLS certificate; only required if <code>insights_certificate.type</code> is <code>"present"</code></td></tr><tr><td><code>insights_certificate.key_file</code></td><td><code>string</code></td><td>File path where the agent can find your mTLS key; only required if <code>insights_certificate.type</code> is <code>"present"</code></td></tr><tr><td><code>insights_certificate.type</code></td><td><code>string</code></td><td>Use <code>"absent"</code> if you don't need mTLS, otherwise set to <code>"present"</code></td></tr><tr><td><code>insights_source_id</code></td><td><code>number</code></td><td>Source identifier you noted down in step 1</td></tr><tr><td><code>insights_source_token</code></td><td><code>string</code></td><td>Source token you noted down in step 1</td></tr><tr><td><code>insights_url</code></td><td><code>string</code></td><td>URL of your Elimity Insights server</td></tr><tr><td><code>insights_verify_ssl</code></td><td><code>boolean</code></td><td>Set to <code>false</code> to disable TLS certificate verification; default is <code>true</code></td></tr><tr><td><code>log_sink</code></td><td><code>object</code></td><td>Logging configuration</td></tr><tr><td><code>log_sink.file</code></td><td><code>string</code></td><td>File path where the agent should write logs to; only required if <code>log_sink.type</code> is <code>"file"</code></td></tr><tr><td><code>log_sink.type</code></td><td><code>string</code></td><td>Use <code>"std_err"</code> if the agent should log to the standard error stream, or <code>"file"</code> to make a log file</td></tr><tr><td><code>max_depth</code></td><td><code>number</code></td><td>Global upper limit on the scanning depth; use <code>0</code> to indicate no upper limit</td></tr><tr><td><code>max_depth_overrides</code></td><td><code>record[number]</code></td><td>Record mapping file identifiers to depth limit overrides; if the agent encounters a directory which matches an entry in this record, then it resets the depth limit for scans starting from that point</td></tr><tr><td><code>only_dirs</code></td><td><code>boolean</code></td><td>Skip files that are not directories</td></tr><tr><td><code>schedule</code></td><td><code>object</code></td><td>Describes when the agent should run; omit to just trigger once immediately</td></tr><tr><td><code>schedule.day</code></td><td><code>string</code></td><td>Weekday when the agent should run (e.g. <code>"monday"</code>); omit to trigger every day of the week</td></tr><tr><td><code>schedule.time</code></td><td><code>string</code></td><td>Time-of-day when the agent should run (e.g. <code>"19:30"</code>)</td></tr><tr><td><code>smb_password</code></td><td><code>string</code></td><td>Password for authenticating with the SMB server</td></tr><tr><td><code>smb_username</code></td><td><code>string</code></td><td>Username for authenticating with the SMB server</td></tr><tr><td><code>targets</code></td><td><code>list[object]</code></td><td>Determines which SMB servers the agent should import from</td></tr><tr><td><code>targets[].connection_pool_size</code></td><td><code>number</code></td><td>Maximum number of parallel SMB connections to use for importing from this target; default is <code>1</code></td></tr><tr><td><code>targets[].filter</code></td><td><code>object</code></td><td>Determines which items in the targeted SMB server the agent should import</td></tr><tr><td><code>targets[].filter.selections</code></td><td><code>list[object]</code></td><td>Determines which items and shares the agent should import from; only required if <code>targets[].filter.type</code> is <code>"allow_list"</code></td></tr><tr><td><code>targets[].filter.selections.max_depth</code></td><td><code>number</code></td><td>Optional override for the global upper limit on scanning depth</td></tr><tr><td><code>targets[].filter.selections.path</code></td><td><code>string</code></td><td>File path within the targeted share to start scanning from</td></tr><tr><td><code>targets[].filter.selections.path_prefix</code></td><td><code>string</code></td><td>Extra path prefix to apply for file entities in Elimity Insights</td></tr><tr><td><code>targets[].filter.selections.share</code></td><td><code>string</code></td><td>Name of the SMB share to start scanning from</td></tr><tr><td><code>targets[].filter.type</code></td><td><code>string</code></td><td>Use <code>"all"</code> to import all items in all shares on the targeted SMB server; use <code>"allow_list"</code> to apply filtering</td></tr><tr><td><code>timeout</code></td><td><code>number</code></td><td>Maximum number of seconds to wait for SMB responses</td></tr></tbody></table>

## 3. Deploying the agent

Having configured the agent and having created a source in Elimity Insights, you can now deploy the agent to regularly import data from your SMB server and upload it to Elimity Insights. Since we distribute the agent as a Docker image, our recommendation for deployment is to use a CaaS solution like Google Cloud Run or Azure Container Apps. If that's not an option, you can also manually deploy the image on e.g. Windows Server. Refer to [our documentation about gateways and import agents](/technical-guides/gateways-and-import-agents.md) for additional details.

## 4. Following up on the import

The import agent outputs logs to indicate its progress, for a manual Windows Server deployment you can check these with `docker-compose logs`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.elimity.com/import-agents-windows-file-shares/step-by-step-deployment-guide.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
