BYOC
Bring Your Own Computer

Your tab is the server.

BYOC turns a browser tab into a small real-time server. One person hosts from their tab, friends open a link, and everyone connects peer to peer. No backend to write, nothing to deploy, no account. The LAN party for the web.

host tab runs the room A B C D
The idea

Three calls, no servers of your own

1HOST

A tab hosts a room

Call host() and you get a link. The room's logic runs right there in that tab, the way a game server would.

2JOIN

Friends open the link

Their tab calls connect() and gets a WebSocket-like connection to the host. Chat, moves, cursors, files: whatever you send.

3CONNECT

BYOC does the networking

Introductions, NAT traversal, fallbacks, reconnecting after reloads, and errors that say what went wrong in plain English.

How it works

A matchmaker, then a direct line

The operator only makes introductions. After that, the app's traffic goes straight between browsers.

1Introduce

operator forwards ciphertext host tab made the link guest tab opened the link

The secret in the link never leaves the browsers, so the operator relays sealed envelopes it can't read.

2Talk directly

operator out of the way WebRTC host tab runs the room guest tab joins the room

Messages go browser to browser over an encrypted WebRTC data channel. The host signs its end, so nobody can sit in the middle.

When direct doesn't work, it falls back by itself

Most connections

Direct

Peer to peer, found with STUN. Fastest, and nothing in between.

Strict NATs

TURN

Still WebRTC, bounced off a TURN server. Encrypted end to end.

Blocked UDP

Relay

The operator's WebSocket relay. It only ever sees ciphertext, and upgrades to direct when it can.

Why

Bringing back a place

Most of the web happens on platforms: everyone connects to someone else's servers, and whatever you say lives there. BYOC is an attempt to bring back something closer to a physical place. We're still connected over the web, but a room has local properties: it belongs to the person hosting it, it exists while they're there, and what happens in it stays between the people in it.

THEIR SERVER
A platform. Everyone meets on someone else's computer, which keeps a copy of everything, for as long as it likes.
DOOR host LEFT A ROOM
A place. A few people in a room one of them is hosting. The operator is just the street address; it shows you the door and stays outside.

It's open while someone's home

The room runs in the host's tab. Close it and the lights go off. Nothing keeps running somewhere you can't see.

You get in with a key

The link is the key, and its secret never touches a server. Only people you hand it to can find the door.

You can see who's here

Presence is built in. People arrive, are there, and leave, and everyone notices within seconds.

What's said stays in the room

Messages go person to person. There's no central copy to leak, sell, or train on, unless someone in the room saves one.

It's room-sized

A handful of people, not an audience. Small enough that the host's own computer is plenty.

Your house, your rules

The host runs the room's code and decides who's welcome. It's their place, the way a living room is.

Less like visiting a website, more like going over to a friend's place, even when they're on the other side of the world.
Get started

One HTML file

Any static host works, or localhost. The same page is the host or a guest, depending on the link:

<script type="module">
  import { host, connect } from 'https://byoc.infinitefun.com/v0/byoc.js';

  if (location.hash.includes('byoc=')) {
    // Guest: the link is in the URL
    const conn = await connect();
    conn.onmessage = (e) => console.log(e.data);
    conn.send('hi!');
  } else {
    // Host: this tab is the server
    const room = await host();
    room.onconnection = (conn) => {
      conn.onmessage = (e) => room.broadcast(e.data);  // your room logic
    };
    console.log('Share this link:', room.link);
  }
</script>

A Connection works like a WebSocket (send, onmessage, onclose, readyState), so WebSocket code ports with few changes. The whole API fits on one page: llm.md. Building with an AI assistant? Point it at /llms.txt.

Try it

Miniapps

Each one is a single HTML file you can read in a few minutes. Open one, then send the link to a friend or open it on your phone.

Will it work on this network?

Checks the operator, WebRTC, and the direct and TURN paths from this browser. Takes about five seconds.

Operator…
WebRTC…
Direct (STUN)…
TURN…
Relay…

Fit

Good for, not for

Good for

  • Small groups, about 2 to 16 people
  • Real-time, session-length things: games, quiz nights, whiteboards, pair editing, watch parties, "join my session"
  • Single-file and AI-made apps with no backend
  • Keeping data between the people using it

Not for

  • Large audiences or broadcast
  • Data that must outlive the host's tab
  • Games where the host must not be able to cheat (the host runs the rules)
  • Hosting from a phone in the background: the host's tab must stay open and visible
Security

What the operator can and can't do

Status

Pre-release (0.1)

The protocol, operator and SDK work end to end and are tested in Chromium, Firefox and WebKit. Expect rough edges.

WhatWhere
SDK (ES module, ~19 KB gzipped, no dependencies)https://byoc.infinitefun.com/v0/byoc.js
Public operator (the default)wss://api-byoc.infinitefun.com/v1, with STUN and TURN at api-byoc.infinitefun.com
API reference/llm.md, /llms.txt
Wire protocol/protocol.md

The public operator is free and rate-limited, with no uptime promise yet, and its TURN and relay are capped. You can run your own operator and pass host({ operators: ['wss://your-operator/v1'] }).