cryptgeon is a secure, open source note / file sharing service inspired by PrivNote written in rust & svelte.
Go to file
Nicco b60a079bbe
Merge pull request #140 from elfakyn/main
Fix typos in english localization
2024-08-27 00:23:28 +02:00
.github update dependencies 2024-03-03 01:50:52 +01:00
design Completed the Chinese translation of README 2022-07-08 16:18:12 +08:00
examples move dev ports 2023-01-13 19:36:26 +01:00
packages Merge branch 'main' into main 2024-08-27 00:10:44 +02:00
test change entry point for cli test 2024-03-03 01:35:17 +01:00
.dev.env testing 2022-11-14 15:55:49 +01:00
.dockerignore CLI (#84) 2023-05-14 13:52:47 +02:00
.gitattributes Testing (#44) 2022-07-19 21:55:05 +02:00
.gitignore maintenance 2024-08-22 18:40:56 +02:00
.nvmrc update node and playwright 2024-08-23 11:02:30 +02:00
CHANGELOG.md update packages 2023-11-01 15:26:20 +01:00
cryptgeon.code-workspace update pnpm version 2023-05-25 18:15:18 +02:00
Cryptgeon.postman_collection.json update postman collection 2023-06-23 10:16:13 +02:00
docker-compose.dev.yaml maintenance 2024-08-22 18:40:56 +02:00
docker-compose.yaml maintenance 2024-08-22 18:40:56 +02:00
Dockerfile update node and playwright 2024-08-23 11:02:30 +02:00
LICENSE Create LICENSE 2021-05-02 12:13:13 +02:00
package.json update node and playwright 2024-08-23 11:02:30 +02:00
playwright.config.ts update node and playwright 2024-08-23 11:02:30 +02:00
pnpm-lock.yaml update node and playwright 2024-08-23 11:02:30 +02:00
pnpm-workspace.yaml restructuring (#56) 2022-10-07 21:28:25 +02:00
README_ES.md Create README_ES.md 2023-07-09 14:05:59 -05:00
README_zh-CN.md Add README_ES.md 2023-07-09 14:09:10 -05:00
README.md update node and playwright 2024-08-23 11:02:30 +02:00
SECURITY.md security reporting 2022-09-10 13:13:09 +02:00
version.mjs CLI (#84) 2023-05-14 13:52:47 +02:00

logo

discord docker pulls Docker image size badge Latest version



Cryptgeon - Securely share self-destructing notes | Product Hunt

EN | 简体中文 | ES

About?

cryptgeon is a secure, open source sharing note or file service inspired by PrivNote. It includes a server, a web page and a CLI client.

🌍 If you want to translate the project feel free to reach out to me.

Thanks to Lokalise for providing free access to their platform.

Live Service / Demo

Web

Check out the live service / demo and see for yourself cryptgeon.org

CLI

npx cryptgeon send text "This is a secret note"

For more documentation about the CLI see the readme.

Features

  • send text or files
  • server cannot decrypt contents due to client side encryption
  • view or time constraints
  • in memory, no persistence
  • obligatory dark mode support

How does it work?

each note has a generated id (256bit) and key 256(bit). The id is used to save & retrieve the note. the note is then encrypted with aes in gcm mode on the client side with the key and then sent to the server. data is stored in memory and never persisted to disk. the server never sees the encryption key and cannot decrypt the contents of the notes even if it tried to.

Screenshot

screenshot

Environment Variables

Variable Default Description
REDIS redis://redis/ Redis URL to connect to. According to format
SIZE_LIMIT 1 KiB Max size for body. Accepted values according to byte-unit.
512 MiB is the maximum allowed.
The frontend will show that number including the ~35% encoding overhead.
MAX_VIEWS 100 Maximal number of views.
MAX_EXPIRATION 360 Maximal expiration in minutes.
ALLOW_ADVANCED true Allow custom configuration. If set to false all notes will be one view only.
ALLOW_FILES true Allow uploading files. If set to false, users will only be allowed to create text notes.
THEME_NEW_NOTE_NOTICE true Show the message about how notes are stored in the memory and may be evicted after creating a new note. Defaults to true.
ID_LENGTH 32 Set the size of the note id in bytes. By default this is 32 bytes. This is useful for reducing link size. This setting does not affect encryption strength.
VERBOSITY warn Verbosity level for the backend. Possible values are: error, warn, info, debug, trace
THEME_IMAGE "" Custom image for replacing the logo. Must be publicly reachable
THEME_TEXT "" Custom text for replacing the description below the logo
THEME_PAGE_TITLE "" Custom text the page title
THEME_FAVICON "" Custom url for the favicon. Must be publicly reachable

Deployment

https is required otherwise browsers will not support the cryptographic functions.

There is a health endpoint available at /api/health/. It returns either 200 or 503.

Docker

Docker is the easiest way. There is the official image here.

# docker-compose.yml

version: '3.8'

services:
  redis:
    image: redis:7-alpine
    # Set a size limit. See link below on how to customise.
    # https://redis.io/docs/manual/eviction/
    # command: redis-server --maxmemory 1gb --maxmemory-policy allkeys-lru

  app:
    image: cupcakearmy/cryptgeon:latest
    depends_on:
      - redis
    environment:
      # Size limit for a single note.
      SIZE_LIMIT: 4 MiB
    ports:
      - 80:8000

    # Optional health checks
    # healthcheck:
    #   test: ["CMD", "curl", "--fail", "http://127.0.0.1:8000/api/live/"]
    #   interval: 1m
    #   timeout: 3s
    #   retries: 2
    #   start_period: 5s

NGINX Proxy

See the examples/nginx folder. There an example with a simple proxy, and one with https. You need to specify the server names and certificates.

Traefik 2

See the examples/traefik folder.

Scratch

See the examples/scratch folder. There you'll find a guide how to setup a server and install cryptgeon from scratch.

Synology

There is a guide you can follow.

YouTube Guides

Written Guides

Development

Requirements

  • pnpm: >=9
  • node: >=22
  • rust: edition 2021

Install

pnpm install

# Also you need cargo watch if you don't already have it installed.
# https://lib.rs/crates/cargo-watch
cargo install cargo-watch

Run

Make sure you have docker running.

pnpm run dev

Running pnpm run dev in the root folder will start the following things:

  • redis docker container
  • rust backend
  • client
  • cli

You can see the app under localhost:1234.

There is a Postman collection with some example requests available in the repo

Tests

Tests are end to end tests written with Playwright.

pnpm run test:prepare

# Use the test or test:local script. The local version only runs in one browser for quicker development.
pnpm run test:local

Security

Please refer to the security section here.


Attributions