# Configuration of cfxEdgeCollector

The following procedure describes necessary steps required to configure cfxEdgeCollector

&#x20;   1\. Run cfxEdgeCollector configuration command. This is an onetime activity that a user will \
&#x20;        perform for setting up the configuration of cfxEdgeCollector. Once the user executes the \
&#x20;        commands, the command will perform the following tasks:&#x20;

&#x20;        a. Create cfxEdgeCollector config directory (\~/.cfxcollector)

&#x20;        b. Generates an SSH key pair for encryption/decryption of credentials.

&#x20;        c. Generate TLS Certs for SSL

&#x20;     2\. Run the following commands to set up the basic configuration as described above.

```
cfxedgecollector configure --help
```

#### Configure Options:

The following are various configuration options provided via CLI&#x20;

```
usage: cfxedgecollector configure [-h] [--securedir SECUREDIR]
                                  [--jobdir JOBDIR] [--datadir DATADIR]
                                  [--exporteddir EXPORTEDDIR]
                                  [--backupdir BACKUPDIR]
                                  [--configdir CONFIGDIR]
                                  [--password PASSWORD] [--name NAME]
                                  [--location LOCATION] [--update] [--migrate]

optional arguments:
  -h, --help            show this help message and exit
  --securedir SECUREDIR
  --jobdir JOBDIR       Directory of Jobs
  --datadir DATADIR     Directory of data
  --exporteddir EXPORTEDDIR
                        Directory of exported data
  --backupdir BACKUPDIR
                        Directory of exported data
  --configdir CONFIGDIR
                        Custom configurations directory
  --password PASSWORD   Password for user cfxcollector to login to
                        cfxedgecollector UI
  --name NAME           Name of the Collector
  --location LOCATION   Location of the Collector (If you are running
                        collector in different datacenters, you can give
                        datacenter name or location)
  --update              Use this flag to update along with
                        --password/--name/--location.
  --migrate             Use this flag to migrate newly added UI components
                        from default job.json to existing job's job.json

```

### Sample/Example Usage

Sample/Example Usage is as follows&#x20;

```bash
cfxedgecollector configure --jobdir /opt/CloudFabrix/jobs --datadir /opt/CloudFabrix/data --exporteddir /opt/CloudFabrix/exporteddata --backupdir /opt/CloudFabrix/backup --config /opt/CloudFabrix/config --password password --name cfxEdgeCollector_DC1 --location DataCenter1
```

Once the user completes configuration, the cfxEdgeCollector UI module can be started by using “cfxedgecollector --start” command

```
cfxedgecollector --start
```

Enable cfxEdgeCollector service port 8888 under firewall service to access UI.

The user can access the cfxEdgeCollector UI using: **https\://\<Host IP>:8888**

```
sudo firewall-cmd --add-port=8888/tcp --permanent
```

```
sudo firewall-cmd --reload
```

{% hint style="info" %}
cfxEdgeCollector will be running within the container.  The user can verify the running instance status using the docker command(s).
{% endhint %}

The following cfxEdgeCollector UI start, stop,  and other commands are available (as shown below). Users can get inline help as well (e.g. cfxedgecollector --help)

```
cfxedgecollector --start
```

```
cfxedgecollector --stop
```

```
cfxedgecollector --status
```

```
cfxedgecollector --version
```
