Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Yet another pastebin

License

NotificationsYou must be signed in to change notification settings

rhee876527/chiyogami

Repository files navigation

Chiyogami is a sleek, modern pastebin with encryption, customizable expiry, private pastes, user accounts and an API for developers.

Screenshots:

screen-1screen-2screen-3

Features

  • ✔ Beautiful & Responsive UI — Built with TailwindCSS & DaisyUI for a clean and modern look.
  • 🖍 Syntax Highlighting — Automatic formatting with HighlightJS.
  • 📝 Markdown Rendering — Automatic formatting with Marked.
  • ⏳ Configurable Expiry — Set custom expiration times with API.
  • 🔒 Secure & Private — Client-side encryption with WebCrypto API for encrypted pastes. No password saved in server.
  • 📡 Powerful API — Create and fetch pastes without leaving the terminal.
  • 🔍 Public Pastes — List & search all public pastes.
  • 🔑 Private Pastes — Only accessible via a unique, unguessable link for enhanced privacy (use encryption on web UI for ultimate privacy).
  • 🗄 Local Storage — Uses SQLite for a lightweight, self-hostable database.
  • 👤 User Accounts — Create & manage your pastes with authentication.
  • 🔗 Easy Sharing — Share paste links or scan a QR code for instant access.
  • 🛡 Built-in Rate Limiting — Protects against spam and abuse with smart request throttling.
  • 🐳 Easy self-host with docker.

Installation

Docker. Build it or checkdocker-compose file for example with pre-built images.

Quick run

 docker run -d \  -v "$(pwd)/pastes:/pastes" \  -p 127.0.0.1:8000:8000 \  --restart unless-stopped \  ghcr.io/rhee876527/chiyogami:latest

Environment variables

EnvDefault valueNote
SECRET_KEYNoneSession key. Keep secure and unique. Recommended example: openssl rand -base64 32.
PASTE_DEFAULT_EXPIRATION24hValid time units are “ns”, “us” (or “µs”), “ms”, “s”, “m”, “h” or"Never"
MAX_CHAR_CONTENT50000Maximum characters allowed in content body. Larger limits may offer reduced performance
DISABLE_RATE_LIMITNoneUse1 to disable rate limit
CREATE_PER_MIN10No of paste creation, register, login, delete account & delete paste requests allowed per minute
DATABASE_PATHNoneFor local development use. Conflicts with docker volume paths.
DELETE_RETENTION90Number of days to keep soft-deleted pastes. Valid values:1-99

Note about exposing /health to public

Since v1.4.3 thishealthcheck endpoint was created to actively monitor state of application's database. It has potential for abuse WHEN exposed publicly. Caution is hereby given to protect endpoint (http://localhost:8000/health) from external access as necessary.

If usingTraefik as reverse proxy this can be done in thedocker-compose file by adding the following middleware:

...services:  chiyogami:    labels:      - "traefik.http.routers.chiyogami.middlewares=localonly-health"      - "traefik.http.middlewares.localonly-health.replacepathregex.regex=^/health$"      - "traefik.http.middlewares.localonly-health.replacepathregex.replacement=/nonexistent-path"...

Usage

Web UI is simple & straightforward. Or use theAPI.

Create paste

FILE

curl http://localhost:8000/paste -T sample.txt

orJSON

curl -X POST \  http://localhost:8000/paste \  -H 'Content-Type: application/json' \  -d '{"content":"Test paste"}'

response:{"title":"OkxI"}

Note: Pastes are created by default withPublicvisibility. They can be accessed from api or website.Change this toPrivate orUnlisted to make the paste undiscoverable. Pastes are also set to expire within 24hrs if expiry is not specified.

You can set a default expiry for new pastes withPASTE_DEFAULT_EXPIRATION.

Create private paste with 48h expiry

curl -X POST \  http://localhost:8000/paste \  -H 'Content-Type: application/json' \  -d '{"content":"Test", "visibility":"Private", "expiration":"48h"}'

response:{"title":"euVa"}

Fetch created paste

curl -X GET http://localhost:8000/paste/bZTR -H "Accept: application/json"

response:{"ID":22,"CreatedAt":"2025-02-04T19:48:06.747679947Z","UpdatedAt":"2025-02-04T19:48:06.747679947Z","DeletedAt":null,"Title":"bZTR","Content":"test private","Visibility":"Private","Expiration":"2025-02-05T19:48:06.747635027Z","IsEncrypted":false,"UserID":0,"IsUserPaste":false}

Create user account

curl -X POST \  http://localhost:8000/register \  -H 'Content-Type: application/json' \  -d '{"username":"test", "password":"test"}'

response:{"message":"User registered successfully"}

Delete owner paste using session (from cookies)

curl -X DELETE http://localhost:8000/paste/EIKq \-b "session=MTczNzA2NDI5NXxEWDhFQVFMX2dBQUJFQUVRQUFBZl80QUFBUVp6ZEhKcGJtY01DUUFIZFhObGNsOXBaQVIxYVc1MEJnSUFEQT09fLnhi2OxsN6coY5ZmmBeA0tPXUcsKiii6ECOoJ7yrqNC"

response:{"message":"Paste deleted successfully"}

COPYRIGHT

This software is free to use in accordance with thelicense.


[8]ページ先頭

©2009-2025 Movatter.jp