Matrix bridge for OpenAI ChatGPT. Chat with GPT-4o, GPT-4 Turbo, and more from any Matrix client.
10K+
A Matrix bridge for OpenAI ChatGPT built on the mautrix bridgev2 framework in Go.
Chat with ChatGPT models directly from any Matrix client, without leaving the messaging platform.
docker run --rm -v ./data:/data wrongname/mautrix-chatgpt
Edit data/config.yaml — set homeserver.address, homeserver.domain, and bridge.permissions.
docker run --rm -v ./data:/data wrongname/mautrix-chatgpt
Register the generated data/registration.yaml with your homeserver.
docker run -d --restart unless-stopped \
-v ./data:/data \
wrongname/mautrix-chatgpt
Or with docker compose:
services:
mautrix-chatgpt:
image: wrongname/mautrix-chatgpt:latest
restart: unless-stopped
volumes:
- ./data:/data
deploy:
resources:
limits:
memory: 512M
reservations:
memory: 128M
@chatgptbot:yourdomain.com)!chatgpt loginInvite the bot to a room and send:
!chatgpt join
ChatGPT will now respond to messages in that room.
All commands use the !chatgpt prefix (configurable).
| Command | Description |
|---|---|
login | Authenticate with your OpenAI API key |
logout | Clear stored credentials |
join [model] | Add ChatGPT to the current room |
model [name] | View or change the model for the current room |
models | List available OpenAI models |
system [prompt] | View or set the system prompt |
temperature [0-2] | Adjust response randomness |
clear | Clear conversation history |
stats | Show conversation stats and token usage |
help | Show all available commands |
Key options in config.yaml under the network section:
| Option | Default | Description |
|---|---|---|
default_model | gpt-4o | Default OpenAI model |
max_tokens | 4096 | Maximum tokens per response |
temperature | 1.0 | Response randomness (0.0 - 2.0) |
system_prompt | (empty) | Default system prompt for all conversations |
conversation_max_age_hours | 24 | Hours before context expires (0 = unlimited) |
rate_limit_per_minute | 60 | Maximum requests per user per minute |
Matrix Client → Homeserver → mautrix-chatgpt (Go) → OpenAI API
Each ChatGPT model appears as a separate ghost user in Matrix (e.g. @chatgpt_gpt_4o:yourdomain.com).
The bridge exposes a readiness endpoint at /_matrix/mau/ready on port 29350 (default).
bridge user (UID 1337)| Path | Description |
|---|---|
/data | Config, registration, and database files |
Content type
Image
Digest
sha256:9830df60b…
Size
48.2 MB
Last updated
14 days ago
docker pull wrongname/mautrix-chatgpt