Installing Hosty locally
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.

What you need
- Git, and access to the Hosty repository on GitHub.
- Docker with Docker Compose. Docker Desktop has both.
- make. It comes with macOS and Linux. On Windows, use WSL.
Install
- Clone the repository and go into it:
git clone [email protected]:systemseed/hosty.git
cd hosty- Build the image. It takes a few minutes the first time:
make build- Open a shell in the container:
make cli- Inside the container, install the dependencies of Hosty CLI:
composer install --working-dir=/src/cli- Check that Hosty CLI works. It should list its commands:
hosty listTo 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 to your AWS account.
- An existing install: ask another admin to add your 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.