# Set up Corfedo

> Install Corfedo on one machine with Docker and get the setup secret for your workspace.

Source: https://docs.corfedo.ai/get-started/

You install Corfedo on the machine you work on, at `https://corfedo.localhost`, and finish with a setup secret for your workspace. To install on a server with its own domain, follow [Install on a single host](https://docs.corfedo.ai/operate/single-host/) instead and come back for the [workspace](https://docs.corfedo.ai/get-started/workspace/).

## Before you begin

- Linux (amd64 or arm64), or macOS with Docker Desktop for evaluation. Windows and WSL 2 are not supported.
- Docker Engine with Compose v2, `openssl` and `curl`. Your user can run `docker`.
- 8 GiB of memory, 2 CPUs and 40 GiB of free disk. See [Requirements](https://docs.corfedo.ai/operate/single-host/#requirements).
- An email address for the first account. It becomes the workspace administrator.

## Install

### Run the installer

```sh
curl -fsSL https://get.corfedo.ai | sh
```

Keep every default, and enter your email address and name when asked. The installer keeps Corfedo in `~/corfedo` and opens the setup page in your browser when it finishes. Trust the certificate first, then reload the page. If it stops part way, run the same command again and it continues where it stopped.

### Trust the local certificate

Your browser needs to trust the certificate of `corfedo.localhost` once. The installer prints the command for your system to run with `sudo`. An installation with its own domain and certificate skips this step.

**Commands for macOS, Linux and Firefox**

On macOS:

```sh
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ~/corfedo/generated/caddy-root.crt
```

On Linux:

```sh
sudo cp ~/corfedo/generated/caddy-root.crt /usr/local/share/ca-certificates/corfedo-local.crt && sudo update-ca-certificates
```

Firefox keeps its own certificate store. Import `~/corfedo/generated/caddy-root.crt` there too.

## Check the result

The installer ends with a summary like this:

```text
Corfedo <version> is running at https://corfedo.localhost/

Open https://corfedo.localhost/setup and enter the setup secret:
  <setup secret>

Sign in with the first account of the account service: ada@example.com
  temporary password: <password> (you choose a new one at first sign-in; it is not shown again)
```

> **Warning:** Keep the setup secret and the temporary password for the next page. The password is shown only once.

`sh ~/corfedo/install.sh status` shows the services and whether the installation is ready.

## Next step

[Set up your workspace](https://docs.corfedo.ai/get-started/workspace/) in the browser.
