MCPSERV.CLUB
Friendica

Friendica

Self-Hosted

Decentralized social network for federated communication

Active(100)
1.6kstars
0views
Updated 9 hours ago
Friendica screenshot

Overview

Discover what makes Friendica powerful

Friendica is a self‑hosted, open‑source social networking platform that implements the *Fediverse* protocol stack. From a developer’s standpoint it is essentially a **federated content‑distribution engine** that aggregates posts, comments, and media from dozens of independent services (Mastodon, Pleroma, Misskey, etc.) into a single, unified timeline. The core idea is to provide a fully functional social graph—users, relationships, privacy scopes, and activity streams—while exposing a robust API surface that can be consumed by external clients or integrated into larger ecosystems.

ActivityPub endpoints

OAuth2 support

Webhooks

Plugin system

Overview

Friendica is a self‑hosted, open‑source social networking platform that implements the Fediverse protocol stack. From a developer’s standpoint it is essentially a federated content‑distribution engine that aggregates posts, comments, and media from dozens of independent services (Mastodon, Pleroma, Misskey, etc.) into a single, unified timeline. The core idea is to provide a fully functional social graph—users, relationships, privacy scopes, and activity streams—while exposing a robust API surface that can be consumed by external clients or integrated into larger ecosystems.

Technical Stack & Architecture

Friendica is written in PHP 8.x and follows a Model–View–Controller architecture built on top of the Friendica core framework. The framework abstracts common social‑networking primitives such as Activities, Actors, and Objects into PHP classes, allowing developers to extend or replace individual modules without touching the core. The data layer is a MySQL/MariaDB schema that stores user accounts, contact lists, posts, and federation logs. The application exposes a RESTful JSON API (compatible with ActivityPub) that mirrors the internal data model, making it straightforward to build custom clients or bots. Webhooks are available for external services (e.g., IFTTT, Buffer) to trigger on new posts or comments.

The federation layer is powered by ActivityPub and a lightweight federation daemon written in PHP that handles HTTP(S) requests, signature verification, and delivery queues. The daemon can be run as a separate process or integrated into the web server’s request cycle, giving developers flexibility in scaling. For large‑scale deployments, a message queue (e.g., Redis or RabbitMQ) can be used to decouple post ingestion from delivery, enabling horizontal scaling of the federation workers.

Core Capabilities & APIs

  • ActivityPub endpoints: /api/activitypub/ for actors, objects, and activities; fully compliant with the Fediverse spec.
  • OAuth2 support: Allows third‑party applications to act on behalf of users, enabling mobile clients or external dashboards.
  • Webhooks: POST callbacks for events such as post.created, comment.replied, and contact.added.
  • Plugin system: PHP modules that hook into lifecycle events (e.g., onPostCreate, onContactRequest). Plugins can register new routes, database tables, or modify rendering.
  • RSS/Atom feeds: Export user timelines or community streams for integration with legacy systems.

These APIs make Friendica a natural choice for developers looking to build federated social clients, moderation bots, or data‑analysis pipelines.

Deployment & Infrastructure

Friendica can run on any LAMP stack (Linux, Apache/Nginx, MySQL/MariaDB) with PHP 8.1+. For modern deployments, the project provides a Docker Compose setup that bundles Apache, PHP-FPM, MariaDB, and Redis into isolated containers. The Docker image is lightweight (~200 MB) and can be orchestrated with Kubernetes or Docker Swarm. Scaling horizontally is achieved by running multiple PHP workers behind a load balancer and using a shared Redis queue for federation jobs. Persistent storage is handled by MySQL replicas, while media uploads can be offloaded to S3‑compatible object stores via the plugin API.

Integration & Extensibility

Friendica’s extensibility is centered around its plugin architecture. Plugins can register new database tables, add UI widgets, or modify the ActivityPub serialization process. The public API is documented in doc/ and includes examples for creating custom endpoints. Moreover, Friendica supports OAuth2 client registration, allowing developers to build native or web clients that authenticate via the instance. The platform also exposes WebSub (Pub/SubHubbub) endpoints for real‑time notifications, enabling integration with external event streams.

Developer Experience

The project hosts a comprehensive developer guide (doc/Developer.md) that walks through creating plugins, extending the API, and debugging federation issues. Community support is active on GitHub Issues, IRC (#friendica), and the official Fediverse instance. The codebase follows PSR‑4 autoloading, making it compatible with modern PHP tooling (Composer, PHPUnit). Licensing under GPL‑3.0 ensures that any derivative work remains open source.

Use Cases

  • Enterprise social intranet: Deploy a private Fediverse instance to replace proprietary collaboration tools while retaining federated connectivity.
  • Research platforms: Collect and analyze social media data across multiple protocols without violating platform terms of service.
  • Community builders: Create niche social networks that can interoperate with mainstream Fediverse services, preserving user choice.
  • IoT integration: Use webhooks to publish sensor data as posts, enabling real‑time monitoring across a federated network.

Advantages

Friendica offers unmatched protocol breadth (supporting Mastodon, Pleroma, Misskey, Lemmy, etc.) within a single codebase. Its PHP foundation means that developers familiar with LAMP stacks can contribute quickly, while the plugin system allows deep customization without core modifications. Performance is optimized through asynchronous federation queues and optional Redis caching, making it suitable for medium‑to‑large deployments. Finally, the GPL licensing and active community reduce vendor lock‑in risks, giving developers full control over their social infrastructure.

Open SourceReady to get started?

Join the community and start self-hosting Friendica today

Weekly Views

Loading...
Support Us
Most Popular

Infrastructure Supporter

$5/month

Keep our servers running and help us maintain the best directory for developers

Repository Health

Loading health data...

Information

Category
apis-services
License
AGPL-3.0
Stars
1.6k
Technical Specs
Pricing
Open Source
Database
Multiple
Docker
Official
Min RAM
512MB
Min Storage
1GB
Supported OS
LinuxDocker
Author
friendica
friendica
Last Updated
9 hours ago