• Stars
    star
    763
  • Rank 59,519 (Top 2 %)
  • Language Svelte
  • License
    MIT License
  • Created over 3 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

cryptgeon is a secure, open source note / file sharing service inspired by PrivNote written in rust & svelte.

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.
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

Development

Requirements

  • pnpm: >=6
  • node: >=18
  • 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

More Repositories

1

autorestic

Config driven, easy backup cli for restic.
Go
1,200
star
2

ora

Web Extension to monitor website usage and set limits
Svelte
36
star
3

confluence-markdown-sync

Python
35
star
4

volta

Battery Assistant
JavaScript
34
star
5

formhero

Fully customisable React form utility
TypeScript
33
star
6

canihazusername

Configurable Username Generator
TypeScript
29
star
7

docker-ddns-cloudflare

Cloudflare DDNS Script
TypeScript
28
star
8

unbrew

Brew Cleanup Utility
JavaScript
21
star
9

docker-radicale

Docker Radicale Image
Dockerfile
20
star
10

docker-nginx-static-server

static nginx server for serving static files in docker
18
star
11

docker-static

Static Server
TypeScript
16
star
12

svelte-cloudinary

Cloudinary SDK for Svelte
TypeScript
15
star
13

unpixel

Utility app for helping with the 20/20/20 rule for alleviating CVS induced stress.
TypeScript
10
star
14

morphus

a lightweight image resizing proxy
TypeScript
9
star
15

drone-deploy

Deployment Plugin for Drone
Python
7
star
16

use-light-switch

React Hook for easy dark mode integration
TypeScript
5
star
17

livestream

Dockerized nginx real time streaming with hsl and dash
HTML
4
star
18

docker-instabot

Docker container for running Instabot
Dockerfile
3
star
19

R6S

Rainbow 6 Siege Companion App
Java
3
star
20

glyphance

CLI tool for generating font subsets based on unicode ranges.
Python
3
star
21

wordpress-template

Wordpress boilerplate
PHP
3
star
22

docker-etherpad

Etherpad docker image
Dockerfile
3
star
23

markdown-it-import

Markdown-it plugin which adds the ability to include files.
TypeScript
3
star
24

fantus

Website for fantus
TypeScript
3
star
25

directus-remote-trigger

Directus module for triggering remote hooks
Vue
3
star
26

occulto

Isomorphic encryption library that works both in the browser and node.
TypeScript
2
star
27

mercatus

Telegram Market Bot with AlphaVantage
Python
2
star
28

svelte-hint

Svelte library for tooltips
Svelte
2
star
29

gitea-sync

Sync Github repos to Gitea
TypeScript
2
star
30

liquet

wordpress theme
PHP
2
star
31

advent-of-code

Advent Of Code
Python
1
star
32

docker-wordpress

Dockerfile
1
star
33

prettier

Personal prettier config
JavaScript
1
star
34

uhrwerk

Time utility
TypeScript
1
star
35

ixesha

Incremental snapshot backup utility
Python
1
star
36

mikro-orm-arp

Active Record Pattern for Mikro-ORM
TypeScript
1
star
37

koa-cookie

Koa Cookie Utility
JavaScript
1
star