# DCP Workers

This guide explains how to configure your [Distributed Computing Platform (DCP) workers](https://distributive.network/ ";_blank") to send logs to Better Stack using syslog-ng. This allows you to centralize log management for troubleshooting and analysis.

## Create a Better Stack source

To begin, you need a Better Stack source configured for syslog-ng.

1. Sign up for a [Better Stack account](https://betterstack.com/signup ";_blank") if you don't yet have one.
2. [Create a new syslog-ng source](https://telemetry.betterstack.com/team/0/sources/new?platform=syslog-ng ";_blank") in Better Stack.
3. Under "Name", enter a descriptive name for your DCP worker.  
For example, `DCP Worker - MyProject`
5. (Optional) Change the "Data Region" to specify a data storage location.
6. Click **Connect Source**.

You will now be on the Data Ingestion page for your new source. Copy the **Ingesting host** and **Source token**, as you'll need them for the next step.

## Configure your DCP worker

Now, configure your DCP worker to send logs to the Better Stack source you just created. This involves setting the syslog URL for your worker.

```text
[label Syslog URL for your worker]
tls://$INGESTING_HOST_VEC?logtail@11993+source_token=$SOURCE_TOKEN
```

Choose the method that applies to your DCP worker setup:

#### Command-line workers

If you are running a command-line worker, use the `--syslog` option:

```bash
[label Configure command-line worker]
bin/dcp-worker --syslog='tls://$INGESTING_HOST_VEC?logtail@11993+source_token=$SOURCE_TOKEN'
```

#### DCP config files

If you use `dcp-config` files for configuration, edit the `worker.logging.syslog.url` node.

The easiest way is to create or modify `/etc/dcp/dcp-worker/dcp-config.js` with the following content:

```javascript
[label Configure dcp-config.js]
dcpConfig.worker.logging.syslog.url = 'tls://$INGESTING_HOST_VEC?logtail@11993+source_token=$SOURCE_TOKEN';
```

#### Windows Screensaver workers

For Windows Screensaver workers, set the URL as a string value in the Windows Registry:

`HKLM\Distributive\dcp-worker\dcp\config\worker\logging\syslog\url`

## Verify logs in Better Stack

Once your worker is configured and restarted, go to [Live tail](https://telemetry.betterstack.com/team/0/tail ";_blank"). 🚀

This view will show your log messages in real-time as your DCP worker generates them.

[note]
#### New to Better Stack?

You can watch our pre-recorded demos to get the hang of [Logs & traces](https://betterstack.com/demos/live-tail/), [Infrastructure monitoring](https://betterstack.com/demos/dashboards/), or [more of what Better Stack has to offer](https://betterstack.com/demos/welcome/) as fast as possible.
[/note]
