Tuesday, November 25, 2025

Building Decentralized Social Media: A Peer-to-Peer Alternative to Facebook


https://p2p-social.github.io/ 


Building Decentralized Social Media: A Peer-to-Peer Alternative to Facebook

By John Sowal, presented at the Dojo

The Problem with Centralized Platforms

As someone who's been involved in internet infrastructure since the early days—building some of the earliest CDNs in '92-'94 and working on streaming video—I've watched the evolution of social media with growing concern. The Twitter Files revelations and ongoing issues with Facebook have made one thing clear: we need alternatives to centralized social media platforms.

The core problem is simple but fundamental. As Jack Dorsey pointed out, any company-based platform is vulnerable. The moment you incorporate, governments can issue subpoenas, apply pressure, and force compromises. The result? Increasingly aggressive content moderation that goes far beyond preventing genuine harm.

Real-World Censorship Examples

The filtering has become absurdly disruptive:

  • Getting banned for posting clips from Hollywood movies
  • Facebook jail memes and pins have become so common they're being sold as merchandise
  • Feeds filled with algorithmic content instead of posts from actual friends
  • Legitimate technical content blocked by AI filters (try sharing information about Yasa electric motors—it's blocked because a Turkish politician shares the name)
  • Humor and satire flagged as "false information"

I just want to do what I did with my BBS in 1987—one of the largest in the Bay Area, called Turbo Sysco. Back then, we'd share San Jose Mercury tech articles and discuss them freely. Today, that simple activity feels impossible on Facebook.

The Technical Vision

Can we build something better using modern browser capabilities? The answer is yes. Today's browsers are incredibly powerful:

  • Enormous compute resources: Access to GPU, WebGL, WebGPU
  • Significant storage: Browser-based storage systems
  • WebRTC: Enables mesh networking between peers
  • Flexible data management: Ability to simulate drives, export/import databases

The architecture I envisioned uses relays with WebRTC to establish connections between nodes, creating a truly distributed system where code executes in browser tabs rather than on centralized servers.

Exploring Existing Solutions

Before building from scratch, I surveyed the landscape:

PureJS

Interesting pure JavaScript implementation, but lacked the full feature set needed.

Croquet

Really impressive real-time synchronization. Their demo shows perfect timing across devices—open it on your phone and desktop, and they stay in perfect sync. The platform can run server modules directly in the browser, generating and rendering content while keeping everyone synchronized for gaming and interactive experiences.

The catch? You need an account with them. If the FBI or anyone else wanted to shut you down, they could simply turn off your account. Still centralized.

CYFS

Very interesting—they actually implemented something remarkably close to what I had sketched out independently.

Gun (by Mark Nadal)

I met Mark Nadal at the Dojo about a month ago, and his architecture is exactly what I had sketched out. It uses relays for WebRTC introductions (just like I proposed), but they're simply backups—the real communication happens peer-to-peer. I've been working hard to implement this, though as someone who isn't primarily a Node developer, it's been a brutal learning curve. (ChatGPT has been invaluable for deciphering the alphabet soup of modern web libraries.)

Nostr

The newest entrant, and it shows real promise. Unlike Mastodon's federated approach, Nostr is more censorship-resistant. While relay operators can filter content, your data persists on the protocol indefinitely. There's no central authority that can remove you entirely.

Mastodon vs. Nostr: Federation vs. True Distribution

Mastodon is distributed but federated. My experience showed that you can still get booted from instances for simply publishing links. Because there are people managing these relays, moderation creeps back in.

Nostr, on the other hand, can't be stopped in the same way. Individual relays might filter you, but your data remains on the protocol. As one attendee noted: "there's no filter—it's beautiful."

However, Nostr isn't truly peer-to-peer; everything still goes through relays. Gun's approach is more aligned with pure P2P, using relays only for initial introductions.

My Vision: Radical Transparency Without Interference

Here's my position: I don't even want to encrypt everything. If authorities want to monitor conversations, fine—do it in clear text. What I object to is the interference, the filtering, the fact-checking, the blocked links.

If I'm posting something illegal, let the FBI arrest me. But don't interfere with normal conversation. The bar for censorship has become absurdly low.

I want:

  • A Facebook-like site where I can chat with friends
  • The ability to share links without arbitrary blocking
  • Discussion of news articles without algorithmic interference
  • No "old lady in the middle of the conversation judging everything"

Technical Advantages

A truly peer-to-peer system offers compelling benefits:

  • Zero bandwidth costs: Pull as much data as fast as you want
  • No server fees: No backend infrastructure to maintain
  • Resilience: No central point of failure
  • Static hosting: Code can live on GitHub Pages—free and reliable
  • Rich capabilities: Build virtual worlds, 3D animations, VR experiences, multiplayer interactive content
  • User control: Each person can run their own relay if desired

Addressing Concerns

Q: Won't peer-to-peer put illegal content on my computer?

Ideally, encryption or other mechanisms prevent you from accessing cached content. More importantly, if designed as a caching system, you're only keeping copies of content you've actually viewed—not redistributing material you never looked at.

Q: How will people find each other without indexing?

Through direct sharing of keys, handles, or identifiers. In my case, I have my own domain and can run a relay, making myself discoverable. Users can share their connection information directly with friends.

The Path Forward

We're at a crossroads. The centralized social media experiment has shown its limitations. Censorship, algorithmic manipulation, and corporate vulnerability to government pressure have made these platforms increasingly hostile to free discourse.

The technology exists today to build alternatives. WebRTC, modern browsers, and systems like Gun and Nostr provide the building blocks. What we need is the will to build these systems and the community to adopt them.

The future of social media doesn't have to run through Silicon Valley data centers. It can run in your browser, connecting directly to your friends, with no intermediary deciding what you can say or share.


Interested in learning more about peer-to-peer social networking? Check out these projects:

No comments: