No description
  • Rust 64%
  • Svelte 29.8%
  • TypeScript 4%
  • CSS 1.2%
  • Dockerfile 0.5%
  • Other 0.4%
Find a file
Miles 6ea0f3b2bb
All checks were successful
CI Test and Lint / Rust Format (push) Successful in 28s
CI Test and Lint / Frontend Lint (push) Successful in 33s
CI Test and Lint / Frontend Unit Tests (push) Successful in 21s
CI Test and Lint / Rust Clippy (push) Successful in 2m30s
CI Test and Lint / Rust Clippy (features) (push) Successful in 1m34s
CI Test and Lint / Check feature (clamav) (push) Successful in 1m6s
CI Test and Lint / Check feature (toxicity) (push) Successful in 1m10s
CI Test and Lint / Rust Clippy (all features + video) (push) Successful in 4m4s
CI Test and Lint / Check feature (nsfw) (push) Successful in 2m9s
CI Test and Lint / Check feature (url-intel) (push) Successful in 45s
CI Test and Lint / Rust Tests (push) Successful in 7m57s
CI Test and Lint / Cargo Audit (push) Successful in 3m12s
CI Test and Lint / Check feature (yara) (push) Successful in 3m27s
fix audit
2026-04-27 12:36:43 -05:00
.cargo start work on splitting binks-cli 2026-04-07 20:12:16 -05:00
.forgejo/workflows remove cargo publishing from CD 2026-04-08 15:26:59 -05:00
frontend bump ver 2026-04-27 12:12:53 -05:00
models add moderation models 2026-04-04 13:21:58 -05:00
src allow admin restriction bypass & update deps/bump ver 2026-04-27 12:11:16 -05:00
tests remove binks-cli 2026-04-07 20:22:52 -05:00
.dockerignore remove binks-cli 2026-04-07 20:22:52 -05:00
.env.example improve docker/cd 2026-04-04 13:42:45 -05:00
.gitattributes add moderation models 2026-04-04 13:21:58 -05:00
.gitignore remove binks-cli 2026-04-07 20:22:52 -05:00
audit.toml fix audit 2026-04-04 10:00:05 -05:00
build.rs oops fix build.rs for ci 2026-04-07 20:29:14 -05:00
Cargo.lock fix audit 2026-04-27 12:36:43 -05:00
Cargo.toml fix audit 2026-04-27 12:36:43 -05:00
Cross.toml add cross for osx 2025-09-20 23:50:33 -05:00
docker-compose.full.yml Revert "fix clamav" 2026-04-05 03:31:43 -05:00
docker-compose.yml work on reverse proxy support 2026-04-07 20:10:13 -05:00
docker-entrypoint.sh oops, add entry point 2026-04-04 13:52:13 -05:00
Dockerfile oops, fix frontend copying in cd 2026-04-09 13:59:53 -05:00
LICENSE Basic web outline 2024-12-07 14:20:57 -06:00
MODERATION_ROADMAP.md remove binks-cli 2026-04-07 20:22:52 -05:00
README.md add configurable slug type 2026-03-24 12:53:51 -05:00
rust-toolchain.toml restructure/organize structure 2026-02-25 19:52:01 -06:00
USER_REG_ROADMAP.md remove binks-cli 2026-04-07 20:22:52 -05:00

Binks

Another pastebin

Features

  • Multiple privacy levels (public, password-protected, end-to-end encrypted)
  • Configurable expiration duration, and view expiration (burn)
  • File attachments
  • URL shortener
  • Human-readable URLs
  • Password protection
  • Admin/management panel

Quick Start

Configuration

Binks looks for a binks.toml file in the files path, but will create one with default values if not present. Environment variables can be used to overwrite the config. Configuration is split into two planes:

  • Boot config (restart required): env > binks.toml > built-in defaults
  • Runtime policy (admin settings): env lock > DB setting > boot default > built-in default
Default Config
# Binks Config
bind_addr = "0.0.0.0:7878"
db_path = "binks.db"
upload_path = "./uploads"
enable_docs = true
# slug_id_strategy = "petname" # petname | uuid
# max_file_size = 5120 # 5GB in MB
# max_paste_size = 1 # 1 MB
# max_override_id_length = 32 # characters
# max_filename_length = 255 # characters
# csp_allow_unsafe_inline_style = true
# session_key = "base64-encoded-64-byte-key"
# session_timeout_minutes = 1440 # 24 hours
# cookie_secure = false
# worker_threads = 4 # defaults to num_cpus
# trusted_proxies = ["127.0.0.1", "::1"]

[admin]
# Initial superadmin credentials (required on first startup)
# initial_username = "admin"
# initial_password = "set-a-strong-password"

# [locks]
# Lock runtime settings so they cannot be changed via the admin UI or API.
# Priority: BINKS_LOCK_* env vars > [locks] section > DB > boot defaults.
# Keys match the runtime setting keys (see GET /api/admin/settings).
# max_file_size_mb = 5120
# encrypted_mode_enabled = true
# anonymous_uploads_enabled = false
# slug_id_strategy = "petname" # petname | uuid
# rate_limit_uploads_per_hour = 100
# rate_limit_downloads_per_hour = 500
# upload_transport_mode = "auto" # auto | tus_only | multipart_only
# tus_chunk_size_mb = 16

session_key can be obtained through: openssl rand -base64 64

Runtime policy keys (admin panel)

  • anonymous_uploads_enabled
  • anonymous_text_enabled
  • encrypted_mode_enabled
  • rate_limit_uploads_per_hour
  • rate_limit_downloads_per_hour
  • default_expiration_days (allowed: 0, 1, 7, 30, 365)
  • max_file_size_mb
  • max_paste_size_mb
  • slug_id_strategy (petname, uuid)
  • max_filename_length
  • max_override_id_length
  • upload_transport_mode (auto, tus_only, multipart_only)
  • tus_chunk_size_mb
  • enable_docs (restart required)

Runtime env locks

Set one of these environment variables to force and lock a runtime setting:

  • BINKS_LOCK_ANONYMOUS_UPLOADS_ENABLED
  • BINKS_LOCK_ANONYMOUS_TEXT_ENABLED
  • BINKS_LOCK_ENCRYPTED_MODE_ENABLED
  • BINKS_LOCK_RATE_LIMIT_UPLOADS_PER_HOUR
  • BINKS_LOCK_RATE_LIMIT_DOWNLOADS_PER_HOUR
  • BINKS_LOCK_DEFAULT_EXPIRATION_DAYS
  • BINKS_LOCK_MAX_FILE_SIZE_MB
  • BINKS_LOCK_MAX_PASTE_SIZE_MB
  • BINKS_LOCK_SLUG_ID_STRATEGY
  • BINKS_LOCK_MAX_FILENAME_LENGTH
  • BINKS_LOCK_MAX_OVERRIDE_ID_LENGTH
  • BINKS_LOCK_UPLOAD_TRANSPORT_MODE
  • BINKS_LOCK_TUS_CHUNK_SIZE_MB
  • BINKS_LOCK_ENABLE_DOCS

When a lock variable is present and valid, admin updates for that key are rejected.

Startup validation

Startup fails if the settings table contains unknown runtime keys. Remove unsupported keys from settings before starting.

On startup, Binks now requires:

  • a valid 64-byte session_key (base64 or 128-char hex)
  • a non-default admin password (BINKS_ADMIN_PASSWORD or [admin].initial_password)

For local development only, you can bypass this with:

  • BINKS_ALLOW_INSECURE_DEFAULTS=true

Optional CSP hardening:

  • set csp_allow_unsafe_inline_style = false (or BINKS_CSP_ALLOW_UNSAFE_INLINE_STYLE=false) to remove 'unsafe-inline' from style-src.

API Docs

If enable_docs is enabled, then Scalar API docs will be available at /docs