Skip to content

ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.

1.9 KB
Raw Blame
id: matrix-synapse
name: Matrix Synapse
version: "1.98"
description: Decentralized communication server for secure, federated messaging
icon: https://serverkit.ai/imgs/template-icons/matrix-synapse.svg
website: https://matrix.org
documentation: https://matrix-org.github.io/synapse/latest/
categories:
  - collaboration
  - chat
  - federation

variables:
  - name: HTTP_PORT
    description: HTTP port
    type: port
    default: "8008"
    hidden: true
  - name: SERVER_NAME
    description: Server name (your domain, e.g., matrix.example.com)
    required: true
  - name: DB_PASSWORD
    description: PostgreSQL password
    type: password
    generate: password

ports:
  - port: 8008
    protocol: tcp
    description: Client-server API
  - port: 8448
    protocol: tcp
    description: Federation API

volumes:
  - name: data
    path: /data
    description: Synapse data

requirements:
  memory: 2GB
  storage: 10GB

compose:
  services:
    synapse:
      image: matrixdotorg/synapse:v${VERSION:-1.98.0}
      container_name: ${APP_NAME}
      restart: unless-stopped
      environment:
        - SYNAPSE_SERVER_NAME=${SERVER_NAME}
        - SYNAPSE_REPORT_STATS=no
      volumes:
        - synapse_data:/data
      ports:
        - "${HTTP_PORT}:8008"
        - "8448:8448"
      depends_on:
        - postgres

    postgres:
      image: postgres:15-alpine
      container_name: ${APP_NAME}-db
      restart: unless-stopped
      environment:
        - POSTGRES_USER=synapse
        - POSTGRES_PASSWORD=${DB_PASSWORD}
        - POSTGRES_DB=synapse
        - POSTGRES_INITDB_ARGS=--encoding=UTF-8 --lc-collate=C --lc-ctype=C
      volumes:
        - synapse_db:/var/lib/postgresql/data

  volumes:
    synapse_data:
    synapse_db:

post_install: |
  # Generate initial config
  docker run -it --rm \
    -v synapse_data:/data \
    -e SYNAPSE_SERVER_NAME=${SERVER_NAME} \
    -e SYNAPSE_REPORT_STATS=no \
    matrixdotorg/synapse:v${VERSION:-1.98.0} generate