Sign inSign up

eacer/docuscrypt

By eacer

•Updated 10 days ago

Encrypt/decrypt Office and PDFs. Go v2, AI-assisted. https://github.com/AceRodnel14/docuscrypt

Image
0

485

eacer/docuscrypt repository overview

⁠DocusCrypt

A small, self-hosted web app for encrypting and decrypting password-protected documents: modern Office files (.docx, .xlsx, .pptx) and PDFs.

Source: https://github.com/AceRodnel14/docuscrypt⁠

v2 is a rewrite in Go. DocusCrypt was formerly msoffcryptool-web⁠, a Python/FastAPI app built on msoffcrypto-tool that handled Office files only. v2 is a single static Go binary with the web UI built in. It adds PDF support and keeps the same UI, routes and port (8000).

🤖 AI-assisted: this project was developed with AI assistance.

⁠Features

  • Encrypt or decrypt with one toggle. Type a password or generate a random one.
  • Picks the right engine automatically from what the file actually contains, not just its name. A PDF renamed to .docx gets a clear error instead of a cryptic failure.
  • Stateless and private. Files are processed in memory, one request at a time. Nothing is stored, and nothing is shared between requests.
  • Small and locked down. Distroless base image, runs as non-root, no shell inside the container.

⁠Format support

FormatDecryptEncrypt
.docx / .xlsx / .pptx (2007+)✅✅ AES-256, the same scheme Office 2010+ uses by default
.pdf✅ AES-256, AES-128, RC4✅ AES-256 (output is marked PDF 2.0)
.doc / .xls / .ppt (97–2003)❌❌

Older 97–2003 Office files are no longer supported in v2. Save them as .docx / .xlsx / .pptx first. Files encrypted by the Python version (v1) still decrypt fine.

For PDFs, the single password you enter is used as both the open password and the permissions password, so anyone who has it gets the full document.

⁠Quick start

docker run --rm -p 8000:8000 eacer/docuscrypt

Then open http://localhost:8000⁠.

No environment variables or volumes are needed.

⁠Deployment notes

  • Port: 8000
  • Health check: GET /healthz returns {"status":"ok"}. The image has no shell, so use HTTP liveness/readiness probes, not exec ones.
  • Graceful shutdown: in-flight requests finish on SIGTERM, so it works well with Kubernetes and scale-to-zero setups like KEDA.
  • No TLS or login built in. It's meant for a trusted network. Put it behind a reverse proxy such as Traefik if you need HTTPS or access control.

⁠API

MethodPathPurpose
GET/Web UI
GET/healthzHealth check
GET/api/generate-password?length=16&symbols=falseRandom password (length 4–128)
POST/api/checkChecks a file is valid for the chosen mode. Form fields: mode, file
POST/api/processEncrypts or decrypts. Form fields: mode, password, file. Returns the processed file

⁠Built with

  • spine⁠: Office encryption
  • pdfcpu⁠: PDF encryption
  • mscfb⁠: reads the container format encrypted Office files are stored in

Tag summary

Content type

Image

Digest

sha256:5a5921742…

Size

6.5 MB

Last updated

10 days ago

docker pull eacer/docuscrypt:v2.20261003