轩辕镜像 官方专业版
轩辕镜像
专业版
轩辕镜像 官方专业版
轩辕镜像
专业版
首页个人中心搜索镜像
交易
充值流量¥8起我的订单
文档
工具
提交工单页面收录
synapse

matrixdotorg/synapse

matrixdotorg
自动构建

Synapse是Matrix协议的参考实现家庭服务器,用于搭建和运行Matrix网络中的主服务器,默认使用SQLite数据库,生产环境建议连接PostgreSQL,不含TURN服务器。

346 次收藏下载次数: 0状态:自动构建维护者:matrixdotorg仓库类型:镜像最近更新:7 天前
让 AI 帮你使用轩辕镜像? · 展开查看说明 · 点击收起说明

如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。

只需在 AI 对话中先发送下面这句话即可:

请先完整阅读并严格遵守以下文档中的全部规则与要求:

https://xuanyuan.cloud/agents.md

在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。

查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。

DockerHub 官方简介
轩辕镜像中文简介
下载命令
镜像标签列表与下载命令
轩辕镜像,不浪费每一次拉取。
点击查看

Synapse Docker

This Docker image will run Synapse as a single process. By default it uses a sqlite database; for production use you should connect it to a separate postgres database. The image also does not provide a TURN server.

This image should work on all platforms that are supported by Docker upstream. Note that Docker's WS1-backend Linux Containers on Windows platform is https://github.com/docker/for-win/issues/6470 and is not supported by this image.

Volumes

By default, the image expects a single volume, located at /data, that will hold:

  • configuration files;
  • uploaded media and thumbnails;
  • the SQLite database if you do not configure postgres;
  • the appservices configuration.

You are free to use separate volumes depending on storage endpoints at your disposal. For instance, /data/media could be stored on a large but low performance hdd storage while other files could be stored on high performance endpoints.

In order to setup an application service, simply create an appservices directory in the data volume and write the application service Yaml configuration file there. Multiple application services are supported.

Generating a configuration file

The first step is to generate a valid config file. To do this, you can run the image with the generate command line option.

You will need to specify values for the SYNAPSE_SERVER_NAME and SYNAPSE_REPORT_STATS environment variable, and mount a docker volume to store the configuration on. For example:

docker run -it --rm \
    --mount type=volume,src=synapse-data,dst=/data \
    -e SYNAPSE_SERVER_NAME=my.matrix.host \
    -e SYNAPSE_REPORT_STATS=yes \
    matrixdotorg/synapse:latest generate

For information on picking a suitable server name, see https://matrix-org.github.io/synapse/latest/setup/installation.html.

The above command will generate a homeserver.yaml in (typically) /var/lib/docker/volumes/synapse-data/_data. You should check this file, and customise it to your needs.

The following environment variables are supported in generate mode:

  • SYNAPSE_SERVER_NAME (mandatory): the server public hostname.
  • SYNAPSE_REPORT_STATS (mandatory, yes or no): whether to enable anonymous statistics reporting.
  • SYNAPSE_HTTP_PORT: the port Synapse should listen on for http traffic. Defaults to 8008.
  • SYNAPSE_CONFIG_DIR: where additional config files (such as the log config and event signing key) will be stored. Defaults to /data.
  • SYNAPSE_CONFIG_PATH: path to the file to be generated. Defaults to <SYNAPSE_CONFIG_DIR>/homeserver.yaml.
  • SYNAPSE_DATA_DIR: where the generated config will put persistent data such as the database and media store. Defaults to /data.
  • UID, GID: the user id and group id to use for creating the data directories. Defaults to 991, 991.

Running synapse

Once you have a valid configuration file, you can start synapse as follows:

docker run -d --name synapse \
    --mount type=volume,src=synapse-data,dst=/data \
    -p 8008:8008 \
    matrixdotorg/synapse:latest

(assuming 8008 is the port Synapse is configured to listen on for http traffic.)

You can then check that it has started correctly with:

docker logs synapse

If all is well, you should now be able to connect to http://localhost:8008 and see a confirmation message.

The following environment variables are supported in run mode:

  • SYNAPSE_CONFIG_DIR: where additional config files are stored. Defaults to /data.
  • SYNAPSE_CONFIG_PATH: path to the config file. Defaults to <SYNAPSE_CONFIG_DIR>/homeserver.yaml.
  • SYNAPSE_WORKER: module to execute, used when running synapse with workers. Defaults to synapse.app.homeserver, which is suitable for non-worker mode.
  • UID, GID: the user and group id to run Synapse as. Defaults to 991, 991.
  • TZ: the timezone the container will run with. Defaults to UTC.

For more complex setups (e.g. for workers) you can also pass your args directly to synapse using run mode. For example like this:

docker run -d --name synapse \
    --mount type=volume,src=synapse-data,dst=/data \
    -p 8008:8008 \
    matrixdotorg/synapse:latest run \
    -m synapse.app.generic_worker \
    --config-path=/data/homeserver.yaml \
    --config-path=/data/generic_worker.yaml

If you do not provide -m, the value of the SYNAPSE_WORKER environment variable is used. If you do not provide at least one --config-path or -c, the value of the SYNAPSE_CONFIG_PATH environment variable is used instead.

Generating an (admin) user

After synapse is running, you may wish to create a user via register_new_matrix_user.

This requires a registration_shared_secret to be set in your config file. Synapse must be restarted to pick up this change.

You can then call the script:

docker exec -it synapse register_new_matrix_user http://localhost:8008 -c /data/homeserver.yaml --help

Remember to remove the registration_shared_secret and restart if you no-longer need it.

TLS support

The default configuration exposes a single HTTP port: http://localhost:8008. It is suitable for local testing, but for any practical use, you will either need to use a reverse proxy, or configure Synapse to expose an HTTPS port.

For documentation on using a reverse proxy, see https://github.com/matrix-org/synapse/blob/master/docs/reverse_proxy.md.

For more information on enabling TLS support in synapse itself, see https://matrix-org.github.io/synapse/latest/setup/installation.html#tls-certificates. Of course, you will need to expose the TLS port from the container with a -p argument to docker run.

Legacy dynamic configuration file support

The docker image used to support creating a dynamic configuration file based on environment variables. This is no longer supported, and an error will be raised if you try to run synapse without a config file.

It is, however, possible to generate a static configuration file based on the environment variables that were previously used. To do this, run the docker container once with the environment variables set, and migrate_config command line option. For example:

docker run -it --rm \
    --mount type=volume,src=synapse-data,dst=/data \
    -e SYNAPSE_SERVER_NAME=my.matrix.host \
    -e SYNAPSE_REPORT_STATS=yes \
    matrixdotorg/synapse:latest migrate_config

This will generate the same configuration file as the legacy mode used, and will store it in /data/homeserver.yaml. You can then use it as shown above at Running synapse.

Note that the defaults used in this configuration file may be different to those when generating a new config file with generate: for example, TLS is enabled by default in this mode. You are encouraged to inspect the generated configuration file and edit it to ensure it meets your needs.

Building the image

If you need to build the image from a Synapse checkout, use the following docker build command from the repo's root:

docker build -t matrixdotorg/synapse -f docker/Dockerfile .

You can choose to build a different docker image by changing the value of the -f flag to point to another Dockerfile.

Disabling the healthcheck

If you are using a non-standard port or tls inside docker you can disable the healthcheck whilst running the above docker run commands.

   --no-healthcheck

Disabling the healthcheck in docker-compose file

If you wish to disable the healthcheck via docker-compose, append the following to your service configuration.

  healthcheck:
    disable: true

Setting custom healthcheck on docker run

If you wish to point the healthcheck at a different port with docker command, add the following

  --health-cmd 'curl -fSs http://localhost:1234/health'

Setting the healthcheck in docker-compose file

You can add the following to set a custom healthcheck in a docker compose file. You will need docker-compose version >2.1 for this to work.

healthcheck:
  test: ["CMD", "curl", "-fSs", "http://localhost:8008/health"]
  interval: 15s
  timeout: 5s
  retries: 3
  start_period: 5s

Using jemalloc

Jemalloc is embedded in the image and will be used instead of the default allocator. You can read about jemalloc by reading the Synapse https://github.com/matrix-org/synapse/blob/HEAD/README.rst#help-synapse-is-slow-and-eats-all-my-ram-cpu.

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 synapse 镜像标签

docker pull docker.xuanyuan.run/matrixdotorg/synapse:<标签>

使用方法:

  • 登录认证方式
  • 免认证方式

DockerHub 原生拉取命令

docker pull matrixdotorg/synapse:<标签>

轩辕镜像配置手册

按平台快速找到配置文档

一键安装

一键安装 Docker

Linux Docker 一键安装

AI

用 AI 使用轩辕镜像

agents.md · AI 对话 · 提示词

Docker

登录仓库拉取

登录认证 · 私有仓库

专属域名拉取

免登录 · 高速拉取

Linux

Docker 镜像配置

Windows / Mac

Docker Desktop 配置

MacOS OrbStack

OrbStack 容器

Apple Container

macOS 原生容器

Docker Compose

Compose 项目配置

NAS

群晖

Synology 配置

飞牛

fnOS 镜像配置

绿联

绿联 NAS

威联通

QNAP 配置

极空间

极空间 NAS

Unraid

Unraid NAS

企业仓库

其他仓库

ghcr · Quay · nvcr

Harbor 镜像源

Proxy Repository 对接

Portainer 镜像源

Registries 配置

Nexus 镜像源

Docker Proxy 缓存

开发工具

Dev Containers

VS Code 开发容器

Podman

Podman 配置指南

Singularity / Apptainer

HPC 科学计算容器

Kubernetes

K8s Containerd

Kubernetes · Containerd

K3s

轻量级集群

面板 / 网络

爱快路由

爱快 4.0 · iKuai 镜像加速

宝塔面板

一键配置镜像源

需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

功能

版本功能对比

功能对比 · 版本选择

支持的镜像仓库

Docker Hub · GCR · GHCR

专属域名用法

专属域名 · 开启停用 · 多仓库

新手拉取配置

登录 · 专属域名 · 配置

docker search 限制

专属域名 · Hub 搜索

不支持 push

仅支持 pull · 不支持

拉取速度原因

带宽 · 缓存 · 冷热镜像

错误码

402 与流量用尽

402 · 流量包 · 充值

401 认证失败

401 · docker login

manifest unknown

标签错误 · 镜像不存在

410 Gone 排查

410 · Docker 升级

429 限流

免费版 · 专业版 · 企业版 · 请求频率

其他报错

DNS 超时

DNS 解析 · 网络超时

TLS 证书失败

no matching manifest(架构)

docker.sock / daemon

账号

失败是否计费

manifest · blob · 计费

申请开票(企业 / 个人)

开票 · 发票 · 工单

修改登录密码

网站 · 仓库 · 重置

注销账户

工单 · 数据 · 注销

原理

mirrors 不生效

daemon.json · 重启

去掉域名前缀

docker tag · 重命名

指定架构拉取

ARM64 · AMD64 · 多架构

latest 与「最新」

digest · 版本号 · 标签

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
matrixdotorg/synapse
定价查看流量套餐与价格
博客Docker 镜像公告与技术博客
专业版 · 高速稳定拉取镜像
高速镜像下载·在线技术支持·99.95% SLA 保障·付费会员免广告
50GB 仅 ¥8/年
专业版 · 高速稳定拉取镜像
50GB 仅 ¥8/年
高速镜像下载·在线技术支持·99.95% SLA 保障·付费会员免广告
用户协议·隐私政策·增值电信业务经营许可证:浙B2-20261007·©2024-2026 源码跳动©2024-2026 杭州源码跳动科技有限公司·商务合作:点击复制邮箱

更多 synapse 镜像推荐

vertexproject/synapse logo

vertexproject/synapse

vertexproject
Synapse情报分析平台的基础镜像
4 次收藏50万+ 次下载
3 天前更新
ovrclk/synapse logo

ovrclk/synapse

ovrclk
暂无描述
100万+ 次下载
6 年前更新
black0/synapse logo

black0/synapse

black0
这是支持多架构的Synapse镜像,Synapse是Matrix协议的参考家庭服务器实现,可在树莓派、Odroid、IBM Z等多种设备上运行,用于搭建安全的即时通讯服务。
5 次收藏5万+ 次下载
5 年前更新
realtyem/synapse logo

realtyem/synapse

realtyem
基于matrixdotorg的worker Dockerfile构建的Synapse Docker镜像,专为Unraid设计,支持通过环境变量自动生成配置文件和灵活添加多进程worker,简化Matrix家庭服务器的部署与管理。
5万+ 次下载
3 天前更新
nykma/synapse logo

nykma/synapse

nykma
该镜像提供带有S3存储后端的Matrix服务器Synapse,用于快速部署支持分布式即时通讯的Synapse实例。
1万+ 次下载
5 年前更新
vertexproject/synapse logo

vertexproject/synapse

vertexproject
Synapse情报分析平台的基础镜像
4 次收藏50万+ 次下载
3 天前更新

查看更多 synapse 相关镜像

更多相关 Docker 镜像与资源

以下是 matrixdotorg/synapse 相关的常用 Docker 镜像,适用于 不同场景 等不同场景:

  • rocketchat/rocket.chat Docker 镜像说明(Rocket.Chat 团队协作平台,适合企业即时通讯和协作)
  • library/rocket.chat Docker 镜像说明(Rocket.Chat 官方打包镜像,适合团队即时通讯与自建 Slack 替代)
  • amd64/rocket.chat Docker 镜像说明(Rocket.chat 容器镜像,适合 amd64 维护的 Rocket.chat 工作负载部署)
  • mattermost/mattermost-team-edition Docker 镜像说明(Mattermost 团队版协作消息平台,适合自建 Slack 类研发沟通)