---
title: Installing Hosty locally
slug: hosty/installing-hosty-locally
createdAt: 2026-11-08T11:27:49.007Z
---

Admins manage Hosty from their own computer, inside a Docker container that has every tool they need. This page shows how to set it up.

## What you get

`make cli` opens a shell in a container with:

- **AWS CLI**, to work with the AWS account;
- **OpenTofu**, the open source fork of Terraform, to apply the infrastructure;
- **kubectl** and **Helm**, to work with the Kubernetes clusters;
- **Hosty CLI** in admin mode, to deploy and manage projects;
- PHP, Composer and the Docker CLI, which Hosty CLI needs.

The code of Hosty isn't copied into the container but shared with it. Whatever you change in the repository on your computer works in the container straight away, without rebuilding the image.

![Your computer and the Hosty container](https://api.archbee.com/api/optimize/J5fagZai1i-rRUBgkgJC3/Sz6W6bBNRby8zDO6H5Dgv_hosty-local-setup.png)

## What you need

- **Git**, and access to the Hosty repository on GitHub.
- **Docker** with **Docker Compose**. [Docker Desktop](https://docs.docker.com/get-docker/) has both.
- **make**. It comes with macOS and Linux. On Windows, use [WSL](https://learn.microsoft.com/windows/wsl/install).

## Install

1. Clone the repository and go into it:

   ```bash
   git clone git@github.com:systemseed/hosty.git
   cd hosty
   ```
2. Build the image. It takes a few minutes the first time:

   ```bash
   make build
   ```
3. Open a shell in the container:

   ```bash
   make cli
   ```
4. Inside the container, install the dependencies of Hosty CLI:

   ```bash
   composer install --working-dir=/src/cli
   ```
5. Check that Hosty CLI works. It should list its commands:

   ```bash
   hosty list
   ```

To leave the container, run `exit`. Next time, `make cli` is all you need.

## What the container shares with your computer

| On your computer              | In the container                          | What for                                  |
| ----------------------------- | ----------------------------------------- | ----------------------------------------- |
| `cli/`, `helm/`, `terraform/` | `/src/cli`, `/src/helm`, `/src/terraform` | The code of Hosty                         |
| `~/.aws`                      | `/src/.aws`                               | Your AWS access keys and the MFA session  |
| `.kube/` in the repository    | `/root/.kube`                             | Access to the clusters, kept between runs |
| `../basilio`                  | `/src/project`                            | A project to try Hosty CLI on             |
| The Docker socket             | `/var/run/docker.sock`                    | Building images of projects               |

The project is set in `compose.yml`. To try Hosty CLI on another project, change `../basilio` to the folder of that project.

Your AWS keys stay in `~/.aws` on your computer, so you set them up once, and they survive rebuilds of the image.

## Keep it up to date

After you pull new changes of Hosty:

- run `make build` again if `.env` or `Dockerfile.admins` changed, for example with new versions of the tools;
- run `composer install --working-dir=/src/cli` in the container again if `cli/composer.lock` changed.

## Next steps

- **A new install of Hosty**: [apply the Hosty blueprint](https://wiki.systemseed.com/hosty/applying-hosty-blueprint) to your AWS account.
- **An existing install**: ask another admin to [add your user](https://wiki.systemseed.com/hosty/adding-a-new-user). Then, in the container, save your access keys with `aws configure --profile=hosty.user`, and start a session with `hosty auth` and a code from your authenticator app. The session lasts 12 hours. The clusters are reachable only through the VPN, so ask for your VPN profile too.
