Markdown in. Beautiful documents out.
Convert Markdown to pixel-perfect PDF and native Word DOCX documents โ with a web UI, REST API, and CLI. Everything is bundled in this image: Node 20, Chromium (for PDF), and Pandoc (for DOCX). No installs required on the host.
docker run -p 3000:3000 aryansin1234/inkdown:latest
Then open http://localhost:3000โ โ that's it.
๐ Apple Silicon / ARM64 Mac? The image is built for
linux/amd64. Use the platform flag:docker run --platform linux/amd64 -p 3000:3000 aryansin1234/inkdown:latestOr build a native ARM image locally:
git clone https://github.com/Aryansin1234/InkDown.git && cd InkDown docker build -t inkdown:local . docker run -p 3000:3000 inkdown:local
InkDown turns raw Markdown into documents you can actually share:
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ
โ Markdown โ โโโโถ โ InkDown โ โโโโถ โ PDF or DOCX โ
โ Web ยท CLI โ โ REST API โ โ pixel-perfect โ
โ REST API โ โ โก Engine โ โ ready to share โ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ
Three ways to use it:
node src/cli.js input.md output.pdf| Feature | Details |
|---|---|
| ๐จ Syntax Highlighting | 190+ languages, GitHub-light theme |
| ๐ Smart Tables | Pipe, grid, multiline tables โ borders & alignment |
| ๐ Mermaid Diagrams | Flowcharts, sequence, Gantt, pie, ER, state, class, git graph, mindmap โ rendered as high-DPI PNG |
| ๐ Page Break Control | <!-- pagebreak --> comments or auto-break before H1 |
| ๐ Table of Contents | Auto-generated, clickable TOC in both PDF and DOCX |
| ๐ข Page Numbers | Footer on every page: Title โ Page X / Y |
| โ Math (LaTeX) | Inline $E=mc^2$ and block $$...$$ equations via KaTeX |
| โก PDF Output | Headless Chrome via Puppeteer, A4 format, print-quality |
| ๐ DOCX Output | Native Word documents via Pandoc โ real styles, embedded images |
| ๐๏ธ Live Preview | Real-time Markdown preview with Mermaid rendering |
| ๐ REST API v1 | JSON body ยท file upload ยท URL fetch |
| ๐ API Key Auth | Optional INKDOWN_API_KEYS env var |
| ๐ Non-root | Runs as unprivileged inkdown user |
| Tag | Description |
|---|---|
latest | Most recent stable build |
docker run -p 3000:3000 aryansin1234/inkdown:latest
docker run --platform linux/amd64 -p 3000:3000 aryansin1234/inkdown:latest
docker run -d --name inkdown --restart unless-stopped \
-p 3000:3000 \
aryansin1234/inkdown:latest
services:
inkdown:
image: aryansin1234/inkdown:latest
container_name: inkdown
restart: unless-stopped
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- PORT=3000
# - INKDOWN_API_KEYS=your-secret-key
# - INKDOWN_CORS_ORIGINS=https://myapp.com
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/api/v1/health', r => process.exit(r.statusCode === 200 ? 0 : 1)).on('error', () => process.exit(1))"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
docker compose up -d
docker run -d --name inkdown --restart unless-stopped \
-p 3000:3000 \
-e INKDOWN_API_KEYS=your-secret-key \
aryansin1234/inkdown:latest
Pass the key in requests:
X-API-Key: your-secret-key
# or
Authorization: Bearer your-secret-key
docker run -p 8080:8080 -e PORT=8080 aryansin1234/inkdown:latest
docker run -p 3000:3000 \
-e INKDOWN_CORS_ORIGINS=https://myapp.com,https://staging.myapp.com \
aryansin1234/inkdown:latest
| Variable | Default | Description |
|---|---|---|
PORT | 3000 | HTTP port the server listens on |
INKDOWN_API_KEYS | (unset โ open) | Comma-separated API keys. When set, /api/v1/convert requires authentication. |
INKDOWN_CORS_ORIGINS | * | Allowed CORS origins. Restrict in production. |
PUPPETEER_EXECUTABLE_PATH | /usr/bin/chromium | Pre-configured โ no need to change |
NODE_ENV | production | Node environment |
Base URL: http://localhost:3000/api/v1
curl http://localhost:3000/api/v1/health
{
"status": "ok",
"version": "1.0.0",
"timestamp": "2026-05-16T00:00:00.000Z",
"formats": ["pdf", "docx"]
}
curl -X POST http://localhost:3000/api/v1/convert \
-H "Content-Type: application/json" \
-d '{"markdown": "# Hello\n\nWorld!", "format": "pdf"}' \
--output document.pdf
curl -X POST http://localhost:3000/api/v1/convert \
-H "Content-Type: application/json" \
-d '{"markdown": "# Hello\n\nWorld!", "format": "docx"}' \
--output document.docx
curl -X POST http://localhost:3000/api/v1/convert \
-H "Content-Type: application/json" \
-d '{
"markdown": "# Report\n\n## Chapter 1\n\nContent here.",
"format": "pdf",
"toc": true,
"autoBreak": true,
"title": "My Report"
}' \
--output report.pdf
curl -X POST http://localhost:3000/api/v1/convert \
-F "[email protected]" \
-F "format=pdf" \
--output README.pdf
curl -X POST http://localhost:3000/api/v1/convert \
-H "Content-Type: application/json" \
-d '{"url": "https://raw.githubusercontent.com/Aryansin1234/InkDown/main/README.md", "format": "pdf"}' \
--output README.pdf
curl -X POST http://localhost:3000/api/v1/convert \
-H "Content-Type: application/json" \
-H "X-API-Key: your-secret-key" \
-d '{"markdown": "# Hello", "format": "pdf"}' \
--output document.pdf
| Parameter | Type | Default | Description |
|---|---|---|---|
markdown | String | โ | Raw Markdown content (use this or url or file upload) |
url | String | โ | Public HTTPS URL to a .md file |
file | File | โ | Multipart .md file upload |
format | pdf | docx | pdf | Output format |
title | String | filename | Document title shown in PDF footer |
toc | Boolean | false | Generate a Table of Contents |
autoBreak | Boolean | false | Auto page-break before every H1 |
Response: Binary file download with Content-Disposition: attachment.
On error: { "error": "...", "code": "..." }
- [x] done / - [ ] todo~~text~~[^1] with referencesTerm / : Definition$...$ and block $$...$$ via KaTeX```mermaid code blocks
<!-- pagebreak --> or <div style="page-break-after: always;"></div>| Component | Version | Purpose |
|---|---|---|
node:20-slim | 20 LTS | JavaScript runtime |
| Chromium | system (apt) | Headless PDF rendering |
| Pandoc | system (apt) | Native DOCX generation |
| Puppeteer | ^24 | Chrome automation |
| Mermaid | ^11 | Diagram rendering (bundled, no CDN) |
| marked | ^13 | Markdown โ HTML parser |
| highlight.js | ^11 | Syntax highlighting |
| KaTeX | ^0.16 | LaTeX math rendering |
| Express | ^5 | HTTP server |
Base image:
node:20-slim(Debian) Exposed port:3000Image size: ~400 MB Architecture:linux/amd64Runs as: non-rootinkdownuser
inkdown) inside the container169.254.x.x).md and .txt acceptedINKDOWN_API_KEYS to require authentication on the convert endpointINKDOWN_CORS_ORIGINS to restrict browser origins| Issue | Solution |
|---|---|
no matching manifest for linux/arm64 | Add --platform linux/amd64 to docker run |
| Conversion timeout | Large documents with many Mermaid diagrams may take longer |
| DOCX won't open in Word | Ensure you're on the latest image โ includes Pandoc 3.9 compatibility patches |
| Port already in use | Map a different port: -p 8080:3000 |
| Container exits immediately | Check logs: docker logs inkdown |
Made with โ โ your documents never leave your infrastructure.
Content type
Image
Digest
sha256:05d14c93dโฆ
Size
814.8 MB
Last updated
5 months ago
docker pull aryansin1234/inkdown