# Install

## Requirements

- Debian/Ubuntu with `apt`, x86_64, kernel ≥ 5.11
- ≥ 2 GB RAM (4 recommended), ≥ 4 GB free under `/var/lib` (8 recommended)
- a desktop (tested: GNOME on Ubuntu 24.04)
- sudo once during setup

`bash setup.sh --check` checks all of this **without changing anything**.

## Getting it

> **Not released yet — there is nothing to download yet.** Source and packages will be published once the final
> security review is done. Two ways are planned: a package with a checksum (just what's needed) and a git clone.
> Deliberately **no** `curl … | bash`: with a security tool, look first, then run.

Once you have the source, in its folder:

```bash
bash setup.sh --check      # checks only, changes nothing
bash setup.sh --install
```

onionpod is an **independent project** and not affiliated with the Tor Project. When building the box, `setup.sh`
downloads Tor Browser directly from [torproject.org](https://www.torproject.org/) and verifies its signature.

## What happens during installation

1. Check the environment, show missing packages and install them after asking (Podman, TigerVNC, …)
2. **One** sudo prompt: create the box user `onionpod`, programs to `/opt/onionpod`, rules to `/etc`
3. Build the box images — downloads Tor Browser and **verifies its signature** (a few minutes)
4. Questions: set a lock password? Icon on the desktop?
5. Trial run: start the box, leak test, stop the box

A progress bar shows where things stand; `--verbose` shows everything in detail. Every run writes a log to
`~/.local/state/onionpod/setup-<date>.log`.

## Update

```bash
onionpod update             # since v1.0.0 — or: bash setup.sh --update
```

`setup.sh` detects by itself where it came from:

- **git clone:** fetches new versions (tags), fast-forwards (`--ff-only`, never over your own changes)
- **package:** asks `LATEST`, downloads the new package, checks SHA-256, paths and version, and installs it over the source

It also checks whether a newer Tor Browser exists. If everything is up to date: “No update needed” (`--force`
reinstalls anyway).

## Uninstall

```bash
onionpod uninstall            # asks whether the box data (bookmarks) should go too
onionpod uninstall --dry-run  # only shows what would be removed
```
