# Installation

Source: https://laraport.app/docs/installation/

> Install laraport with Homebrew on macOS or Linux, from a release on Linux, or in WSL2 on Windows. What it needs on your computer and on your servers.

## Homebrew

On macOS and Linux:

```bash
brew install alexbabintsev/tap/laraport
```

Upgrade later with:

```bash
brew upgrade laraport
```

laraport tells you when a new version is out: once a day it asks GitHub for its latest release and says so on the home screen, with the command to upgrade. See [Checking for new versions](https://laraport.app/docs/configuration/#checking-for-new-versions) for what it sends and how to turn it off.

## Linux without Homebrew

The latest release for your architecture, a single binary with nothing else to install:

```bash
version=$(curl -fsSLo /dev/null -w '%{url_effective}' https://github.com/alexbabintsev/laraport/releases/latest | sed 's|.*/v||')
arch=$(uname -m | sed 's/x86_64/amd64/; s/aarch64/arm64/')
curl -fsSL "https://github.com/alexbabintsev/laraport/releases/download/v$version/laraport_${version}_linux_$arch.tar.gz" | tar -xz laraport
sudo install laraport /usr/local/bin/
```

Repeat it to upgrade.

## Windows

There is no native build for Windows. laraport should run in WSL2 with either install above, but it has not been tested there yet. If you try it, [tell us how it went](https://github.com/alexbabintsev/laraport/issues).

Inside WSL, laraport sees Linux, not Windows:

- **Local Docker**: the `docker` command has to work inside WSL. Turn on WSL integration for your distribution in Docker Desktop, or install Docker Engine in WSL.
- **SSH**: keys and `~/.ssh/config` are read from your home in WSL, not from `C:\Users\you\.ssh`. Copy them over and run `chmod 600` on the keys. The `ssh-agent` of Windows is not visible from WSL, so start one inside it if you use an agent.
- **Shells on servers**: these run the `ssh` command, so WSL needs `openssh-client`.
- **Tunnels**: they listen on `127.0.0.1` in WSL. WSL2 forwards `localhost` to Windows by default, so TablePlus or DBeaver on Windows should reach them.
- **Copying**: it needs a terminal with OSC 52, such as Windows Terminal. See [Troubleshooting](https://laraport.app/docs/troubleshooting/#copying-does-nothing).
- **Downloads**: files land in `~/Downloads` in WSL by default. Open them from Windows through `\\wsl$\`.

## Requirements

On your computer:

- macOS or Linux ([WSL2 on Windows](#windows)), any terminal with 256 colours or true colour. Layouts work down to 40×12.
- An SSH key for your servers, as a file or in `ssh-agent`. The same key you use with `ssh` works.

On the servers:

- Docker, reachable by the SSH user. If the user is not in the `docker` group, set `docker_cmd: "sudo -n docker"` for the server (see [Servers and SSH](https://laraport.app/docs/servers/)).
- Nothing else. laraport installs nothing on the server or in the containers.

Some features use tools inside the container when they are there: `psql`, `mysql` or `redis-cli` for the database screens, `php` for the Laravel features. The container screen only shows what the container can do.
