Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document missing server config options #18122

Draft
wants to merge 6 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions docs/usage/configuration/config_documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,53 @@ Example configuration:
pid_file: DATADIR/homeserver.pid
```
---
### `daemonize`

Specifies whether Synapse should be started as a daemon process. If Synapse is being
managed by [systemd](../../systemd-with-workers/), this option must be omitted or set to
`false`.

This can also be set by the `--daemonize` (`-D`) argument when starting Synapse.

See [`worker_daemonize`](TODO) for more information on daemonizing workers.

Example configuration:
```yaml
daemonize: true
```
---
### `print_pidfile`

Print the path to the pidfile just before daemonizing. Defaults to false.

This can also be set by the `--print-pidfile` argument when starting Synapse.

Example configuration:
```yaml
print_pidfile: true
```
---
### `user_agent_suffix`

A suffix that is appended to the Synapse user-agent (ex. `Synapse/v1.123.0`). Defaults
to None

Example configuration:
```yaml
user_agent_suffix: " (I'm a teapot; Linux x86_64)"
```
---
### `use_frozen_dicts`

Determines whether we should freeze the internal dict object in `FrozenEvent`. Freezing
prevents bugs where we accidentally share e.g. signature dicts. However, freezing a
dict is expensive. Defaults to false.

Example configuration:
```yaml
use_frozen_dicts: true
```
---
### `web_client_location`

The absolute URL to the web client which `/` will redirect to. Defaults to none.
Expand Down Expand Up @@ -595,6 +642,15 @@ listeners:
- names: [client, federation]
```

---
### `manhole`

Turn on the Twisted telnet manhole service on the given port. Defaults to none.

Example configuration:
```yaml
manhole: 1234
```
---
### `manhole_settings`

Expand Down
17 changes: 9 additions & 8 deletions synapse/events/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import abc
import collections.abc
import os

Check failure on line 25 in synapse/events/__init__.py

View workflow job for this annotation

GitHub Actions / lint

Ruff (F401)

synapse/events/__init__.py:25:8: F401 `os` imported but unused
from typing import (
TYPE_CHECKING,
Any,
Expand All @@ -48,21 +48,22 @@
from synapse.types import JsonDict, StrCollection
from synapse.util.caches import intern_dict
from synapse.util.frozenutils import freeze
from synapse.util.stringutils import strtobool

Check failure on line 51 in synapse/events/__init__.py

View workflow job for this annotation

GitHub Actions / lint

Ruff (F401)

synapse/events/__init__.py:51:38: F401 `synapse.util.stringutils.strtobool` imported but unused; consider removing, adding to `__all__`, or using a redundant alias

if TYPE_CHECKING:
from synapse.events.builder import EventBuilder

# Whether we should use frozen_dict in FrozenEvent. Using frozen_dicts prevents
# bugs where we accidentally share e.g. signature dicts. However, converting a
# dict to frozen_dicts is expensive.
#
# NOTE: This is overridden by the configuration by the Synapse worker apps, but
# for the sake of tests, it is set here while it cannot be configured on the
# homeserver object itself.
MadLittleMods marked this conversation as resolved.
Show resolved Hide resolved

USE_FROZEN_DICTS = strtobool(os.environ.get("SYNAPSE_USE_FROZEN_DICTS", "0"))
MadLittleMods marked this conversation as resolved.
Show resolved Hide resolved
USE_FROZEN_DICTS = False
"""
Whether we should use frozen_dict in FrozenEvent. Using frozen_dicts prevents
bugs where we accidentally share e.g. signature dicts. However, converting a
dict to frozen_dicts is expensive.

NOTE: This is overridden by the configuration by the Synapse worker apps, but
for the sake of tests, it is set here because it cannot be configured on the
homeserver object itself.
"""

T = TypeVar("T")

Expand Down
Loading