Pixelfed

A decentralized, self-hosted photo sharing platform built on ActivityPub for the open Fediverse.

7Kstars
861forks
GNU AGPLv3
PHP

Pixelfed is an open-source photo sharing platform that brings the Instagram-style experience to the Fediverse — a federated network of independent servers connected through the ActivityPub protocol. It lets individuals and communities run their own social photo platform without algorithmic feeds, advertising, or centralized data harvesting.

Built on Laravel and PHP, Pixelfed implements ActivityPub natively, allowing seamless interaction with users on Mastodon, Pleroma, PeerTube, and other federated services. Your followers and following relationships cross instance boundaries automatically, so joining one Pixelfed server doesn’t wall you off from the broader Fediverse.

Pixelfed ships with a feature-complete admin panel, content moderation tools, a Mastodon-compatible API layer, OIDC authentication support, and an optional curated onboarding flow. It handles media processing through Intervention Image with libvips support, and stores assets on local disk or any S3-compatible object storage. The system runs entirely within a Docker Compose stack with isolated containers for the application, background queue workers, and the Laravel scheduler.

Since 2018 Pixelfed has grown to millions of users across thousands of independent instances, supported by NLnet Foundation and DigitalOcean, and ships regular releases roughly every two to four months with steady contributor activity.

What You Get

  • ActivityPub Federation - Publishes and receives content to and from Mastodon, Pleroma, and any other ActivityPub-compliant server using cryptographically signed HTTP requests.
  • Mastodon-Compatible REST API - Exposes a Mastodon v1/v2 API so third-party clients like Tusky and Ivory work out of the box without custom integrations.
  • Granular Post Privacy - Lets users set each post to public, unlisted, followers-only, or private, with audience decisions propagated via ActivityPub to federated instances.
  • Built-in NLP Spam Detection - Ships an on-instance Naive Bayes classifier that admins train on ham/spam samples to adapt detection to their community’s specific abuse patterns.
  • OIDC Single Sign-On - Integrates OpenID Connect so organizations can delegate authentication to an existing identity provider without managing local passwords.
  • Instagram Import Tool - Reconstructs posts with captions, dates, and media from an Instagram data export archive, preserving the original metadata during migration.
  • WebGL Photo Filters - Applies client-side GPU-accelerated color filters and adjustments at compose time using OffscreenCanvas when the browser supports it.
  • Admin Moderation Dashboard - Centralizes user reports, automated spam flags, domain blocks, and ModLog audit entries in a single interface with fanout notifications to moderation team members.

Common Use Cases

  • Running a photography community - A photography club deploys a private Pixelfed instance so members can share work chronologically, follow each other, and cross-post to Mastodon without a centralized platform collecting their images.
  • Migrating off Instagram - A creator exports their Instagram archive and uses the built-in import tool to transfer their entire post history to a self-hosted Pixelfed instance with original captions and dates intact.
  • Hosting a federated archive - A museum or cultural organization runs Pixelfed to publicly share digitized historical photographs, making them discoverable across the Fediverse without relying on a commercial platform.
  • Building a branded visual community - An organization uses Pixelfed’s custom CSS injection and theming support to run a fully rebranded photo network on its own domain under its own identity.
  • Enterprise social intranet - A company deploys Pixelfed with OIDC connected to their identity provider so employees can share project photos and updates in a private, searchable internal gallery.
  • Decentralized journalism - A newsroom runs Pixelfed to distribute photojournalism content that federated Fediverse users can follow directly without passing through ad-supported social networks.

Under The Hood

Architecture Pixelfed uses a Laravel-based monolithic architecture organized around a clear MVC boundary where HTTP controllers stay thin and delegate all meaningful logic to a rich layer of domain-specific service classes. ActivityPub federation is handled through dedicated service objects that queue outbound deliveries as discrete Laravel jobs, ensuring reliable fan-out to remote inboxes without blocking the request cycle. Domain concerns such as media handling, spam classification, notification delivery, and content moderation are encapsulated in isolated services wired together through Laravel’s event and observer system, so side effects never bleed into core model logic. The result is a well-factored monolith that is straightforward to follow while remaining genuinely scalable through horizontal queue worker scaling.

Tech Stack The backend runs PHP 8.3 or 8.4 on Laravel 12 with MySQL as the primary database and Redis for caching, queued job brokering, and real-time pub/sub. Queue monitoring is provided by Laravel Horizon with persistent worker containers. The frontend combines Vue 2 single-file components compiled via Laravel Mix and Webpack with Bootstrap 4, jQuery, and Fancybox for a polished media-browsing experience. Image processing relies on Intervention Image with optional libvips acceleration and supports AVIF, HEIC, and WebP natively. Media assets can live on local disk or any S3-compatible object store. The entire deployment is orchestrated with Docker Compose running an Nginx and PHP-FPM application container alongside dedicated queue worker and scheduler containers.

Code Quality The test suite covers protocol-critical paths including RSA HTTP signature generation and verification, ActivityPub object validation, audience scope parsing across Mastodon and Pleroma payloads, Webfinger discovery, and content purification. Testing uses PestPHP and PHPUnit with structured fixture data sourced from real Fediverse payloads. Feature-level coverage is limited — the suite does not reach much of the controller or service layer — so confidence is concentrated on federation correctness rather than broader application behaviour. Service classes follow a consistent naming discipline and use static factory methods to keep construction readable, though inline documentation is sparse compared to the volume of code.

What Makes It Unique Pixelfed’s deepest differentiator is its opinionated, photo-first take on Fediverse federation: where Mastodon treats images as attachments to text statuses, Pixelfed centres the photo as the primary object and wraps text around it. The built-in NLP spam classifier lets instance administrators iteratively train detection on their own community’s signal without shipping data off-instance. The Instagram data import pipeline is a rare capability in the decentralized social space, lowering the barrier for migrants from centralized platforms. The ModLog governance service creates a real-time, fanout audit trail visible to the entire moderation team, which adds a transparency layer most self-hosted platforms leave to administrators alone.

Self-Hosting

Pixelfed is released exclusively under the GNU Affero General Public License v3.0. The AGPL is a strong copyleft license: you can use it commercially, run it privately, and modify it freely, but if you offer Pixelfed as a network service to others you must make the complete corresponding source — including any modifications — available to those users under the same terms. For most self-hosters running a private or community instance this is not a practical constraint, but organizations that want to ship a proprietary fork or integrate closed-source extensions should take legal advice before proceeding.

Running Pixelfed yourself is a meaningful operational commitment. The stack requires PHP 8.3+, a relational database (MySQL or PostgreSQL), Redis, a queue worker process, a scheduled task runner, and a web server in front of PHP-FPM. Media storage can be local disk or an S3-compatible bucket, and a CDN is recommended for public instances handling significant upload volume. There is no official managed-hosting product: you are responsible for uptime, security patching, database backups, queue health, and version upgrades. The upgrade process involves running database migrations that have historically been straightforward, but the project targets the dev branch for production and has not yet shipped a v1.0 stable release, so upgrade caution is warranted.

There is no paid cloud tier or enterprise support contract for Pixelfed at this time. The project is sustained by Patreon contributors, NLnet Foundation grants, and DigitalOcean sponsorship. Support is available through a Discord server and a Matrix channel, both community-driven with no SLA. Organizations that need commercial support, managed hosting, or contractual uptime guarantees will need to engage a third-party managed-services provider or handle those concerns in-house.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack

No spam. Unsubscribe anytime.

Join 750+ subscribers
No spam. Unsubscribe anytime.

Search