Revyl Documentation

Runtime / Web

Web builds

Build a Web bundle with Revyl, or register a preview deployment you already host as a build.

Web is available to every organization on every plan. Web builds and Web sessions each use 83.33 compute credits per second, equivalent to $0.05 per minute at the standard overage price; plans with included credits use those credits first, and build promotions such as BUILDREVYL lower the Web build rate.

A Web build is either a bundle built by Revyl or a registered deployment URL. Managed builds run your recipe locally or on Revyl's build runners, then upload a verified bundle. URL builds open an existing preview deployment. You choose and configure your deployment host; Revyl doesn't generate a host-specific CI workflow.

For framework-specific recipes, see Next.js or Vite. The Web overview covers deployed previews from any framework.

Set up with an agent

Paste one prompt and your coding agent does the rest.

Setup prompt

Set up Web builds for this app in Revyl.

Read https://docs.revyl.com/builds/web.md and follow it. It's the current Revyl guide for this, so prefer it over anything you remember about Revyl.

If `revyl` is missing, install it with `curl -fsSL https://revyl.com/setup | sh` (on Windows, use the PowerShell installer on https://docs.revyl.com/install.md), then put it on the PATH of the shell you run it from with `export PATH="$HOME/.revyl/bin:$PATH"`; if it is already installed, run `revyl upgrade`. If `revyl auth status` shows I am not signed in, run `revyl auth login` in the background (or a second terminal) and give me the approval URL it prints as a clickable link. The request expires after 10 minutes; if it does, run `revyl auth login` again. If browser approval is not possible, ask me for a `REVYL_API_KEY`, export it in your shell, and never write it into a file.

Create the Web app with `revyl app create --name '<repo> web' --platform web --json`. If the app already deploys previews, register each preview URL with `revyl build upload --platform web --url <url> --app <web-app-id>`; otherwise add a Web recipe so `revyl build` builds the bundle.

You're done when a Web build of the app appears in Revyl and opens in a Web session.

Ask me before anything that needs my login or approval.

If a step fails or is blocked, or I stop or change course partway, also report it to the Revyl team yourself, without asking me: run `revyl feedback --type bug "<report>"` when Revyl broke, or `revyl feedback --type friction "<report>"` when it worked but was harder than it should have been. Name the step you reached, what blocked it, and where I stopped. Report a setup that only succeeded after a workaround as friction. Never include secrets or my app's data or code. If the CLI rejects `--type friction`, use `--type other`; if Revyl is not installed or signed in yet, tell me instead.

Create a Web app

In the dashboard, click Create app, pick Web, and optionally enter your first deployed website URL, such as example.com. Web apps don't need a package or bundle ID. To add a URL later, click Upload build on the Builds page, pick the Web app, and enter the URL.

From the CLI, in the app's own folder, not a monorepo root:

revyl init -y
revyl app create --name "My Web App" --platform web

revyl init doesn't detect Web frameworks, package managers, or preview hosts, create a Web app, or write a Web recipe. Add the app to .revyl/config.yaml yourself:

build:
  profiles:
    preview:
      web:
        app_id: <web-app-id>

This app-ID-only profile supports URL registration and session start. A Web-only build needs no build.framework, and a Web recipe can sit beside ios and android recipes.

Build a Web bundle

Add a recipe with your project's package manager and build command:

build:
  profiles:
    preview:
      web:
        app_id: <web-app-id>
        setup_commands: [npm ci]
        build_commands: [npm run build]
        output_path: dist
revyl build --build-profile preview --platform web
revyl build --build-profile preview --platform web --local

The default runs remotely; --remote is also accepted. --local uses your installed toolchain and still uploads the result. Both paths use the same recipe, app association, and build lifecycle. Remote builds require a Git commit and record the original HEAD even when the source includes local edits.

output_path must be one dedicated project-relative output directory, without globs. Only its contents enter the .tar.zst bundle, not the source checkout. Symlinks, special files, .git, .revyl, .env*, and credential files are rejected. Compressed and unpacked data are each limited to 1 GiB, with at most 20,000 archive entries and 1,024-byte paths. Static output needs an index.html at its root.

revyl build requires explicit build_commands and output_path; it never guesses a build command or turns an app-only profile into a recipe. Building a URL-only profile fails with profile <name> is URL-only; add build_commands and output_path, or register previews with revyl build upload --url.

Server-rendered apps

Package the server and all of its runtime dependencies inside the output directory, and give a start command relative to the bundle root:

output_path: dist-server
run:
  start: node server.js
  port: 3000
  healthcheck: /health
  start_timeout_seconds: 60
  env_keys: [APP_URL]
  secret_names: [API_TOKEN]

Remote Web recipes build on Linux ARM64; bundled servers run on Linux x86-64. Native Node dependencies must include binaries for the session runtime, not only the build machine. Use a hosted preview if you cannot package compatible dependencies.

The server must listen on all interfaces (0.0.0.0) at the configured port, not only localhost or 127.0.0.1; the browser reaches it at http://revyl-app.localhost:<port>. Revyl sets HOSTNAME=0.0.0.0 and PORT for the process. The app is ready when GET <healthcheck> returns any 2xx or 3xx status; redirects aren't followed. A localhost-only app fails the health check with couldn't connect to revyl-app:<port>. The defaults are port 3000, healthcheck /, and a 60-second startup timeout (10 to 600 seconds allowed).

The server's own outbound requests, for example to your API, don't come from Revyl's allowlisted Web address; only the browser's requests do.

Without run.start, the session serves static output. A request for a missing path without a file extension gets <path>.html when that file exists, otherwise the root index.html, so client-side routes and clean URLs load on reload or deep link. A missing asset such as /app.js still returns 404.

run.env_keys names existing plaintext organization launch variables, and run.secret_names names encrypted ones. These are names, never values or KEY=VALUE assignments. They're injected only into the app process when the session starts it, not into the browser or the build. Build-time settings stay in env and secrets, as for mobile recipes. Never bake secrets into the output directory.

Register a preview from CI

revyl build upload --platform web --url https://pr-42.example.dev --json
  • App. --app <name-or-id> selects the Web app. Without it, the command reads build.profiles.<name>.web.app_id. Profiles that name different Web apps need --app.
  • URL. A public address such as pr-42.example.dev. Revyl adds https:// when the scheme is missing and upgrades http://. It rejects credentials, a query string or fragment, localhost, single-label hosts, and private network addresses, because the browser runs in Revyl's cloud. Revyl doesn't fetch anything when it registers the URL.
  • Pull request. The command stores the same CI metadata on the build as mobile uploads do. GitHub Actions and Buildkite are detected automatically. On any other runner, pass --repo owner/name --commit <full PR head SHA>, and add --pr <number> to choose the pull request explicitly. --commit requires --repo.
  • Branch. --branch <name> registers the build on that Revyl branch, creating it if needed; without it, the build lands on the app's default branch. Give each pull request its own branch (for example --branch pr-42) so previews never become what the default branch opens.
  • Latest. Registering the same URL and commit again returns the existing build ("was_reused": true) and makes it its branch's latest.

--file, --header, --version, --pin, --set-current, --no-set-current, --preview, and --name are rejected by build upload --platform web.

pr_review.build.profile can name a profile with a complete Web build recipe. Naming a URL-only Web profile there is rejected with the same URL-only error.

To run proof of changes on registered previews, set pr_review.build.kind: ci_upload_to_revyl with app_ids.web instead of naming a profile. Revyl matches the registered URL to the pull request by repository and head SHA. See Use your own CI: Web previews for the config and a GitHub deployment_status example.

Open a build

revyl device start --platform web

This opens the newest Web build on the app's default branch, using the app from config. --branch <name> opens the newest build on that branch, --all-branches the newest across every branch, and --build-version-id a specific build. --url registers a URL (on --branch when given) and opens it in one step. --build-selection inherit and pinned aren't available for Web. See Sessions to start one from the dashboard.

When a bundle's app fails

If a bundle's app can't start, or exits during the session, the session fails with a specific reason, for example "Your app exited before it was ready (exit code 1)", a health check that didn't return 2xx or 3xx in time, a bundle that didn't match the build's size or checksum, or a missing launch variable named in run.env_keys or run.secret_names. The CLI, MCP tools, and the session's failure state in the app all show the reason.

Revyl keeps the last 64 KiB of the app's combined stdout and stderr. Members of the organization see the last lines in the live session's failure state and in the session report, and can download the whole log from either. Public report links show only the reason. Values of the variables injected through run.env_keys and run.secret_names, and token-shaped strings such as JWTs and signed-URL signatures, are redacted before the output leaves the session.

When the site's certificate is invalid

If the site serves an SSL certificate that doesn't match its domain, has expired, or is self-signed, the browser refuses to open it and the session fails with the certificate error, for example net::ERR_CERT_COMMON_NAME_INVALID. To open the site anyway, turn on Ignore certificate errors under Browser in the app's General settings. Every Web session for the app then ignores certificate errors, including test runs and explorations, but not Web sessions on a computer. Turn it on only for sites you trust.

On this page