# Install and run

FuzzyShare is one static binary and a data directory. There is no database. Anything that can run a process can host it.

## Build

You need Go 1.24 or newer.

```sh
git clone https://github.com/mahmoud-emad/fuzzyshare && cd fuzzy
make build                 # produces ./fuzzy
```

`make build` makes a static, stripped binary. The browser UI and these documentation pages are embedded in it.

## Run

```sh
FUZZY_ADDR=:8080 FUZZY_DIR=./data ./fuzzy serve
```

The server logs to standard output. Open `http://localhost:8080` and get a key, or register from the terminal:

```sh
./fuzzy register --url http://localhost:8080 --name "Ada Lovelace" --email ada@example.com
```

`make run` builds and starts it with the defaults.

## Try it with curl

```sh
curl -X POST localhost:8080/register -d '{"full_name":"Ada Lovelace","email":"ada@example.com"}'
export FUZZY_KEY=fuzzy_...   # the key from the response; it is shown once
curl -H "Authorization: Bearer $FUZZY_KEY" -T report.pdf "localhost:8080/files/report.pdf?ttl=7d"
```

## Before real use

- Put it behind **HTTPS**: keys travel in every request. See [HTTPS and reverse proxies](self-hosting-https.md).
- Set an **admin key** (`FUZZY_ADMIN_KEY`) if you want to list and remove users.
- Decide who can register: set `FUZZY_SIGNUP_CODE` for a closed group.
- Read [Security](self-hosting-security.md) and the [privacy page](legal-privacy.md), which you should adapt to your service.
- Run it as a service: [systemd or Docker](self-hosting-docker.md).

## Serve the CLI downloads

The install one-liners (`/install.sh`, `/install.ps1`) download binaries from `/dl/`. The server serves them from `FUZZY_DL_DIR` (default `<FUZZY_DIR>/dl`): `fuzzy-linux-amd64`, `fuzzy-linux-arm64`, `fuzzy-darwin-amd64`, `fuzzy-darwin-arm64`, `fuzzy-windows-amd64.exe`, `checksums.txt` and `VERSION`. The deploy pipeline builds and ships them; see [Upgrades and backups](self-hosting-operations.md).

## Data on disk

Everything is a plain file under `FUZZY_DIR`. See [Architecture](contributing-architecture.md#storage).
