Self-Hosting with Paperclip: Document Management on Your Own VPS
For anyone who handles sensitive documents โ contracts, invoices, medical records, research materials โ handing them to a cloud SaaS is a trust exercise you may not want to take. Paperclip is a self-hosted document management system that lets you own every byte of your document library.
This article covers what Paperclip does well, who itโs for, how to deploy it on a VPS, and how to integrate it into a broader self-hosted workflow.
What Makes Paperclip Different
Most self-hosted file managers (Nextcloud, Seafile) are general-purpose cloud storage systems. Paperclip is purpose-built for document management: it centers on ingestion, OCR, metadata, and retrieval rather than sync or file sharing.
Key differentiators:
- OCR on ingest: Every PDF or image you upload gets OCRโd automatically, making scanned documents searchable.
- Metadata-first design: Title, date, correspondent, document type, tags โ all structured fields, not just filenames.
- Bulk import: Drop hundreds of files into a watch folder and Paperclip processes them automatically.
- Retention rules: Set automatic deletion or archival policies per document type.
Who Should Use Paperclip
- Freelancers and contractors: Organize invoices, contracts, and tax documents with automatic OCR and tagging.
- Small teams: Shared document repository with access controls and full-text search.
- Homelabbers: Replace a folder hierarchy on NAS/VPS with a searchable, tagged document database.
- Privacy-conscious users: No cloud vendor has access to your documents.
VPS Requirements
Paperclip is lightweight enough for an entry-level VPS:
| Spec | Minimum | Recommended |
|---|---|---|
| vCPU | 1 | 2 |
| RAM | 1GB | 2โ4GB |
| Storage | 20GB | 50GB+ |
| OS | Ubuntu 22.04 / Debian 12 | Ubuntu 22.04 LTS |
| Database | SQLite | PostgreSQL (multi-user) |
Recommended providers:
- Hetzner Cloud โ โฌ4.15/mo, 2 vCPU, 4GB RAM โ best all-round for EU users
- Contabo VPS โ โฌ5.99/mo, 4 vCPU, 8GB RAM, 200GB storage โ best if you have a large archive
Full Setup Guide
1. Install Docker
curl -fsSL https://get.docker.com | sh
systemctl enable --now docker
2. Deploy Paperclip with Docker Compose
Create /opt/paperclip/docker-compose.yml:
version: "3.8"
services:
paperclip:
image: paperclip/paperclip:latest
container_name: paperclip
restart: unless-stopped
ports:
- "8080:8080"
volumes:
- paperclip_data:/data
- /mnt/documents:/watch # optional watch folder
environment:
- PAPERCLIP_SECRET_KEY=your_random_secret_here
- PAPERCLIP_OCR_ENABLED=true
- PAPERCLIP_OCR_LANGUAGE=eng # change for other languages
volumes:
paperclip_data:
Start the stack:
cd /opt/paperclip && docker compose up -d
3. Expose via HTTPS
Using Caddy for automatic TLS:
apt install caddy -y
/etc/caddy/Caddyfile:
docs.yourdomain.com {
reverse_proxy localhost:8080
}
systemctl reload caddy
4. Configure Document Types
In the Paperclip web UI, define document types (e.g., โInvoiceโ, โContractโ, โReceiptโ) and assign storage rules. This makes retrieval much faster than relying on filenames alone.
5. Set Up a Watch Folder
Point a local folder on your VPS to the /watch volume mount. Any file dropped there gets automatically ingested, OCRโd, and added to the library โ useful for bulk imports or automated workflows.
Integrations and Extensions
Paperless-style workflow: Combine Paperclip with a scanner app (Scanbot, Adobe Scan) that emails or uploads directly to your Paperclip inbox for a fully automated paper-to-searchable-digital pipeline.
Backup to S3: Use rclone to mirror your Paperclip data volume to Backblaze B2 or any S3-compatible bucket:
rclone sync /var/lib/docker/volumes/paperclip_data/_data remote:paperclip-backup
Nginx Proxy Manager: If youโre already running an NPM instance on your VPS, point a proxy host to paperclip:8080 and enable Letโs Encrypt from the GUI.
Authentik / Authelia: Add SSO in front of Paperclip with an identity provider for multi-user installations.
Maintenance Tips
- Update regularly:
docker compose pull && docker compose up -d - Monitor disk usage: OCR output and thumbnails grow over time โ set up
df -halerts - Back up the data volume before any upgrade
- PostgreSQL tuning: For large libraries, increase
work_memandmax_connectionsinpostgresql.conf
Summary
Paperclip is one of the best-maintained self-hosted document managers available. For a VPS deployment, Hetzner Cloud covers most users at โฌ4.15/mo. If you need serious storage for a large document archive, Contabo delivers 200GB NVMe at โฌ5.99/mo.
The combination of Docker simplicity, OCR-by-default, and metadata-first organization makes Paperclip a compelling replacement for cloud document services.
See also: Full VPS comparison at selfhostvps.com