Channels, threads, search and file uploads for a few people are a weekend of code, and Zulip and Mattermost already exist as ready-made servers. That's not what Slack Pro sells. You pay because everybody you work with is already in it: clients and partners in shared channels, thousands of apps posting into your channels, and push notifications that arrive on every phone. A home-built chat has none of those and carries the burden of running a server your team depends on. Build one only for a group of a dozen who all agree to move.
Before you buildSlack Free shows the last 90 days of messages with 10 integrations. For a small group that talks about today's work, that may already be enough.
Build me a small self-hosted team chat to replace Slack Pro for a group of up to ten people. Requirements:
- Node.js 22 + TypeScript: a Fastify server with `@fastify/websocket`, and a React UI built with
Vite. `npm start` serves http://localhost:4880; PUBLIC_URL in .env is the address people open.
- Storage: better-sqlite3 in ./data/chat.db with an FTS5 index on messages; uploads go to
./data/files/. Tables: users, channels (public or private), memberships, messages (thread parent,
edited_at, deleted_at), reactions, read markers and invite tokens.
- Accounts only for people you invite: an admin creates an invite link (random token stored
hashed, expires in 7 days); passwords hashed with `@node-rs/argon2`; sessions in an httpOnly cookie.
- Chat: public and private channels, direct messages, threads, edit and delete, emoji reactions,
@mentions with an unread badge, and drag-and-drop uploads up to 25 MB with image previews.
- Search: SQLite FTS5 with filters for channel, person and date, limited to channels the user is in.
- Webhooks: one incoming URL per channel (a secret token) that accepts JSON `{text}`, so
GitHub Actions or a cron job can post. Rate-limit per token.
- Notifications: web push with `web-push` for mentions and direct messages, and an email digest
through nodemailer SMTP for anything unread after 30 minutes.
- Tests with vitest for membership checks: a user must never read a private channel's messages
through search, history or a websocket subscription.
- No telemetry. Out of scope: shared channels with other companies, huddles and video, apps
directory, mobile apps, end-to-end encryption, message retention rules.
- README: running behind Caddy for HTTPS, backing up ./data, and a warning that this is only worth
it if everyone on the team agrees to move.Opens your agent with the prompt filled in, you press enter. Or copy it and paste it into an empty folder.
The first prompt builds the core. Run these one at a time in the same folder to grow it into your own Slack Pro.
Add a Slack import to the chat server in this folder. Requirements: - A command `chat import-slack <export.zip>` that reads the JSON files Slack's export produces for public channels: users.json, channels.json and one folder of daily files per channel. - Create channels and placeholder users for names in the export, keep the original timestamps and thread links, and turn Slack mentions into the new mention format. - Keep file links as plain links with a note that the files were not exported. - Run in dry-run mode by default, print the counts, and only write with --apply. - Update the README, including what a Pro export does not contain.
Add slash commands to the chat server in this folder. Requirements:
- Admins register a command (name and target URL) in a settings page; when a user types
/name args, the server POSTs JSON with the user, channel and text, signed with an HMAC header.
- The target may answer with `{text, ephemeral}`; show ephemeral replies only to the caller.
- Time out after 3 seconds with a visible error, and log each call.
- Update the README with a 20-line example bot.Add retention rules to the chat server in this folder. Requirements: - Per channel, an admin sets "keep forever" or "delete after N days"; a nightly job removes expired messages, their reactions and uploads, and rebuilds the FTS5 index entries. - Show the rule at the top of the channel so nobody is surprised. - A dry-run command prints what would be deleted. - Update the README.
A team chat is only useful if everyone is in it, and in many companies and communities everyone already is. Add the integrations that post alerts, tickets and deploys into channels, and a free tier that hides everything older than 90 days, and the $8.75 is cheap next to the cost of moving a whole team.
Estimate · A small VPS, a domain and SMTP at low volume. Ten Slack Pro seats on monthly billing come to $87.50 a month, so it saves money only for larger groups, not for time spent on upkeep. The build is token usage on your agent plan.
| Plan | Monthly | Annual, per month | What you get |
|---|---|---|---|
| Free | $0/user | $0/user | 90 days of visible message history, 10 integrations, one-to-one huddles and external messages, one workspace; data is deleted after 1 year. |
| Pro | $8.75/user | $7.25/user | Unlimited history, unlimited integrations, group huddles, group Slack Connect, canvases, lists, Workflow Builder, thread and huddle summaries, access logs, Google sign-in. |
| Business+ | $18/user | $15/user | Adds SAML sign-on, SCIM, data residency, full workspace exports by application, Slackbot, AI search and daily recaps, conditional workflows, 4-hour first response. |
| Enterprise+ | — | $45/user | Multiple workspaces, legal holds, audit logs, discovery API, information barriers, data loss prevention, HIPAA support. |
Free keeps 90 days of message history, 10 app integrations and one-to-one huddles and Slack Connect.
Not really. A team chat is only useful if everyone is in it, and in many companies and communities everyone already is. Add the integrations that post alerts, tickets and deploys into channels, and a free tier that hides everything older than 90 days, and the $8.75 is cheap next to the cost of moving a whole team. The prompt on this page builds the closest honest substitute.
About $8.75 a month on the Pro plan per seat, $105 a year (checked 2026-10-19).
Shared channels with clients and partners who already use Slack; The App Directory of more than 2,600 integrations and Workflow Builder; Reliable mobile push, huddles and screen sharing; Canvases, lists, thread summaries and huddle notes; A vendor that keeps the service up and patched. If any of those matter to you, keep paying.
Yes: Zulip (open source), Mattermost (open source), Rocket.Chat (open source).