> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flumeirc.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Servers

> Configure IRC networks and servers

## irc.toml

Networks are defined in `~/.config/flume/irc.toml`:

```toml theme={null}
[[network]]
name = "libera"
address = "irc.libera.chat"
port = 6697
tls = true
auth_method = "sasl"
sasl_mechanism = "PLAIN"
sasl_username = "mynick"
sasl_password = "${libera_pass}"
autojoin = ["#rust", "#flume"]
autoconnect = true

[[network]]
name = "efnet"
address = "irc.efnet.org"
port = 6667
tls = false
auth_method = "none"
autojoin = ["#test"]
```

## Fields

| Field                      | Default      | Description                                                   |
| -------------------------- | ------------ | ------------------------------------------------------------- |
| `name`                     | required     | Display name for the network                                  |
| `address`                  | required     | Server hostname                                               |
| `port`                     | `6697`       | Port number                                                   |
| `tls`                      | `true`       | Use TLS encryption                                            |
| `tls_accept_invalid_certs` | `false`      | Accept self-signed/invalid TLS certificates                   |
| `password`                 | `""`         | Server password (IRC PASS command, use `${secret}` for vault) |
| `username`                 | from general | IRC username (appears in hostmask)                            |
| `auth_method`              | `"none"`     | `"none"`, `"sasl"`, or `"nickserv"`                           |
| `sasl_mechanism`           | `"PLAIN"`    | `"PLAIN"`, `"SCRAM-SHA-256"`, or `"EXTERNAL"`                 |
| `sasl_username`            | `""`         | SASL username                                                 |
| `sasl_password`            | `""`         | SASL password (use `${secret}` for vault)                     |
| `nickserv_password`        | `""`         | NickServ password (use `${secret}` for vault)                 |
| `nick`                     | from general | Override default nick for this network                        |
| `autojoin`                 | `[]`         | Channels to join on connect                                   |
| `autoconnect`              | `false`      | Connect automatically on startup                              |
| `bouncer`                  | `"none"`     | `"none"`, `"znc"`, or `"soju"`                                |
| `playback`                 | `true`       | Enable bouncer buffer playback                                |

## Managing Servers at Runtime

```
/server add libera irc.libera.chat 6697 -tls -autoconnect -username mynick -password ${libera_pass}
/server set libera auth_method sasl
/server set libera sasl_username mynick
/server set libera sasl_password ${libera_pass}
/server list
/server remove efnet
/save
```

## Vault References

Use `${secret_name}` syntax to reference secrets stored in the vault:

```
/secure set libera_pass my-actual-password
/server set libera sasl_password ${libera_pass}
```

The password is resolved from the vault at connect time — never stored in plain text in config files.

## TLS Notes

**IP addresses**: Flume supports connecting to servers by IP address (not just hostname) with TLS enabled.

**Self-signed certificates**: For bouncers or private servers with self-signed certs, enable certificate acceptance:

```
/server add myznc 192.168.1.5 6697 -tls -insecure
```

Or for an existing server:

```
/server set myznc insecure true
```

In `irc.toml`:

```toml theme={null}
[[network]]
name = "myznc"
address = "192.168.1.5"
port = 6697
tls = true
tls_accept_invalid_certs = true
```

## Channel Types

Flume supports all four IRC channel prefixes per RFC 2811:

| Prefix | Type     | Description               |
| ------ | -------- | ------------------------- |
| `#`    | Standard | Normal channels           |
| `&`    | Local    | Server-local channels     |
| `+`    | Modeless | No channel modes          |
| `!`    | Safe     | Timestamped/safe channels |
