Lightpanda is an installer and runner for the Lightpanda headless browser.
This package fetches binaries from the u2i fork build of Lightpanda, which carries an extra patch sending session cookies on the WebSocket upgrade request — required for cookie-authenticated WS endpoints (e.g. Phoenix LiveView). The release tag, download URL, and checksums are baked in; there are no knobs for swapping the source. If you need an unpatched upstream binary, depend on a different installer.
Configuration
Configure in your config/config.exs:
config :lightpanda,
default: [
args: ~w(serve --host 127.0.0.1 --port 9222)
]Global options
:path- point at a locally-built binary on disk instead of the one this package downloads. Takes a full file path, not a directory. Intended for developers working on the lightpanda fork itself who want to test rebuilds without republishing the package. Production users should leave this unset.:install_dir- directory where the binary is installed and looked for. The package always picks the filename (lightpanda-<target>), so consumers set only the directory. Relative paths are resolved against the current working directory (File.cwd!/0) — e.g.".browsers"resolves to<project_root>/.browsers/lightpanda-<target>, matching the convention used by Chrome for Testing and Puppeteer. May also be set via theLIGHTPANDA_INSTALL_DIRenvironment variable; the config key takes precedence when both are present.
Precedence: :path (full file) overrides :install_dir (directory),
which overrides the default location under _build/.
Profiles
Each profile accepts:
:args- arguments to pass to the lightpanda binary.:cd- the working directory.:env- environment variables as a map of string key/value pairs.
Summary
Functions
Returns the path to the Lightpanda binary.
Ensures the Lightpanda binary is installed.
Installs the Lightpanda binary by downloading it from the u2i fork
release for the configured @release tag.
Installs the binary if missing, then runs it with the given profile and extra arguments.
Returns the release tag of the Lightpanda binary this package downloads.
Runs the Lightpanda binary with the given profile and extra arguments.
Returns the platform target string (e.g., "aarch64-macos").
Functions
Returns the path to the Lightpanda binary.
By default this is _build/lightpanda-<target>. Override via
:path (full file path) or :install_dir /
LIGHTPANDA_INSTALL_DIR (directory; the package supplies the
per-target filename). See the module doc for precedence.
Ensures the Lightpanda binary is installed.
Concurrent callers are deduplicated via an internal installer
GenServer so that parallel install_and_run/2 invocations (or
Lightpanda.Server startups) only download once.
Installs the Lightpanda binary by downloading it from the u2i fork
release for the configured @release tag.
Installs the binary if missing, then runs it with the given profile and extra arguments.
Returns the exit status.
Returns the release tag of the Lightpanda binary this package downloads.
Runs the Lightpanda binary with the given profile and extra arguments.
Returns the platform target string (e.g., "aarch64-macos").