briqbriq
Guides

Expose a preview URL

Give a running service a public URL, with or without a token.

Briqs are private by default. briq_expose publishes one port and returns an HTTPS URL.

Modes

ModeWho can reach itUse
publicEveryoneDemos, webhooks from anyone
tokenAnyone with the URL you were givenSharing a preview with a reviewer; webhooks from a known sender

The token is enforced by briq's router, not by the service behind it. On the first visit the router turns the ?briq_token= in the URL into a cookie and redirects to the clean address, so the link can be shared once and then navigated normally. A key-only mode (requests carrying a briq API key) is planned; it is not offered until it is enforced.

Example

briq_run({ image: "ghcr.io/acme/web:pr-412", stack: "preview", ports: [3000], env: { PORT: "3000" }, wait: true })
→ running bq_9a2fk3m8q1zt · ghcr.io/acme/web:pr-412 · small · cost so far €0.01 · stops at 19:10

briq_expose({ briq: "bq_9a2fk3m8q1zt", port: 3000, mode: "token" })
→ https://web-preview.briq.run/?t=eyJhbGciOi… · cost so far €0.01 · stops at 19:10

The URL is stable for the lifetime of the briq, and exposing the same port again keeps it. Stopping the briq returns 503 on the endpoint; destroying it removes the endpoint.

Addresses

Every endpoint gets its own hostname: https://<briq>-<stack>-<team>.briq.run (the stack is omitted when it is default). Expose as many briqs as you like; each answers on its own name.

Notes

  • The service must listen on :: (all interfaces, IPv6 included), not localhost and not 0.0.0.0 alone — the provider network is IPv6-only, so an IPv4-only bind is unreachable.
  • Only HTTP is proxied. For TCP services such as Postgres, keep them private and reach them from another briq in the same stack.
  • Each endpoint appears in briq_status and in the dashboard; the audit log records who created it.