# Configuring AxoSyslog on client hosts

To configure AxoSyslog on a client host, complete the following steps.

  1. Install the AxoSyslog application on the host. For details installing AxoSyslog on specific operating systems, see [Install AxoSyslog](../../docs/axosyslog-core/4.26/install/index.md).

  2. Configure the local sources to collect the log messages of the host. Starting with version 3.2, AxoSyslog automatically collects the log messages that use the native system logging method of the platform, for example, messages from `/dev/log` on Linux, or `/dev/klog` on FreeBSD. For a complete list of messages that are collected automatically, see [system: Collect the system-specific log messages of a platform](../../docs/axosyslog-core/4.26/chapter-sources/source-system/index.md).

To configure AxoSyslog, edit the `syslog-ng.conf` file with any regular text editor application. The location of the configuration file depends on the platform you are running AxoSyslog, and how you have installed AxoSyslog it.

     * **Native packages** of a platform (like the ones downloaded from Linux repositories) typically place the configuration file under the `/etc/syslog-ng/` directory.
     * **Containers** : When running AxoSyslog in a container, typically you [map an external file to the `/etc/syslog-ng/syslog-ng.conf` file](../../docs/axosyslog-core/4.26/install/docker/index.md#customize-the-configuration) within the container. Check the mapped volumes of your container, and edit the external file.
     * **Kubernetes** : If you’re running AxoSyslog in Kubernetes and have installed it with helm, usually you configure AxoSyslog by editing a `values.yaml` file, and redeploying AxoSyslog. Often the `syslog-ng.conf` part is under the `config.raw` section in the `values.yaml` file. For details, see [Parameters of the AxoSyslog Helm chart](../../docs/axosyslog-core/4.26/install/helm/helm-chart-parameters/index.md).

Add sources to collect the messages from your log files. File sources look like this:

Terminal window
```
source s_myfilesource {
        file("/var/log/myapplication.log" follow-freq(1));
    };
```

Name every source uniquely. For details on configuring file sources, see [file: Collect messages from text files](../../docs/axosyslog-core/4.26/chapter-sources/configuring-sources-file/index.md).

Note Many applications send log messages to logfiles by default (for example, the Roundcube webmail client, or the ProFTPD FTP server), but can be configured to send them to syslog instead. If possible, it is recommended to reconfigure the application that way. 

Note

The default configuration file of AxoSyslog collects platform-specific log messages and the internal log messages of AxoSyslog.

Terminal window
```
source s_local {
        system();
        internal();
    };
```

  3. Create a network destination that points directly to the AxoSyslog server, or to a local relay. The network destination greatly depends on the protocol that your log server or relay accepts messages. Many systems still use the legacy BSD-syslog protocol (RFC3162) over the unreliable UDP transport:

Terminal window
```
destination d_network { network("10.1.2.3" transport("udp")); };
```

However, if possible, use the much more reliable IETF-syslog protocol over TCP transport:

Terminal window
```
destination d_network {
             syslog("10.1.2.3" transport("tcp"));
         };
```

When both nodes run AxoSyslog, you can use the OpenTelemetry protocol with the `axosyslog-otlp()` destination instead. It preserves the internal representation of the messages, and adds scalability (via the `workers()` option), application-layer acknowledgement, and improved load balancing:

Terminal window
```
destination d_otlp {
             axosyslog-otlp(url("10.1.2.3:4317"));
         };
```

Note The `axosyslog-otlp()` driver is available in AxoSyslog version 4.12 and later, and requires the `axosyslog-grpc` (or `axosyslog-mod-grpc`) package. For all options, see [axosyslog-otlp(): Forward logs to another node using OpenTelemetry](../../docs/axosyslog-core/4.26/chapter-destinations/destination-syslog-ng-otlp/index.md). To send logs to a third-party OpenTelemetry collector or backend instead of another AxoSyslog node, use the [Send logs, metrics, and traces to OpenTelemetry](../../docs/axosyslog-core/4.26/chapter-destinations/opentelemetry/index.md) destination. 

  4. Create a log statement connecting the local sources to the AxoSyslog server or relay. For example:

Terminal window
```
log {
             source(s_local); destination(d_network);
         };
```

  5. If the logs will also be stored locally on the host, create local file destinations.

Note

The default configuration of AxoSyslog places the collected messages into the `/var/log/messages` file:

Terminal window
```
destination d_local {
             file("/var/log/messages");
         };
```

  6. Create a log statement connecting the local sources to the file destination.

Note

The default configuration of AxoSyslog has only one log statement:

Terminal window
```
log {
             source(s_local); destination(d_local);
         };
```

  7. Set filters, macros and other features and options (for example, TLS encryption) as necessary.




## Example: The default configuration file of AxoSyslog

The following is the default configuration file of AxoSyslog. It collects local log messages and the log messages of AxoSyslog and saves them in the `/var/log/messages` file.

Terminal window
```
    @version: 4.26
    @include "scl.conf"
    source s_local {
        system(); internal();
    };
    destination d_local {
        file("/var/log/messages");
    };
    log {
        source(s_local); destination(d_local);
    };
```

## Example: A simple configuration for clients

The following is a simple configuration file that collects local log messages and forwards them to a logserver using the IETF-syslog protocol.

Terminal window
```
    @version: 4.26
    @include "scl.conf"
    source s_local {
        system(); internal();
    };
    destination d_syslog_tcp {
        syslog("192.168.1.1" transport("tcp") port(2010));
    };
    log {
        source(s_local);destination(d_syslog_tcp);
    };
```

## Example: An OpenTelemetry client configuration

The following is a simple configuration file that collects local log messages and forwards them to another AxoSyslog node using the OpenTelemetry protocol.

Terminal window
```
    @version: 4.26
    @include "scl.conf"
    source s_local {
        system(); internal();
    };
    destination d_otlp {
        axosyslog-otlp(url("192.168.1.1:4317"));
    };
    log {
        source(s_local); destination(d_otlp);
    };
```

Last modified June 17, 2026: [Markdown formatting fixes in related files (424a542a)](<https://github.com/axoflow/axosyslog-core-docs/commit/424a542aae38674041d024816abd488b4ed65526>)