Skip to content
Rollberry
Docs

Localhost Captures

Capture local development servers with retry behavior, localhost HTTPS tolerance, and wait conditions that match the current implementation.

Why localhost is a first-class workflow#

Rollberry is designed to record development environments, not just public URLs.

npx rollberry capture http://localhost:3000 --out ./artifacts/local.mp4

For localhost URLs, the current implementation adds:

  • retry behavior for transient connection failures
  • localhost HTTPS tolerance for self-signed certificates

Waiting for the app to be ready#

Use --wait-for to start capture at the right moment:

npx rollberry capture http://localhost:3000 \
  --out ./artifacts/local.mp4 \
  --wait-for selector:body

Other valid forms are:

  • load
  • selector:<css>
  • ms:<n>

Examples:

npx rollberry capture http://localhost:3000 --wait-for selector:#app
npx rollberry capture http://localhost:3000 --wait-for ms:2000

Common framework ports#

  • Next.js: http://localhost:3000
  • Vite: http://localhost:5173
  • Astro: http://localhost:4321

Localhost HTTPS#

If your preview server uses HTTPS on localhost, Rollberry tolerates the local certificate problem automatically for localhost targets:

npx rollberry capture https://localhost:3000 --out ./artifacts/secure.mp4

This behavior is for localhost-style hosts such as localhost and 127.0.0.1.

Pairing localhost with project rendering#

Project files work especially well for local previews because the scene URLs can point at your app before deployment:

{
  "scenes": [
    { "name": "home", "url": "http://localhost:3000" },
    { "name": "pricing", "url": "http://localhost:3000/pricing" }
  ]
}

If the server is slow to start#

Increase the capture timeout:

npx rollberry capture http://localhost:3000 \
  --out ./artifacts/local.mp4 \
  --timeout 60000

Next step#

See Troubleshooting if the capture still starts too early or cannot connect.