Installation
Pick the install path that matches how you work locally. The CLI command is always jetty (Go binary, Composer vendor/bin/jetty, or PHAR installed to your PATH). You need a server name and token from Bridge (see Getting started in the app for copy-paste lines for this deployment).
After install, configure the client, then share a local site—see Sharing local sites for port vs --site (local upstream) examples.
Go CLI (jetty) and edge agent (jetty-edge)
Best when you want the reference implementation and WebSocket tunneling to your own or hosted edge.
- Download
jettyandjetty-edgefor your platform from your team’s release page (or build from thecli/directory in the Jetty repository). - Add the binaries to your
PATHand ensure they are executable (chmod +x jetty jetty-edgeon Unix). - Point the CLI at this app using the server name shown in Bridge and your token:
jetty config set server your-server-name
jetty config set token your-token-here
Environment variables are also supported:
export JETTY_SERVER="your-server-name"
export JETTY_TOKEN="your-token-here"
- Share a local port (example: dev server on 8000):
jetty share 8000
Docker and host.docker.internal are covered step-by-step in Bridge → Getting started when you use the container install option there.
PHP: Composer (jetty/client)
Ideal if you already use Composer and want a PHP-native build of the same CLI.
composer require jetty/client
vendor/bin/jetty version
Configure:
jetty config set server your-server-name
jetty config set token your-token-here
Then:
jetty share 8000
PHP: PHAR
Single-file PHAR (PHP 8.2+, curl, zlib; the installer also needs Python 3 plus git when falling back to Composer or Go). Releases ship jetty-php.phar (or jetty.phar) on cli-v* GitHub Releases when you run the Release CLI workflow.
One-line install (from your Jetty app)
curl -fsSL "https://your-jetty.example.com/install/jetty.sh" | bash
By default (--method auto, or set JETTY_INSTALL_METHOD=auto) the script:
- Tries the latest PHAR from GitHub Releases (same repo your app injects).
- If there is no PHAR yet, clones that repo and runs
composer global require jetty/client:@devusing a path repository pointing atjetty-client/(needs PHP 8.2+ and Composer). - If Composer is missing or fails, clones the repo and runs
go buildincli/(needs Go 1.22+).
Force one path explicitly:
curl -fsSL "https://your-jetty.example.com/install/jetty.sh" | bash -s -- --method phar
curl -fsSL "https://your-jetty.example.com/install/jetty.sh" | bash -s -- --method composer
curl -fsSL "https://your-jetty.example.com/install/jetty.sh" | bash -s -- --method go
Clone cache defaults to ~/.local/share/jetty/repo (JETTY_SRC_DIR to override).
When a PHAR is used, it is installed as jetty under ~/.local/bin (or /usr/local/bin with --sudo). The script can append the right bin directory to your ~/.zshrc or ~/.bashrc. Then reload your shell so PATH is picked up:
exec "$SHELL" -l
Configure and share:
jetty config set server your-server-name
jetty config set token your-token-here
jetty share 8000
Use --dry-run on the same bash pipeline to only print the resolved release and download URL. For /usr/local/bin, add --sudo to the installer.
The legacy URL https://your-jetty.example.com/install/jetty-php.sh serves the same script.
Manual download
Download the jetty-php.phar (or jetty.phar) asset from your team’s GitHub Releases, chmod +x, put it on your PATH as jetty, or run php /path/to/file.phar ….
Updates: set JETTY_CLI_GITHUB_REPO=owner/repo for PHAR installs; run jetty update to refresh the CLI (PHAR from GitHub or composer update jetty/client when installed via Composer; self-update is an alias). See jetty-client README.
Token and interactive checklist
- Register or log in.
- Open Bridge and go to Getting started for platform-specific downloads, env snippets, and
jetty shareexamples wired to this deployment. - Create a personal API token under Tokens or step 2 of Getting started and store it securely—treat it like a password.
Operators: self-hosted edge
Running your own jetty-edge and wildcard DNS is optional. If you administer the stack, open Network and edge deployment in Bridge (account required) for TLS, DNS, and verification details.