Overview
Discover what makes dpaste powerful
dpaste is a lightweight, self‑hosted Pastebin clone built on **Python 3.9+** and **Django 3.2+**. It functions as a full Django project that can also be dropped into an existing application as an app module, giving teams the flexibility to embed paste functionality directly within their own services. The core use case is storing and sharing snippets of text or code with optional syntax highlighting, expiration, and public/private visibility controls.
Language & Framework
Database
Template Engine
Containerization
Overview
dpaste is a lightweight, self‑hosted Pastebin clone built on Python 3.9+ and Django 3.2+. It functions as a full Django project that can also be dropped into an existing application as an app module, giving teams the flexibility to embed paste functionality directly within their own services. The core use case is storing and sharing snippets of text or code with optional syntax highlighting, expiration, and public/private visibility controls.
Technical Stack
- Language & Framework: Python 3.9+, Django 3.2 (LTS) – the codebase follows standard Django conventions, exposing models (
Paste,User), views (class‑based generic views), and a REST API powered by Django REST Framework. - Database: Supports any database that Django can connect to (SQLite for dev, PostgreSQL/MySQL/Oracle in production). The
Pastemodel stores fields such ascontent,language,expires_at, and a unique slug. - Template Engine: Django’s templating system renders the public paste view, with optional syntax highlighting via Pygments.
- Containerization: A ready‑to‑run Docker image (
darrenofficial/dpaste) is available, with CI pipelines ensuring image builds and tests pass on every commit.
Core Capabilities
- RESTful API: Endpoints for creating, retrieving, updating, and deleting pastes (
/api/pastes/). Authentication is optional; unauthenticated requests can still create public pastes. - Webhooks: Configurable webhook URLs trigger on paste creation, allowing downstream services (e.g., CI dashboards) to consume new snippets.
- Extensibility: The app exposes signals (
paste_created,paste_deleted) that external Django projects can listen to for custom logic (e.g., logging, analytics). - Customizable Rendering: Developers can override templates or provide custom Pygments lexers to support additional languages.
- Security Features: Expiration timestamps, optional password protection (via encrypted fields), and rate limiting via Django‑filters.
Deployment & Infrastructure
- Self‑Hosting: Requires a WSGI server (Gunicorn, uWSGI) behind Nginx or Apache. The
settings.pyis configurable via environment variables (e.g.,DATABASE_URL,SECRET_KEY). - Scalability: Stateless Django views allow horizontal scaling behind a load balancer. Database sharding or read replicas can be added for high‑traffic scenarios.
- Container Support: The Docker image includes a
gunicornentrypoint, making it trivial to deploy on Kubernetes or Docker‑Compose stacks. Adocker-compose.ymlis provided in the repo for quick prototyping.
Integration & Extensibility
- Plugin System: While dpaste has no formal plugin API, its modular structure lets developers create Django apps that import
dpaste.modelsand register signal handlers. - Webhooks & Callbacks: Exposes a configurable
WEBHOOK_URLsetting; on paste creation, the payload includes paste ID, user, and content metadata. - Authentication Hooks: Supports Django’s authentication backends; developers can integrate with OAuth, LDAP, or custom auth systems to control paste visibility.
Developer Experience
- Documentation: Comprehensive docs at docs.dpaste.org cover installation, API usage, and customization. The README on GitHub provides quick‑start badges and CI status.
- Community & Support: Active issue tracker on GitHub; contributors welcome. The code follows PEP 8 and is covered by unit tests (CI checks on every push).
- Configuration: Most options are exposed via Django’s settings module, allowing easy overrides without code changes.
Use Cases
- Internal Knowledge Base: Teams can host a private paste service for quick code sharing, logs, or configuration snippets.
- CI/CD Pipelines: Automated jobs can post build artifacts or logs to dpaste and trigger downstream processes via webhooks.
- Educational Platforms: Instructors can embed dpaste in learning management systems to allow students to submit code snippets or solutions.
- Developer Communities: Self‑hosted instances for open‑source projects that require a lightweight paste service with full control over data retention.
Advantages
- Open Source & MIT‑Licensed: No licensing costs, full source control for security audits.
- Performance & Simplicity: Minimal dependencies; Django’s ORM keeps data access fast, and the app runs well under modest hardware.
- Flexibility: As a Django project or app, it can be tightly integrated into existing infrastructures without rewriting routing logic.
- Extensibility: Signals, webhooks, and customizable templates make it easy to adapt dpaste to niche workflows.
dpaste offers developers a quick, secure, and highly extensible paste service that can be self‑hosted or embedded, making it an attractive choice for teams needing control over their code sharing platform.
Open SourceReady to get started?
Join the community and start self-hosting dpaste today
Related Apps in other
Immich
Self‑hosted photo and video manager
Syncthing
Peer‑to‑peer file sync, no central server
Strapi
Open-source headless CMS for modern developers
reveal.js
Create stunning web‑based presentations with HTML, CSS and JavaScript
Stirling-PDF
Local web PDF editor with split, merge, convert and more
MinIO
Fast, S3-compatible object storage for AI and analytics
Weekly Views
Repository Health
Information
Explore More Apps
Meetable
Minimal event aggregator for the IndieWeb community
AnyCable
Low‑latency, reliable real‑time communication for any backend
Fusion
Lightweight RSS aggregator and reader
4ga Boards
Real‑time project management boards, intuitive and secure
Bracket
Manage tournaments effortlessly
solidtime
Open‑source time tracker for freelancers and agencies