# Installation

Expose is a single binary for macOS, Linux and Windows (Intel and ARM). It has no dependencies: you don't need PHP, Node.js or anything else to run it.

## macOS and Linux

Run the install script in your terminal:

```bash
curl -fsSL https://expose.dev/install.sh | sh
```

The script downloads the latest release for your system, checks it against the release's checksums and installs `expose` to `~/.local/bin`. It doesn't need `sudo`, and Expose can keep itself up to date there.

If `~/.local/bin` isn't in your `PATH` yet, the script prints the command that adds it for your shell. For Zsh, the default on macOS, that is:

```bash
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc
```

To install somewhere else, set `EXPOSE_INSTALL_DIR`. The script asks for `sudo` if your user can't write to that directory, but then Expose can't update itself:

```bash
curl -fsSL https://expose.dev/install.sh | EXPOSE_INSTALL_DIR=/usr/local/bin sh
```

The macOS binaries are signed and notarized by Apple.

### Alternative: Homebrew on macOS

If you prefer Homebrew, you can install the [Expose cask](https://formulae.brew.sh/cask/expose) instead:

```bash
brew install --cask expose
```

## Windows

Run the install script in PowerShell:

```powershell
irm https://expose.dev/install.ps1 | iex
```

It installs `expose.exe` to `%LOCALAPPDATA%\Programs\Expose` and adds that directory to your user `PATH`. You don't need administrator rights.

## Laravel Herd

If you are using [Laravel Herd](https://herd.laravel.com), Expose is already available in your terminal and you are ready to go. You can also connect your Expose account in the "Sharing" tab of the Herd settings.

## Check the installation

```bash
expose --version
```

After that, you are ready to [share your first site](https://ws.expose.dev/docs/getting-started/sharing-your-first-site). The first time you share a site, Expose opens your browser so you can [log in](https://ws.expose.dev/docs/getting-started/authentication).

## Updating the Expose client

Expose keeps itself up to date: whenever you share a site, it checks for a new version in the background and installs it. The next time you share a site, you run the new version and Expose tells you which version it updated to. To turn this off, set `EXPOSE_DISABLE_AUTOUPDATE=1` in your environment.

Expose can only update itself if your user can write to the directory it is installed in. If it can't, it tells you when a new version is available instead. You can also update it yourself with the `self-update` command, or by running the install command again:

```bash
expose self-update
```

If you installed Expose to a directory that your user can't write to, such as `/usr/local/bin`, run `sudo expose self-update`.

If you installed Expose with Homebrew, update it with:

```bash
brew upgrade --cask expose
```

## The PHP client

Before version 4, Expose was a PHP application. The PHP client still works and you can install it with Composer, if you have PHP installed:

```bash
composer global require exposedev/expose
```

Make sure that your global Composer `bin` directory is in your `PATH`.

The PHP client is the only one that runs your own [request plugins](https://ws.expose.dev/docs/advanced-usage/request-plugins). The native client includes the built-in plugins for GitHub, Stripe, Paddle Billing and Magic Login.
