> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flexoworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Install the CDI service

> Install the Windows service, connect it to Flexoworks, and check its diagnostic logs.

Install **Flexoworks CDI Service** on the Windows workstation that can reach
your CDI and read the DFS folders. It runs as a background Windows service,
connects to Flexoworks over outbound HTTPS, and sends status and diagnostic
logs to **Organization → CDI services**.

Use the current installer offered by Flexoworks. The cloud screenshots use
sample data. The Windows setup screenshots show version 0.2.6 on Windows
Server 2022; newer versions and Windows 11 may look different.

The service reads CDI queues, discovers machine runs, copies approved LENs,
and delivers saved `.cdi` layouts to DFS. The operator still opens the layout
in DFS, checks the CDI and exposure preset, and submits it. See
[CDI workspace](https://docs.flexoworks.com/guides/cdi-workspace.md) for the production workflow.

## Before you start

* A **64-bit Windows 11** workstation on the DFS/CDI network and permission
  to install software as a Windows administrator.
* A Flexoworks account with the **Org admin** role and the CDI equipment
  already listed in **Organization → Locations & equipment**.
* The CDI hostname or IP address used by DFS. Copy it from
  **DFS → Edit Device List**; the service does not scan the whole network.
* The exact DFS folders to inspect and permission for the Windows service
  account to read them. The operator can help identify these folders.
* Outbound HTTPS access to the Flexoworks API and file storage for downloads
  and evidence uploads. The cloud connection does not require an inbound
  internet port or a VPN. The workstation still needs local network access
  to the CDI and DFS shares.

The package includes its own runtime. You do not need to install PowerShell,
a compiler, or a separate .NET runtime.

> [!WARNING]
>
> This pilot installer is unsigned. If company policy blocks the MSI or
> application, ask site IT to approve the package. Keep the exact Windows
> message and error code; disabling Windows security is not an installation step.

## 1. Download the installer and configuration

Open **Organization → CDI services** in Flexoworks and select
**Download Windows service**. Save `Flexoworks-CDI-Service.zip` so you can
transfer it to the Windows workstation.

Click **Add workstation** to open the registration window, then fill in:

| Field | What to enter |
| - | - |
| **Workstation name** | A recognizable name, such as `DFS workstation 1`. |
| **Workstation IP address** | Optional address of the Windows computer. The service also reports its local IPs. |
| **Equipment** | Choose existing CDI equipment. Use **Add CDI** for each additional controller. |
| **CDI hostname or IP** | The device address from DFS, without `http://`, a port, or a folder path. |
| **DFS destination folder** | Required folder where the service writes and verifies approved LEN files and exported layouts. Use a full local or UNC path. |
| **Import working CDI** | For each CDI, choose a working `.cdi` file from that machine to supply its drum and working area. |
| **DFS folders to capture** | One full folder path per line. Use UNC paths for network folders. You can add or correct these in the Windows setup window later. |

![English Add workstation modal with the DFS destination and working CDI import](https://mintcdn.com/flexoworks/mQ-upAWnU4Vp715W/images/production-update/cdi-add-station.png?fit=max\&auto=format\&n=mQ-upAWnU4Vp715W\&q=85\&s=1a042716340a3df9dc6a41ac822cfab1)

Register the workstation, set its DFS destination, and configure each CDI.

Select **Add workstation**, then **Download service.json**. Transfer both the
ZIP and `service.json` to the Windows workstation. Download the configuration
before refreshing or leaving this page: its download is available only during
the current setup session.

![English Workstation added modal showing Download service.json and MSI installation instructions](https://mintcdn.com/flexoworks/9tcQH9PpObUJV_Za/images/cdi-agent-setup/cloud-configuration.png?fit=max\&auto=format\&n=9tcQH9PpObUJV_Za\&q=85\&s=22abbdd9c6ff417b8b02697f61518350)

Download service.json after creating the workstation. This file pairs the service with your organization.

> [!WARNING]
>
> The downloaded `service.json` contains a workstation credential. Do not put it
> in shared documentation or attach it to a support request. Each workstation
> needs its own configuration; do not reuse one file on several computers.

## 2. Install the MSI on Windows

1. Close any older portable service window on this computer.
2. In File Explorer, extract `Flexoworks-CDI-Service.zip`.
3. Double-click **Flexoworks-CDI-Service.msi** in the extracted folder.
4. Follow the installer, keep the default installation folder, and approve
   the Windows administrator prompt when it appears.
5. Open **Start → Flexoworks → Flexoworks CDI Service** after installation.
   Opening the setup application also requires administrator permission.

The installer registers and starts the **Flexoworks CDI Service** service.
The service creates its own `Data` folders; do not create them manually.
Before pairing, a waiting-for-configuration or starting status is expected.

## 3. Import the configuration

Choose **English** or **Українська** using the selector at the bottom of the
setup window. Select **Import configuration…**, open the downloaded
`service.json`, and acknowledge the confirmation.

![English Flexoworks CDI Service 0.2.6 window with configuration import, CDI address, DFS folders, status, and support log controls](https://mintcdn.com/flexoworks/9tcQH9PpObUJV_Za/images/cdi-agent-setup/windows-setup.png?fit=max\&auto=format\&n=9tcQH9PpObUJV_Za\&q=85\&s=99c34f19d0e129ad882aa1391b5a0347)

The Windows setup window before import. After pairing, it also shows service status and recent errors.

Importing saves the configuration and restarts the service. The installed
credential is protected with Windows machine encryption. The local **CDI address**
is the default for diagnostics started from the Windows setup window. Cloud
queue reads use the addresses saved in organization settings. You can edit
**DFS folders** locally and select **Save and restart**.

### Manage a workstation's CDIs

In **Organization → CDI services**, select the station and choose **Edit workstation**.
Set its IP address, choose existing equipment, and enter each controller's hostname
or IP. Use **Add CDI** or **Disconnect CDI** to change the list, then **Save workstation**.
To move equipment to another station, disconnect it from the original station first.
Changing or disconnecting a CDI cancels its pending commands. Commands already
running continue to completion.
These are the same equipment records shown in **Locations & equipment** and the CDI workspace.

The station's **Online** state and **Last contact** describe the Windows service.
Each CDI separately shows **Last connected**, **Last checked**, and connection status.
For a hostname, the service reports the IP it reached. An unreachable CDI keeps its
last successful queue. Changing an address starts fresh connection checks and
preserves the previous address's queue history.

Choose **CDI for diagnostics** before collecting diagnostics or starting a
capture. Updating assignments does not require a replacement credential or
importing another `service.json`.

### Import the working area

Before exporting a Flexoworks gang, open **Edit workstation** and use
**Import working CDI** for the target controller. Choose a readable `.cdi`
file smaller than 64 KB that opens correctly on that machine with the
intended working area, then **Save workstation**.

Only drum, working area, and hotfolder settings are imported. The reference
does not choose the artwork or exposure preset. Changes apply to new exports;
an existing export keeps the geometry it was created with. If export reports
missing geometry, import the reference and create a fresh export.

![English CDI services page with workstation and controller status](https://mintcdn.com/flexoworks/mQ-upAWnU4Vp715W/images/production-update/cdi-services.png?fit=max\&auto=format\&n=mQ-upAWnU4Vp715W\&q=85\&s=fcad67ff1ad74587e436346358675373)

Check service availability and each controller separately before using its DFS destination.

The station history starts with 20 recent log entries and 5 diagnostic reports. Use **Show more** to expand a list. The Windows service window separates events, diagnostic reports and startup errors; select a report and choose **Save report…** to export its ZIP.

## 4. Check DFS folders and service access

Check that the service can write to the **DFS destination folder**. This is
separate from **DFS folders to capture**, which are used for diagnostics.

Ask the operator to show where DFS keeps saved layouts, configuration,
logs, and job output. Use the folders from this installation; there is no
single default path for every DFS station.

For a mapped network drive, use its underlying UNC path. For example, if
`Z:` maps to `\\dfs-station\DFS`, enter `\\dfs-station\DFS\Layouts`
instead of `Z:\Layouts`. Enter one folder per line and select only the
folders needed for capture, rather than an entire drive.

The service runs as **LocalSystem** by default. A folder you can open in
File Explorer may still be inaccessible to that service. Ask IT to grant the
service identity access or configure an appropriate account in Windows
Services. After an account change, open the service setup as administrator
before starting the service so its local data permissions are updated. Do not
put network passwords in paths. A custom service account also needs the
Windows permissions required for network capture.

## 5. Verify the connection and diagnostics

1. In Windows, wait for **Service: Running** and
   **Cloud: Connected to Flexoworks**. A running service alone does not confirm
   a working cloud connection.
2. Return to **Organization → CDI services** and choose the new **Workstation**.
3. Check **Online**, a recent **Last contact**, and that **Service version**
   matches the version you installed. The page refreshes automatically.
4. Select **Collect diagnostics**. Watch **Recent commands** and
   **Diagnostic log**. Expand events for details; use **Warnings and errors**
   to focus on failures.
5. Confirm that the configured DFS folders are accessible to the service.
   Inspect the CDI connectivity results and download the ZIP under
   **Evidence bundles** when it appears.

**Online** confirms that the service has contacted Flexoworks. A successful
candidate-port check confirms only that a network endpoint responded.
**Diagnostics completed** does not mean the CDI accepted or exposed a job.

After verifying the connection, delete the downloaded plaintext `service.json`
and any transfer copies. Keep the installed configuration in
`C:\ProgramData\FlexoworksCdiAgent`.

The service starts automatically after Windows restarts, before user sign-in.
You can close the setup window while the service keeps running; reopen it
from Start when needed. At a convenient time, restart the workstation and
verify a fresh **Last contact** in Flexoworks.

## Capture one DFS submission

Once the connection and folder access work, coordinate a known test job with
the operator:

1. Select **Capture DFS submission** in the cloud or Windows setup window
   and confirm the request.
2. Wait for **Capture ready — send the test job through DFS now** in the
   cloud log, or `CAPTURE_READY` in the Windows log.
3. Have the operator submit that one test job through the existing DFS workflow.
4. Let the 120-second capture finish. Download its ZIP from **Evidence bundles**.

The capture records traffic to the configured CDI and changes in selected
DFS folders. Packet traces can contain job data and credentials; share the
private archive only with people investigating the integration. If the service
is stopped during capture, the service saves partial evidence and queues its
upload for restart. The interrupted command requires review and is not replayed.

## If something does not work

| What you see | What to do |
| - | - |
| The installer is blocked or administrator access is denied | Save the exact message and ask site IT to approve the MSI and application. |
| **Waiting for configuration** | Import the correct `service.json`. If it was lost before import, revoke the unused cloud entry and add a replacement workstation. |
| **Service: Stopped** | Select **Start / restart service** and inspect recent errors if it stops again. |
| **Cannot reach Flexoworks** or cloud **Offline** | Check outbound access, DNS, proxy or firewall policy, and the Windows window's error. Local logs remain available while offline. |
| **Access revoked** | Create a replacement workstation configuration and import it on this computer. |
| `CDI_HOST_MISMATCH` in an older failed command | Update to service 0.2.7 or later, check the assigned CDI address in **Edit workstation**, and request diagnostics again. |
| Export asks for a working CDI reference | Import the reference for that controller, save the workstation, and create a new export. |
| A DFS folder is unavailable | Check the full UNC path and service account permissions, then collect diagnostics again. |
| CDI address resolution or candidate-port checks fail | Recheck the address in DFS and local connectivity with the operator or IT. Do not change production device settings based only on a candidate-port result. |
| Network capture is unavailable | Export logs for IT to check capture permissions or another active trace. Folder diagnostics may still be available. |

### Export logs

Select **Export support logs…** in the Windows window. The ZIP includes
recent service events, status, available startup errors, and the recorded MSI
installation log. Text logs are redacted; raw packet capture bundles are separate.

If setup cannot open, IT can use **Command Prompt** as administrator:

```bat theme={null}
"C:\Program Files\Flexoworks CDI Agent\FlexoworksCdiAgent.exe" --export-support "%USERPROFILE%\Desktop\Flexoworks-support.zip"
```

The installed folder and executable keep their original technical names so
existing installations remain compatible. The setup window also accepts older
`agent.json` downloads.

This works even if the service cannot create its primary `Data` folder.
Startup errors may also be in `%TEMP%\FlexoworksCdiAgent`,
`C:\Windows\SystemTemp\FlexoworksCdiAgent`, or the older
`C:\Windows\Temp\FlexoworksCdiAgent` location.

For an installation failure, run the MSI from its extracted folder with a
known log filename:

```bat theme={null}
msiexec /i "Flexoworks-CDI-Service.msi" /L*V "%TEMP%\Flexoworks-install.log"
```

Send support the exact error, installer version, this MSI log or support
ZIP, and approximate time of failure. Do not send `service.json`.

## Update, repair, or remove

In **Organization → CDI services**, select the workstation and enable
**Auto-update service** to install new versions when the service is idle.
This is off by default and requires version 0.2.4 or later running under
LocalSystem. Windows does not restart automatically.

You can also install a newer MSI manually on the same computer. Configuration
and evidence are retained. Afterward, check the version and fresh cloud contact.
Repair or uninstall through Windows
**Installed apps** when needed. Uninstalling preserves configuration and
evidence in `C:\ProgramData\FlexoworksCdiAgent`; it does not revoke cloud access.
Click a workstation row to view its details. Use **Revoke access** when retiring
an online workstation. To remove an offline, unused, or revoked station from the
list, click the trash icon beside its row and confirm **Remove workstation**.
Removal revokes its cloud access and retains diagnostic history. Reconnecting
requires a new workstation registration.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.