A team chat that you host v1.2.0

Rooms for your team. On a server that is yours.

Clowder is a web application where a team talks in rooms. A room is a feed of posts with the comments under them, and its tasks are the cards of a Kanban board. Private messages and video calls are in the same program. It is one Go binary with an SQLite database, and nobody joins without an invitation.

Install it GitHub

The room general: the box for a new post, a post by Bob with a table and a tag, and the list of the members The tasks, the tag and the reactions of a post and, under them, comments that answer each other at three depths The board of the room general with the columns To do, In progress and Done, and cards with assignees and due dates A group conversation named Launch crew, with a reply that quotes a message, a reaction and the panel of its members A direct conversation with Bob and a video call beside it, with buttons for the microphone, the camera, the screen, the devices and to hang up The search page with the query #design and three posts that carry the tag The room general in the dark theme

A room is a feed of posts. What one person posts appears for everyone who looks at the room.

The conversation about a post happens in the comments under it, and a comment can be answered in turn.

The tasks that people write in posts and comments are the cards of the room’s board.

Private messages, one to one or in a small group, with replies, reactions and attachments.

A video call from a direct conversation. The green picture is the test camera of the browser that took the screenshot.

Search over posts, comments, attachment names and task titles, in every room the person can read.

A light and a dark palette. Each person chooses System, Light or Dark.

3.4 ms

or less for the page of a room’s feed, in the busiest room of 100,000 posts and comments

32 ms

for a search with words and two tags over the same 100,000

25 ms

until a new post is in 200 open pages of its room, at the 95th percentile

110 MiB

of memory for an idle server with 200 open pages

  • One program

    CGO_ENABLED=0 go build makes one binary with the templates, the stylesheet and the scripts inside it. At run time it needs only its data directory: an SQLite database and the folder of the attachments.

  • By invitation only

    An admin makes invitation links that work once, and the command line makes the first one. There is no email: you hand the link over yourself, and a forgotten password is a reset link from an admin.

  • Live

    The pages are rendered on the server and kept live over server-sent events. Feeds, threads, reactions, boards and unread counts change for everyone who looks at them.

Nobody joins without an invitation

Nobody can sign up alone, and the first admin has no one to invite them, so the command line makes the first link. From then on admins make links for members and other admins in the Admin page.

  • A link works once and expires after 7 days
  • The person chooses a username, a display name and a password of at least 12 characters
  • clowder reset-password -user alice prints a reset link that works once, for 24 hours
  • Five failed logins in 15 minutes block the username or the address
# Build it. No C compiler is needed
$ CGO_ENABLED=0 go build -o clowder ./cmd/clowder
# The link of the first admin
$ ./clowder invite -admin -base-url https://chat.example.org
https://chat.example.org/invite/<token>
expires <the time, 7 days from now>
# Serve it behind your TLS reverse proxy
$ ./clowder serve -data /var/lib/clowder -addr 127.0.0.1:8080
# Later, for somebody who forgot the password
$ ./clowder reset-password -user alice

What a team does in it

All of it is in release 1.2. The pictures show the data that clowder demo makes.

Posts

Markdown, files, tags and tasks in one post

A post has a body in plain text or markdown, attachments, tags and tasks. Fenced code is highlighted by its language, and images are shown inline.

  • Attachments up to a size that you set, 25 MiB by default, on the local disk
  • Only the people who can read the room can download its files
  • Reactions with emoji on posts and comments
  • Authors edit and delete their own, and admins delete any
A post by Alice with a checklist, a link, an image, the attachment notes.txt, a task with its assignees and due date, two tags and two reactions

Threads

The conversation stays under its post

Comments answer a post and comments answer comments, to any depth. A comment has everything a post has, also tasks.

  • @username, @room and @here notify people, and so do the keywords that a person chose
  • You follow a post when you write it, comment under it or are mentioned in it
  • The bell counts live, and the feed marks what is new since your last visit
Comments by Bob, Carol and Alice under a post, each one indented under the comment it answers

Board

The tasks of a room are its Kanban board

A task is written in a post or a comment, with assignees and a due date. The board of the room shows every task as a card that opens its post.

  • Cards move between columns by drag and drop
  • Members add, rename, reorder and remove columns
  • A task that is assigned to you is a notification
Six cards in the columns To do, In progress and Done, with the initials of the assignees and the due dates

Private messages

One to one, or in a small group

People write to each other outside the rooms, with replies, reactions, attachments, editing, deleting and read state. The Messages page searches the messages of your own conversations.

  • An admin also finds only the conversations that the admin is in
  • Each group conversation has notification preferences of its own, and can be muted
The group conversation Launch crew with messages of Alice and Bob and, at the side, the members and the name of the group

Calls

Video and audio, through your own server

The two people of a direct conversation call each other with video or audio and share a screen. The browsers talk WebRTC to the Clowder server, which forwards the media to the other person. So a call works through any NAT that the server can be reached through, and no STUN or TURN server is needed.

  • One port number, for UDP and for TCP, that you open in the firewall
  • A call that nobody answers in 45 seconds becomes a missed call
  • Nothing is recorded
  • The server sees the media: a call is not end-to-end encrypted
A video call with Bob that has run for three seconds, beside the messages of the conversation

Sign-in

A second factor from your SSH key

A person who registered an SSH key fetches a one-time code with ssh and types it after the password. The SSH server of Clowder only gives codes: it accepts public keys only, and has no shell, no forwarding and no other command.

  • A code works once
  • A person gets at most 10 codes in 15 minutes
  • It is off until you start Clowder with -ssh-addr
# The settings page shows the exact command.
$ ssh -p 2222 alice@chat.example.org
Your Clowder sign-in code: K7QF-9MZP (valid for 60 seconds)

# The same as JSON.
$ ssh -p 2222 alice@chat.example.org json
{"code":"<code>","expires_at":"2026-10-28T04:11:35Z"}

Phones

Made for phones too

Every page works from 360 px wide, and the list of the rooms becomes a menu. The browser can install Clowder as an app that opens in a window of its own, with the same server and the same login.

Three pages at the width of a phone: the feed of a room, its board and a group conversation

For the person who runs it

A team needs one process and one directory. The rest is there for the installations that want it.

  • SQLite or PostgreSQL

    SQLite needs nothing else. With -database-url Clowder uses PostgreSQL 16 or later instead.

  • Docker

    compose.yaml runs Clowder and PostgreSQL 18. The image is a static binary on a distroless base, and its user is not root.

  • Several processes

    With PostgreSQL and Redis, several processes serve one database behind a load balancer. No sticky sessions are needed.

  • Backup and restore

    clowder backup writes one archive while the server runs. clowder restore checks each file against the SHA-256 of the manifest.

  • Metrics

    -metrics-addr serves metrics for Prometheus on a listener of its own. No label carries a user, an ID or a room name.

  • Behind your proxy

    Clowder speaks plain HTTP. The README has the configuration of Caddy and of nginx that keeps the live streams open.

  • Upgrades

    Start the new binary on the same data directory. It migrates the database when it starts.

  • Reviewed

    Each release has a security review that is written down, in docs/SECURITY.md.

Measured on 100,000 posts and comments

clowder demo -size large makes the data set: 200 users, 100 rooms, 100,000 posts and comments and 20,000 tasks. The targets are the ones of the specification.

WhatTargetMeasured
The feed page of a room, 30 postsunder 50 ms2.8 to 3.4 ms in the busiest room
A search with words and two tagsunder 100 ms31 to 32 ms
The same with a very common wordunder 100 ms66 to 72 ms
A new post reaching 200 open streams of its roomunder 200 msp50 20.0 ms, p95 25.2 ms
Memory of an idle server with 200 open streamsunder 150 MB110.2 MiB

On SQLite, on an AMD Ryzen AI Max+ 395 with Fedora 44. The server and the load generator ran on the same machine, so a network adds its own time. The method, the commands and the numbers on PostgreSQL are in docs/PERFORMANCE.md.

An API for the clients you write

Everything a person does in the pages can also be done through a JSON API under /api/v1, and the live changes of the pages arrive over a WebSocket at /api/v1/ws. The API calls the same code as the pages, so every rule is the same.

  • An OpenAPI 3.1 document at /api/v1/openapi.json. A test keeps it equal to the routes
  • A token is a session that the user sees and ends in the settings
  • clowder-apicheck runs a whole session against a server and prints every request and answer
BASE=http://localhost:8080/api/v1

# Log in and keep the token.
TOKEN=$(curl -s $BASE/auth/login \
  -H 'Content-Type: application/json' \
  -d '{"username": "alice", "password": "demo-password-1234",
       "client_name": "curl on my laptop"}' | jq -r .token)
AUTH="Authorization: Bearer $TOKEN"

# Who am I, and which rooms can I see?
curl -s -H "$AUTH" $BASE/me
curl -s -H "$AUTH" $BASE/rooms | jq '.rooms[] | {id, name, is_member}'

# Comment, react, and edit.
curl -s -H "$AUTH" -H 'Content-Type: application/json' \
  -X POST $BASE/posts/12/comments -d '{"body": "Thanks!"}'
curl -s -H "$AUTH" -X PUT "$BASE/posts/12/reactions/%F0%9F%91%8D"

Errors that say which way they came

Every error in Clowder is made with my errors package, and its tests check the route that an error took.

What Clowder does not do

Better to read it here than to find it out.

  • There is no email of any kind. An admin hands over the invitation links and the password reset links.
  • Calls are for the two people of a direct conversation. There are no calls in group conversations or rooms.
  • No end-to-end encryption. The server keeps the messages and forwards the media of a call.
  • No single sign-on, passkeys or TOTP. The SSH sign-in code is the second factor.
  • No bots, webhooks or API keys. The API is for clients that act as a user who logged in.
  • The installed app does not work offline, and no notification arrives while no Clowder page is open.
  • No tool moves an SQLite installation to PostgreSQL. A downgrade is a restore of the backup.
  • Linux on amd64 and arm64 is what is tested.

Under the hood#

A room is a feed of posts, and the conversation about a post happens in the comments under it. Posts and comments carry text or markdown, attachments, tags and tasks, and the tasks of a room are the cards of its Kanban board.

People also write private messages to each other, one to one or in small groups, and call each other with video or audio. Nobody joins without an invitation, and there is no email.

Clowder is one program with an SQLite database (or PostgreSQL) and a directory of attachments. The driver of SQLite is written in Go, so the build needs no C compiler. The pages are rendered on the server and kept live over server-sent events, one stream for each open page.

A REST API and a WebSocket let a desktop client do the same. They call the same code as the pages, so a private room is 404 to anyone who is not in it, in the pages and in the API.

The media of a call goes through a small forwarding server made with pion, inside the same process.

Kind
Tool
Language
Go
License
BSD-3-Clause
Version
v1.2.0

Look at it with the demo data

You need Go 1.27 or later, and no C compiler. The demo has four users, admin, alice, bob and carol, all with the password demo-password-1234. Do not leave it on a server that others can reach.

Source on GitHub

# Get the source and build it
$ git clone https://github.com/rm4n0s/clowder
$ cd clowder
$ CGO_ENABLED=0 go build -o clowder ./cmd/clowder
# Fill an empty directory with the demo
$ ./clowder demo -data /tmp/clowder-demo
# Serve it, and open http://localhost:8080
$ ./clowder serve -data /tmp/clowder-demo