# How to Import Users with the Employee Role from a CSV File
This article provides instructions for importing users with the Employee role from a .csv file.

:::danger
The script is требовательный к формату CSV file: the columns 'Employee' (employee name) and 'E-Mail' (email address) must be present, separated by the ';' character.

Example content:

```txt
Employee;E-Mail
John Doe;john.doe@test.tld
Ivan Ivanov;ivan.ivanov@test.tld
Thomas Smith;thomas.smith@test.tld
...
```
:::

## Instructions

1. Connect to the Swarmica server via SSH as the root user.

2. Create a backup of Swarmica using [this guide](https://support.swarmica.com/article/ru/408-rezervnoe-kopirovanie-i-vosstanovlenie-swarmica-na-svoem-oborudovanii.html).

3. Upload the CSV file with the user list to the uploads folder in the django container:

```bash
docker cp <PATH-TO-CSV-FILE> swarmica-django-1:/swarmica/swarmica/uploads
```

where <PATH-TO-CSV-FILE> is the path to the CSV file.

4. Log in to the Swarmica web interface as an Administrator.

5. Create an import script in **Swarmica - Settings - Scripts** for the **Administrator** role:

![](https://support.swarmica.com/attachments/7/X/7XsAQrqI-oRNaXC7_a/Screenshot_2026-06-25_at_11.39.26.png)

6. Upload the [import_users.py](https://support.swarmica.com/attachments/S/P/SPPcuZjIonrWPnGN_a/import_users.py) script, add the following **Web form parameters** and click **Save**:

```json
[
  {
    "name": "filename",
    "type": "string",
    "required": true,
    "displayName": "CSV file name"
  }
]
```

It should look like this:

![](https://support.swarmica.com/attachments/Z/2/Z2m_yhftrVCikkFP_a/import-user-script.JPG)

7. In the web form, enter the name of the CSV file loaded in step 2 and click **Submit**:

![](https://support.swarmica.com/attachments/R/U/RUbf_Xe2lp44bEMr_a/Screenshot_2026-06-25_at_11.40.40.png)

## Troubleshooting

You can track the process in the log of the celeryworker container:

```bash
docker logs swarmica-celeryworker-1 -f
```

Or after the script runs:

```txt
docker logs swarmica-celeryworker-1 2>&1 | grep 'User import'
```