Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions changelog.d/19491.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove the optional `systemd-python` dependency and the `systemd` extra on the `synapse` package.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be added to upgrade.md

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have done that

6 changes: 6 additions & 0 deletions contrib/systemd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,9 @@ appropriate locations of your installation.
5. Start Synapse: `sudo systemctl start matrix-synapse`
6. Verify Synapse is running: `sudo systemctl status matrix-synapse`
7. *optional* Enable Synapse to start at system boot: `sudo systemctl enable matrix-synapse`

## Logging

If you use `contrib/systemd/log_config.yaml`, install `systemd-python` in the
same Python environment as Synapse. The config uses
`systemd.journal.JournalHandler`, which requires that package.
1 change: 1 addition & 0 deletions contrib/systemd/log_config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
version: 1

# Requires the `systemd-python` package in Synapse's runtime environment.
# In systemd's journal, loglevel is implicitly stored, so let's omit it
# from the message text.
formatters:
Expand Down
6 changes: 4 additions & 2 deletions debian/build_virtualenv
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ pip install poetry==2.1.1 poetry-plugin-export==1.9.0
poetry export \
--extras all \
--extras test \
--extras systemd \
-o exported_requirements.txt
# Keep journald logging support in the packaged virtualenv when using
# systemd.journal.JournalHandler in /etc/matrix-synapse/log.yaml.
echo "systemd-python==235 --hash=sha256:4e57f39797fd5d9e2d22b8806a252d7c0106c936039d1e71c8c6b8008e695c0a" >> exported_requirements.txt
deactivate
rm -rf "$TEMP_VENV"

Expand All @@ -57,7 +59,7 @@ dh_virtualenv \
--extra-pip-arg="--no-deps" \
--extra-pip-arg="--no-cache-dir" \
--extra-pip-arg="--compile" \
--extras="all,systemd,test" \
--extras="all,test" \
--requirements="exported_requirements.txt"

PACKAGE_BUILD_DIR="$(pwd)/debian/matrix-synapse-py3"
Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
matrix-synapse-py3 (1.149.0~rc1+nmu1) UNRELEASED; urgency=medium

* Change how the systemd journald integration is installed.

-- Quentin Gliech <packages@matrix.org> Fri, 20 Feb 2026 19:19:51 +0100

matrix-synapse-py3 (1.149.0~rc1) stable; urgency=medium

* New synapse release 1.149.0rc1.
Expand Down
5 changes: 5 additions & 0 deletions docs/setup/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,11 @@ pip install --upgrade setuptools
pip install matrix-synapse
```

If you want to use a logging configuration that references
`systemd.journal.JournalHandler` (for example `contrib/systemd/log_config.yaml`),
you must install `systemd-python` separately in the same environment.
Synapse no longer provides a `matrix-synapse[systemd]` extra.

This will download Synapse from [PyPI](https://pypi.org/project/matrix-synapse)
and install it, along with the python libraries it uses, into a virtual environment
under `~/synapse/env`. Feel free to pick a different directory if you
Expand Down
16 changes: 16 additions & 0 deletions docs/upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,22 @@ each upgrade are complete before moving on to the next upgrade, to avoid
stacking them up. You can monitor the currently running background updates with
[the Admin API](usage/administration/admin_api/background_updates.html#status).

# Upgrading to v1.150.0

## Removal of the `systemd` pip extra

The `matrix-synapse[systemd]` pip extra has been removed.
If you use `systemd.journal.JournalHandler` in your logging configuration
(e.g. `contrib/systemd/log_config.yaml`), you must now install
`systemd-python` manually in Synapse's runtime environment:

```bash
pip install systemd-python
```

No action is needed if you do not use journal logging, or if you installed
Synapse from the Debian packages (which handle this automatically).

# Upgrading to v1.146.0

## Drop support for Ubuntu 25.04 Plucky Puffin, and add support for 25.10 Questing Quokka
Expand Down
3 changes: 3 additions & 0 deletions docs/usage/configuration/logging_sample_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ It should be named `<SERVERNAME>.log.config` by default.
Hint: If you're looking for a guide on what each of the fields in the "Processed request" log lines mean,
see [Request log format](../administration/request_log.md).

If you use `systemd.journal.JournalHandler` in your own logging config, ensure
`systemd-python` is installed in Synapse's runtime environment.

```yaml
{{#include ../../sample_log_config.yaml}}
```
15 changes: 1 addition & 14 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,6 @@ saml2 = [
"pytz>=2018.3", # via pysaml2
]
oidc = ["authlib>=0.15.1"]
# systemd-python is necessary for logging to the systemd journal via
# `systemd.journal.JournalHandler`, as is documented in
# `contrib/systemd/log_config.yaml`.
systemd = ["systemd-python>=231"]
url-preview = ["lxml>=4.6.3"]
sentry = ["sentry-sdk>=0.7.2"]
opentracing = [
Expand Down Expand Up @@ -194,7 +190,6 @@ all = [
"pympler>=1.0",
# omitted:
# - test: it's useful to have this separate from dev deps in the olddeps job
# - systemd: this is a system-based requirement

# Transitive dependencies
# These dependencies aren't directly required by Synapse.
Expand Down