Repository navigation
Installation
Tide is a server (Go, PostgreSQL, an S3 store called Silo) that serves the web app. The CLI is installed apart, on any machine that can reach the server.
| I want to | Go to |
|---|---|
| Try Tide on my machine, or work on its code | Try it locally |
| Run it on a server, for me or a few people | Host it |
| Use the terminal client | CLI |
| Connect an agent | Agents |
You need Go, Bun and Docker (Colima on macOS).
git clone https://github.com/cyril-fl/tide.git && cd tide
cp .env.example .env # then fill in the passwords and TIDE_SECRET (openssl rand -base64 32)
make setup # git hooks
make up # Postgres, Silo and the API in Docker, the web app on :3000Open http://localhost:3000: use localhost, not 127.0.0.1, because the API compares the origin exactly. On an empty database, the app asks you to create the first account, which becomes the admin. make down stops everything.
What make up starts:
| Service | Where |
|---|---|
| The web app | :3000 |
| The API, and its MCP |
:8080, and :8081/mcp
|
| PostgreSQL 18 | 127.0.0.1:5432 |
| Silo, the S3 store of the images |
:9000 (console :9001) |
| LibreDB Studio, to explore the database | :3001 |
Each v* tag publishes the ghcr.io/cyril-fl/tide image (amd64 and arm64). It serves the API and the web app on one address.
- On the server, put
compose.prod.yamlnext to a.envcopied from.env.prod.example, and fill in the passwords and the secret (openssl rand -base64 32for each). - Set
WEB_ORIGINto the exact address you will type in the browser, with no trailing slash: requests from any other page are refused. - Start it:
docker compose -f compose.prod.yaml up -d # start
docker compose -f compose.prod.yaml pull && docker compose -f compose.prod.yaml up -d # updateTide listens on 127.0.0.1:8080, in plain HTTP. Put Tailscale or an HTTPS proxy in front of it: the password and the session cookie must never travel in clear. The proxy must not buffer /api/events, the live changes (a stream of server-sent events); Tailscale Serve and Caddy pass it as it is.
New versions add their tables and columns at startup by themselves.
TIDE_SECRETencrypts the notes. Keep a copy in a password manager, never in a backup: without it, the notes are unreadable. See Administration.
- On an empty database, the login page leads straight to the creation of the first account, which becomes the admin.
- Or set
TIDE_HOST_NAMEandTIDE_HOST_PASSWORDin the.env: Tide creates it at startup. Empty both lines afterwards. - Or run
docker exec -it tide-api /tide-server user add <name>.
The others come from invitation links that the admin makes in Settings > Users. See Administration.
The variables of tide-server (the CLI needs none: its session comes from tide login):
| Variable | Role | Default |
|---|---|---|
POSTGRES_USER, POSTGRES_PASSWORD
|
Database credentials | |
POSTGRES_DB |
Database name | tide |
POSTGRES_HOST |
Host | localhost |
PORT |
PostgreSQL port | 5432 |
S3_ENDPOINT |
Address of Silo, without http://
|
|
S3_ACCESS_KEY, S3_SECRET_KEY
|
Silo credentials, which also create it at the first start | |
S3_BUCKET |
Bucket for images, created at first launch | |
S3_SECURE |
true to talk to Silo over HTTPS |
no |
TIDE_SECRET |
Encryption key of the notes, 32 bytes in base64 | none: required to write |
TIDE_ADD_USER_MODE |
Who creates an account: invitation or public
|
invitation |
TIDE_CLI_TOKEN_LIFETIME |
How long the token of a tide login works: 7d, 30d, 90d, 1y or never
|
90d |
TIDE_HOST_NAME, TIDE_HOST_PASSWORD
|
Create the first account at startup, then empty them | |
WEB_ORIGIN |
Origin of the web app | none |
TIDE_LISTEN, TIDE_MCP_LISTEN
|
Where the API and its MCP listen (production) |
127.0.0.1:8080, 127.0.0.1:8081
|
CONFIG_FILE |
Replaces the embedded configuration |
config/config.yaml, built into the binary |
The commands, their help texts and their flags are defined in config/config.yaml, built in at compile time: rebuild after changing it, or point CONFIG_FILE to your file.
| Symptom | Cause |
|---|---|
| Every request fails with 403 from the browser |
WEB_ORIGIN is not the exact address typed in the browser |
The login works on localhost but not on 127.0.0.1
|
Same reason: use the address WEB_ORIGIN names |
| Changes made elsewhere do not show live | The proxy buffers /api/events
|
The server container stops with address already in use
|
Port 8081 is taken: set TIDE_MCP_LISTEN in .env to another address |
| Notes are unreadable after a restore |
TIDE_SECRET is not the one the data was written with |
make backup # backups/tide-<date>.sql and the images in backups/tide-<date>.files/To restore (this replaces the whole database; the images are added to those in Silo):
docker compose exec -T postgres sh -c 'psql -U "$POSTGRES_USER" "$POSTGRES_DB"' < backups/<file>.sql
docker compose cp backups/<file>.files silo:/tmp/restore
docker compose exec silo sh -c 'mcli alias set local http://127.0.0.1:9000 "$MINIO_ROOT_USER" "$MINIO_ROOT_PASSWORD" && mcli mirror /tmp/restore local/notes'make purge erases the notes, folders, tags, images, snippets and saved searches of every account, after a backup (type purge to confirm); accounts and settings stay.
The backup holds the data encrypted: keep TIDE_SECRET apart, and restore with the same one.
Tide
Using Tide
Terminal and agents
Hosting and development