Overview
Discover what makes Pixelfed powerful
PixelFed is a self‑hosted, federated photo‑sharing platform that implements the ActivityPub protocol to interoperate with other fediverse services such as Mastodon and Friendica. From a developer’s perspective, it functions as a full‑stack web application that exposes RESTful endpoints for media upload, user management, and federation. The core logic is written in **PHP** using the **Laravel** framework, which gives developers a mature ecosystem of Eloquent ORM, queued jobs, and middleware. The front‑end is rendered server‑side with Blade templates and enhanced by **Vue.js** components for a responsive, SPA‑like experience. Media handling is delegated to the **Laravel‑Media‑Library** package, enabling thumbnail generation, watermarking, and adaptive image serving.
Backend
Federation Layer
Media Storage
Background Processing
Overview
PixelFed is a self‑hosted, federated photo‑sharing platform that implements the ActivityPub protocol to interoperate with other fediverse services such as Mastodon and Friendica. From a developer’s perspective, it functions as a full‑stack web application that exposes RESTful endpoints for media upload, user management, and federation. The core logic is written in PHP using the Laravel framework, which gives developers a mature ecosystem of Eloquent ORM, queued jobs, and middleware. The front‑end is rendered server‑side with Blade templates and enhanced by Vue.js components for a responsive, SPA‑like experience. Media handling is delegated to the Laravel‑Media‑Library package, enabling thumbnail generation, watermarking, and adaptive image serving.
Architecture
- Backend: Laravel 9.x (PHP 8.1+), with a modular architecture that separates core features (authentication, media, federation) into service providers. The application relies on a MySQL or PostgreSQL database for relational data and a Redis cache for session storage, job queues, and rate‑limiting.
- Federation Layer: Implements the ActivityPub specification via the Laravel‑Activitypub package, translating local actions into signed JSON‑LD activities. The server hosts an Inbox/Outbox API that adheres to the ActivityPub standard, enabling cross‑platform interaction.
- Media Storage: Files are stored on the local filesystem or an S3‑compatible object store. The system automatically generates multiple resolutions (thumbnail, medium, original) and serves them via CDN‑ready URLs.
- Background Processing: Long‑running tasks such as image transcoding, reblog propagation, and notification dispatch are handled by Laravel’s queue system, typically backed by Redis or Amazon SQS.
- API: A token‑based OAuth2 API (Laravel Passport) exposes endpoints for CRUD operations on users, posts, collections, and federation activities. Rate limits are enforced per‑user to protect the server.
Core Capabilities
- Federated Posting: Publish photos that appear in other ActivityPub‑enabled timelines; receive remote media via the Inbox.
- Collections & Hashtags: Organize media into user‑defined collections and tag them for discoverability; the API supports CRUD operations on both.
- Privacy Controls: Fine‑grained visibility settings (public, followers, private) that map to ActivityPub actor scopes.
- Webhooks & Callbacks: Developers can subscribe to events (e.g., new media, follower changes) via webhooks or Laravel event listeners.
- Extensibility: The codebase exposes service provider hooks, allowing custom middleware or model observers to inject behavior. Themes can be swapped by replacing Blade templates or adding new Vue components.
Deployment & Infrastructure
PixelFed is designed for Docker and Kubernetes deployments. Official Docker images are available on GitHub Container Registry, while a YunoHost package demonstrates how to bundle the app with a pre‑configured LEMP stack. Horizontal scaling is achievable by running multiple application pods behind a load balancer; the stateless nature of Laravel (aside from session storage) allows easy scaling. Persistent storage is handled by mounting a shared volume for media and a database service (MySQL/PostgreSQL). For high‑traffic instances, Redis clusters or managed services can be used to keep queue throughput and cache latency low.
Integration & Extensibility
- Plugins: While PixelFed does not have a formal plugin marketplace, developers can fork the repository and add modules via Laravel’s package system. Existing community packages (e.g.,
pixelfed/instagram-import) demonstrate how to extend import functionality. - APIs: OAuth2 scopes expose granular permissions; the REST API follows Laravel’s resource conventions, making it easy to consume with any HTTP client.
- Webhooks: Endpoints can be registered to receive POST notifications for user events, media uploads, or federation activities. This is useful for building analytics dashboards or integrating with external services.
- Custom Themes: Swap out Blade views and Vue components to create a branded experience. CSS can be overridden via SCSS variables, allowing full control over UI.
Developer Experience
The project hosts comprehensive documentation on its dedicated website (docs.pixelfed.org), covering installation, configuration, API reference, and development guidelines. The codebase follows PSR‑4 autoloading, type hinting, and unit tests with PHPUnit. Community support is robust: a Discord server, Mastodon account, and an active issue tracker provide quick feedback loops. The AGPL license ensures that any modifications must remain open, encouraging collaborative improvement.
Use Cases
- Personal Photo Hub: A developer can spin up a private PixelFed instance to archive personal photography while maintaining control over data residency.
- Enterprise Collaboration: Companies can deploy PixelFed to share internal images and documents in a federated environment, leveraging ActivityPub for cross‑department visibility.
- Federated Media Aggregator: Developers building a niche social network can integrate PixelFed’s API to pull media from the broader fediverse, providing curated content without reinventing photo handling.
- Educational Projects: The modular architecture makes PixelFed an excellent teaching tool for PHP, Laravel, and federated protocols.
Advantages
- Performance: Leveraging Laravel’s queue system and Redis caching, Pixel
Open SourceReady to get started?
Join the community and start self-hosting Pixelfed today
Related Apps in apis-services
Mastodon
Decentralized, real‑time social networking
Discourse
Open‑source community forum platform with real‑time chat and AI
Rocket.Chat
Secure, open‑source team communication platform
Novu
Unified notification platform for multi‑channel delivery
Mattermost
Secure, self‑hosted team collaboration with chat, voice, and AI
Jitsi Meet
Free, encrypted video conferencing for everyone
Weekly Views
Repository Health
Information
Explore More Apps
FOSSBilling
Open‑source billing and client management for hosting businesses
Piwigo
Open‑source photo gallery for teams and individuals
Whoogle
Private, ad‑free Google search engine
Open Source Social Network (OSSN)
Build a vibrant, multilingual community platform
ybFeed
Sync micro‑feeds across machines with a secret link or PIN

Moodle
Open‑source LMS for online learning and course management
