Write together

Run notesy-server with Docker, and write in the same notes at once with your team: live carets, history by author, and readers, editors and admins.

Run the server

One Docker image, toyz/notesy-server, keeping everything in /data.

compose.yaml

services:
  notesy:
    image: toyz/notesy-server:beta
    restart: unless-stopped
    ports:
      - "8080:8080"
    volumes:
      - notesy-data:/data
    environment:
      # What notesy shows the server as.
      NOTESY_NAME: "Acme"
      # Where people reach it, for the links in invites.
      NOTESY_URL: "https://notes.example.com"
      # NOTESY_SIGN_IN_WITH: "email"
      # NOTESY_PASSWORD_MIN: "12"
      # NOTESY_FILE_MB: "50"

volumes:
  notesy-data:

docker run

docker run -d --name notesy --restart unless-stopped \
  -p 8080:8080 -v notesy-data:/data \
  -e NOTESY_NAME="Acme" \
  -e NOTESY_URL="https://notes.example.com" \
  toyz/notesy-server:beta

Set it up

docker compose up -d
# The setup code, printed the first time it starts:
docker compose logs notesy | grep "Setup code"
# The setup code, printed the first time it starts:
docker logs notesy | grep "Setup code"

Bring people in

# A vault, and you its admin:
docker compose exec notesy notesy-server vault add Team --owner helba
docker compose exec notesy notesy-server vault list

# A link to send: one person, for a week, as an editor.
docker compose exec notesy notesy-server invite add <vault id> --role editor

# Who's in it, and as what:
docker compose exec notesy notesy-server member set <vault id> ana reader
docker compose exec notesy notesy-server member list <vault id>

# A lost laptop, signed out:
docker compose exec notesy notesy-server device list
docker compose exec notesy notesy-server device revoke <device id>
docker exec notesy notesy-server vault add Team --owner helba
docker exec notesy notesy-server invite add <vault id> --role editor
docker exec notesy notesy-server member list <vault id>
docker exec notesy notesy-server device revoke <device id>

Who may do what

  • reader: Reads. Notes open only to read.
  • commenter: Reads; comments are on their way.
  • editor: Writes, live, with everyone else.
  • admin: Writes, and invites people to the vault.

Configure it

  • NOTESY_NAME: What notesy shows the server as. Unset: notesy.
  • NOTESY_URL: Where people reach it, like https://notes.example.com: the start of every invite link. Unset: the address a request came to.
  • NOTESY_DATA: Where everything is kept: back this folder up and you've backed up the server. Unset: /data.
  • NOTESY_ADDR: Where it listens inside the container. Unset: 0.0.0.0:8080.
  • NOTESY_AUTH: The ways in it offers, of password, invite and token. Unset: password,invite,token.
  • NOTESY_SIGN_IN_WITH: email, to have people go by their email address; notesy labels and checks the field to match. Unset: a name.
  • NOTESY_PASSWORD_MIN: The shortest password a new person may pick. Unset: no minimum.
  • NOTESY_FILE_MB: The most one picture may be, in MB. Unset: no limit.
  • NOTESY_VAULT_MB: The most a vault's pictures may be in all, in MB. Unset: no limit.

Behind HTTPS

Caddyfile

# Caddy gets the certificate, and passes the live
# connection's WebSocket through by itself.
notes.example.com {
    reverse_proxy localhost:8080
}

nginx

map $http_upgrade $connection_upgrade {
    default upgrade;
    ""      close;
}

server {
    server_name notes.example.com;
    listen 443 ssl;
    # ssl_certificate and ssl_certificate_key as you have them

    # Pictures can be big; set this to NOTESY_FILE_MB or more.
    client_max_body_size 100m;

    location / {
        proxy_pass http://127.0.0.1:8080;
        proxy_http_version 1.1;
        # The live connection is a WebSocket: without these, notes
        # still sync, but nobody writes in them live.
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-Proto $scheme;
        # A machine waits up to 25 seconds for changes.
        proxy_read_timeout 60s;
    }
}

What's in the beta

  • Several people in one note at once, each with their own caret and name
  • Undo that takes back only what you typed
  • Pictures, the room for them kept before they arrive
  • History by who wrote each version
  • Writing offline, sent when the server's back
  • Readers, editors and admins, by vault

Not yet:

  • Boards and drawings written in live: for now they're kept whole
  • PDFs, audio and video in a remote vault
  • Files kept in S3
  • Single sign-on
  • Reading a page in a browser