# Install the agent (https://optakt.ai/docs/install)

Run this on your agent's machine—the computer or server where Optakt One will run:

```bash
curl -fsSL https://get.optakt.ai | bash
```

On the first run, paste your [licence key](/docs/licence). It is checked before anything is downloaded. The script then downloads the `optakt` command for your agent's machine, verifies it against the release checksum, and starts the installer. On Linux it asks for your sudo password once; on a Mac, only to place the `optakt` command in `/usr/local/bin`.

## The four screens [#the-four-screens]

Nothing happens on your agent's machine that a screen has not shown first.

1. **Configure Provider.** Choose your model provider and how you sign in: an API key, a subscription, or the address of a local model server. The connection is tested at once. Then choose the model your agent thinks with. You can change it later.
2. **Setup Database.** On a machine without PostgreSQL, choose *Managed by Optakt*, and PostgreSQL 18 is installed and set up for you. If you already run PostgreSQL, it stays yours: the installer uses it without taking it over, or you give it the address of a server you manage elsewhere.
3. **Deploy Service.** Name your agent, and create your owner account: name, email and password. Then paste your Telegram bot token. A shared Voyage AI key is filled in during launch; we strongly recommend your own key. ElevenLabs is recommended if you want to use voice notes. Both are [optional services](/docs/optional-services).
4. **Execute Installation.** The installer sets everything up and shows each command as it runs: the service account and folders, the database, the tools that read documents and voice notes, and the service itself. It then checks that the service answers.

The last screen links to your bot on Telegram. Enter opens the [admin app](/docs/admin-app). Next: [your first conversation](/docs/first-conversation).

## If the install stops [#if-the-install-stops]

### Using a database you manage [#using-a-database-you-manage]

An existing or remote server must run PostgreSQL 18 with `vector`, `pg_search`, `pg_trgm` and `uuid-ossp`. `pg_search` must be in `shared_preload_libraries`. The application user needs `pg_read_all_settings` to check those settings. The installer names any missing requirement and stops; it does not take over a database server you manage.

### Continuing the install [#continuing-the-install]

The installer names the check that failed and why. Fix what it names, then run it again:

```bash
sudo optakt install
```

On a Mac, `optakt install`, without sudo. It continues from what is already in place.

Every command is logged, in `/var/log/optakt-install.log` on Linux and in `~/Library/Logs/io.optakt.one/install.log` on a Mac.

## On a Mac [#on-a-mac]

Optakt One installs for the person who runs it, the way a Mac app does: everything lives under `~/Library/Application Support/io.optakt.one`, and it runs in your own session. PostgreSQL comes from [Postgres.app](https://postgresapp.com), in its own copy beside the rest.

On an Intel Mac, one database extension is built from source. The installer says so first, asks for your administrator password if Xcode's command line tools are missing, and the build can take up to two hours.

## Already installed [#already-installed]

Running the command again on a machine with a working installation offers an [upgrade](/docs/upgrade) instead.
