---
title: socket_server
latest-connect-version: 4.118.0
latest-operator-version: v26.2.6
latest-console-tag: v3.14.0
latest-redpanda-tag: v26.2.7
docname: inputs/socket_server
page-component-name: connect
page-version: master
page-component-version: master
page-component-title: Connect
page-relative-src-path: inputs/socket_server.adoc
page-edit-url: https://github.com/redpanda-data/rp-connect-docs/edit/main/modules/components/pages/inputs/socket_server.adoc
description: Creates a server that receives a stream of messages over a TCP, UDP or Unix socket.
page-self-managed-only: "true"
page-git-created-date: "2024-05-24"
page-git-modified-date: "2026-11-13"
page-generated-sources:
  - include: connect:components:partial$descriptions/inputs/socket_server.adoc
    generator: null
    version: null
    source: the component specs in https://github.com/redpanda-data/connect
  - include: connect:components:partial$availability/inputs/socket_server.adoc
    generator: null
    version: null
    source: the component specs in https://github.com/redpanda-data/connect
  - include: connect:components:partial$fields/inputs/socket_server.adoc
    generator: null
    version: null
    source: the component specs in https://github.com/redpanda-data/connect
page-generated-content: partial
---

# socket_server

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [connect-full.txt](https://docs.redpanda.com/connect-full.txt)

<!-- Source: https://docs.redpanda.com/connect/components/inputs/socket_server.md -->

Creates a server that receives a stream of messages over a TCP, UDP or Unix socket.

#### Common

```yml
input:
  label: ""
  socket_server:
    network: unix # No default (required)
    address: "" # No default (required)
    address_cache: "" # No default (optional)
    tls:
      cert_file: "" # No default (optional)
      key_file: "" # No default (optional)
      self_signed: false
      client_auth: no
    auto_replay_nacks: true
    scanner:
      lines: {}
```

#### Advanced

```yml
input:
  label: ""
  socket_server:
    network: unix # No default (required)
    address: "" # No default (required)
    address_cache: "" # No default (optional)
    tcp:
      reuse_addr: false
      reuse_port: false
    tls:
      cert_file: "" # No default (optional)
      key_file: "" # No default (optional)
      self_signed: false
      client_auth: no
    auto_replay_nacks: true
    scanner:
      lines: {}
```

## Fields

### `address`

The address to listen from.

**Type**: `string`

```yaml
# Examples:
address: /tmp/benthos.sock

# ---

address: 0.0.0.0:6000
```

### `address_cache`

An optional [`cache`](https://docs.redpanda.com/connect/components/caches/about/) within which this input should write its bound address once known. The key of the cache item containing the address will be the label of the component suffixed with `_address` (for example, `foo_address`), or `socket_server_address` when a label has not been provided. This is useful in situations where the address is dynamically allocated by the server (`127.0.0.1:0`) and you want to store the allocated address somewhere for reference by other systems and components.

Requires version 4.25.0 or later.

**Type**: `string`

### `auto_replay_nacks`

Whether to automatically replay rejected messages (negative acknowledgements, or nacks) at the output level. If the cause of rejections persists, leaving this option enabled can result in back pressure.

Set `auto_replay_nacks` to `false` to delete rejected messages. Disabling auto replays can greatly improve memory efficiency of high throughput streams, as the original shape of the data is discarded immediately upon consumption and mutation.

Requires version 4.27.0 or later.

**Type**: `bool`

**Default**: `true`

### `network`

A network type to accept.

**Type**: `string`

**Options**: `unix`, `tcp`, `udp`, `tls`, `unixgram`

### `scanner`

The [scanner](https://docs.redpanda.com/connect/components/scanners/about/) used to split the stream of bytes into individual messages. Scanners are useful for processing large data sources efficiently without holding the entire data set in memory. For example, the `csv` scanner processes individual rows in a CSV file without loading the entire file in memory.

Requires version 4.25.0 or later.

**Type**: `scanner`

**Default**:

```yaml
lines: {}
```

### `tcp`

TCP listener socket configuration.

**Type**: `object`

### `tcp.reuse_addr`

Enable SO_REUSEADDR, allowing binding to ports in TIME_WAIT state. Useful for graceful restarts and config reloads where the server needs to rebind to the same port immediately after shutdown.

**Type**: `bool`

**Default**: `false`

### `tcp.reuse_port`

Enable SO_REUSEPORT, allowing multiple sockets to bind to the same port for load balancing across multiple processes/threads.

**Type**: `bool`

**Default**: `false`

### `tls`

TLS specific configuration, valid when the `network` is set to `tls`.

Requires version 4.12.0 or later.

**Type**: `object`

### `tls.cert_file`

PEM encoded certificate for use with TLS.

**Type**: `string`

### `tls.client_auth`

Specifies how client authentication is handled when using TLS.

Requires version 4.54.0 or later.

**Type**: `string`

**Default**: `no`

| Option | Summary |
| --- | --- |
| `no` | client certificate is not requested nor required. |
| `request` | will request client certificate, not require it. |
| `require_any` | will accept any client certificate, even if not valid. |
| `require_valid` | requires a valid client certificate. |
| `verify_if_given` | will verify a certificate, if one is sent by the client. |

### `tls.key_file`

PEM encoded private key for use with TLS.

**Type**: `string`

### `tls.self_signed`

Whether to generate self signed certificates.

**Type**: `bool`

**Default**: `false`