Skip to content

frydzewski/stashchat-host

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@stashchat/host

The local-disk storage daemon for Talk (a group chat app where you own your data). Run this on a computer you control and your group's message history lives on your disk — no cloud account, no third party holding your data. The relay routes messages to this daemon over a WebSocket; it persists them to a local SQLite file.

Requirements

  • Node 24+ only. No npm install, no native build — the daemon uses Node's built-in node:sqlite, WebSocket, and TypeScript type-stripping.

Run

In Talk, open your group → Settings → "Run Talk Storage on your device". It shows a ready-to-paste command with your relay URL and token filled in. It looks like:

git clone https://github.com/frydzewski/stashchat-host && cd stashchat-host

# single-quote the URL — it contains a literal `$default` stage path
RELAY_WS_URL='wss://<ws-id>.execute-api.us-east-1.amazonaws.com/$default' \
DAEMON_TOKEN='<your Talk session token>' \
node src/index.ts

On success it prints daemon connected + registered. Leave it running.

Environment

Var Meaning
RELAY_WS_URL the Talk relay WebSocket URL (shown in the app)
DAEMON_TOKEN your Talk session token (shown in the app)
DB_PATH where the SQLite store lives (default ~/.stashchat/store.db) — back this up to preserve your history

Behavior

  • Persists every message/reaction/delete the relay routes to it, and serves history on request.
  • Auto-reconnects. While it's down, your group is read-only-from-cache and new messages buffer on the relay, draining to your disk when the daemon returns.
  • This daemon is your group's storage; your browser is just a normal chat client.

Images are stored too: when you send a picture in a local-storage group, the daemon downloads it to ~/.stashchat/media/<groupId>/<mediaId> — your disk holds the durable copy. (The platform keeps a temporary ~30-day serving copy so the image loads instantly; after that the daemon re-serves it on demand.)

Test

npm test   # node --test (zero deps)

Protocol

Relay→daemon frames (type-keyed): storeWrite, storeMutation, storeQuery. Daemon→relay frames (action-keyed): storeAck, storeResult, plus registerDaemon on connect. See src/protocol.ts. Kept in sync with the Talk relay.

License

MIT

About

Local-disk storage daemon for Talk — your group's chat history on your own computer (Node 24, zero deps).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors