Skip to content

Deploying PdfDing

Introduction

PdfDing is a self-hosted PDF document management platform that allows you to upload, organize, view, and annotate PDF documents. Designed for individuals and teams who work with many PDF files, PdfDing provides a centralized location for managing your document library.

Built with modern web technologies, PdfDing offers a clean interface for browsing your documents, a full-featured PDF viewer with annotation capabilities, and organizational tools to keep your files structured.

Key highlights of PdfDing:

  • PDF Viewing: Full-featured PDF viewer in the browser
  • Annotations: Highlight, underline, and add notes to documents
  • Organization: Folders and tags for document management
  • Search: Full-text search across your document library
  • Upload: Drag-and-drop file upload
  • Responsive: Works on desktop and mobile devices
  • Multi-User: Support for multiple users with separate libraries
  • Self-Hosted: Keep your documents on your own infrastructure
  • Open Source: Community-driven development

This guide walks through deploying PdfDing on Klutch.sh using Docker, configuring persistent storage, and setting up the application for production use.

Why Deploy PdfDing on Klutch.sh

Deploying PdfDing on Klutch.sh provides several advantages:

Simplified Deployment: Klutch.sh automatically detects your Dockerfile and builds PdfDing without complex orchestration. Push to GitHub, and your document manager deploys automatically.

Persistent Storage: Attach persistent volumes for your PDF files. Your documents survive container restarts and redeployments.

HTTPS by Default: Klutch.sh provides automatic SSL certificates for secure document access.

Always Available: Access your documents from anywhere, on any device.

Custom Domains: Use a memorable domain for your PdfDing instance.

Prerequisites

Before deploying PdfDing on Klutch.sh, ensure you have:

Preparing Your Repository

Create a GitHub repository containing your Dockerfile for PdfDing deployment.

Repository Structure

pdfding-deploy/
├── Dockerfile
└── .dockerignore

Creating the Dockerfile

Create a Dockerfile in the root of your repository:

FROM mhellmeier/pdfding:latest
# Set environment variables
ENV SECRET_KEY=${SECRET_KEY}
ENV ALLOWED_HOSTS=${ALLOWED_HOSTS:-*}
ENV DEBUG=False
# Database configuration
ENV DATABASE_URL=${DATABASE_URL:-sqlite:///data/db.sqlite3}
# Create data directories
RUN mkdir -p /data/pdfs /data/db
# Expose the web interface port
EXPOSE 8000
# Use the default entrypoint

Creating the .dockerignore File

Create a .dockerignore file:

.git
.github
*.md
LICENSE
.gitignore
*.log
.DS_Store
.env
.env.local

Environment Variables Reference

VariableRequiredDefaultDescription
SECRET_KEYYes-Django secret key for security
ALLOWED_HOSTSNo*Comma-separated list of allowed hosts
DEBUGNoFalseEnable debug mode (never in production)
DATABASE_URLNosqlite:///data/db.sqlite3Database connection string

Deploying PdfDing on Klutch.sh

    Generate a Secret Key

    Generate a secure secret key for Django:

    Terminal window
    python -c "import secrets; print(secrets.token_urlsafe(50))"

    Or using OpenSSL:

    Terminal window
    openssl rand -base64 50

    Push Your Repository to GitHub

    Initialize your repository and push to GitHub with your Dockerfile.

    Create a New Project on Klutch.sh

    Navigate to the Klutch.sh dashboard and create a new project. Give it a descriptive name like “pdfding” or “pdf-manager”.

    Create a New App

    Within your project, create a new app. Connect your GitHub account if you haven’t already, then select the repository containing your PdfDing Dockerfile.

    Configure HTTP Traffic

    In the deployment settings:

    • Select HTTP as the traffic type
    • Set the internal port to 8000

    Set Environment Variables

    Add the following environment variables:

    VariableValue
    SECRET_KEYYour generated secret key
    ALLOWED_HOSTSyour-app-name.klutch.sh
    DEBUGFalse

    Attach Persistent Volumes

    Add the following volumes:

    Mount PathRecommended SizePurpose
    /data/pdfs50+ GBPDF document storage
    /data/db1 GBSQLite database

    Deploy Your Application

    Click Deploy to start the build process. Klutch.sh will:

    • Detect your Dockerfile automatically
    • Build the container image
    • Attach the persistent volumes
    • Start the PdfDing container
    • Provision an HTTPS certificate

    Access PdfDing

    Once deployment completes, access your PdfDing instance at https://your-app-name.klutch.sh.

Using PdfDing

Uploading Documents

  1. Navigate to your PdfDing instance
  2. Click the upload button or drag and drop files
  3. Wait for processing to complete
  4. Your document appears in the library

Viewing Documents

  1. Click on a document in your library
  2. Use the built-in PDF viewer
  3. Navigate pages, zoom, and search within the document
  4. Full-screen mode for focused reading

Annotating Documents

The PDF viewer supports various annotation types:

  • Highlighting: Select text to highlight
  • Underline: Emphasize important text
  • Notes: Add sticky notes to specific locations
  • Freehand: Draw directly on the document

Annotations are saved automatically and persist with the document.

Organizing Documents

Keep your library organized:

  • Create folders for different projects or categories
  • Add tags for cross-cutting organization
  • Use search to find documents quickly
  • Sort by name, date, or size

Searching

PdfDing offers search capabilities:

  • Search document titles and metadata
  • Full-text search within PDFs (if enabled)
  • Filter by tags or folders

Additional Resources

Conclusion

Deploying PdfDing on Klutch.sh gives you a self-hosted PDF management platform accessible from anywhere. The combination of document viewing, annotation capabilities, and organizational tools makes it ideal for managing your PDF library.

With persistent storage for your documents and automatic HTTPS, PdfDing provides a secure and reliable way to work with your PDFs without relying on third-party cloud services.