zitadel: Quickstart not working on Linux

Describe the bug

Cannot get started using the quickstart

To Reproduce

Steps to reproduce the behavior:

I am following: https://github.com/caos/zitadel/blob/main/guides/quickstart.md

My assumption with the quickstart is that, after running the command:

COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 \
&& docker-compose -f ./build/local/docker-compose-local.yml --profile database -p zitadel up --exit-code-from db-migrations \
&& sleep 5 \
&& docker-compose -f ./build/local/docker-compose-local.yml --profile database --profile init-backend --profile init-frontend --profile backend --profile frontend --profile setup -p zitadel up -d

Expected behavior

I would see two things:

  1. the following text appears:
++=========++
|| ZITADEL ||
|| STARTED ||
++=========++
  1. At that point, I will be be able to go to http://localhost:4200/

Is this correct?

Desktop (please complete the following information):

  • OS: Ubuntu 20.04
  • Browser: Chrome, cURL

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 48 (29 by maintainers)

Most upvoted comments

After some debugging:

Docker Buildkit

In the docker daemon.json the { “buildkit”: true } is important to activate

{
  "data-root": "/docker",
  "hosts": ["tcp://0.0.0.0:5732", "unix:///var/run/docker.sock"],
  "features": { "buildkit": true }
}

Hostname

The name host.docker.internal does not work with linux

while [[ $be_status -ne 200 || $fe_status -ne 200 ]]; do
    sleep 5
    be_status=$(curl -s -o /dev/null -I -w "%{http_code}" host.docker.internal:${BE_PORT}/clientID)
    fe_status=$(curl -s -o /dev/null -I -w "%{http_code}" host.docker.internal:${FE_PORT}/assets/environment.json)
    echo "backend (${be_status}) or frontend (${fe_status}) not ready yet"
done

This relates to https://github.com/caos/zitadel/pull/2076

yes on it

{
  "registry-mirrors": [],
  "insecure-registries": [],
  "debug": false,
  "experimental": false,
  "features": {
    "buildkit": true
  },
  "builder": {
    "gc": {
      "enabled": true,
      "defaultKeepStorage": "20GB"
    }
  }
}

The frontend is definitely running, so something must be strange with the go part of the project

image

i. The zitadel_zitadel-setted-up will output zitadel started.

ii. It looks to me like the zitadel_db_1 container crashed if youre using an mac m1. If not I would check if i can connect to the database and if zitadel can connect to the database

Appreciate the writeup. Let’s close this and make a note that additional work needs to be done: https://github.com/caos/zitadel/issues/2081

You can use my keys here https://github.com/fforootd.keys

OK, DM’s at https://gitter.im/fforootd

This is really strange, you are running an Ubuntu there? Because all the outputs from your CLI don’t look like Buildkit

How about placing the settings in your docker daemon.json?

You can use my keys here https://github.com/fforootd.keys

ffo@pc-ffo:~/go/src/github.com/caos/zitadel$ which $SHELL
/bin/bash
ffo@pc-ffo:~/go/src/github.com/caos/zitadel$ bash --version
GNU bash, version 5.0.16(1)-release (x86_64-pc-linux-gnu)

Most of us use bash on MacOS or Ubuntu

Hm it looks like it resets the COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 to 0 again after the first command is run

What happens when you input COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 && docker-compose -f ./build/local/docker-compose-local.yml --profile database --profile init-backend --profile init-frontend --profile backend --profile frontend --profile setup -p zitadel up

Now trying:

COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 && docker-compose -f ./build/local/docker-compose-local.yml --profile database -p zitadel up --exit-code-from db-migrations && sleep 5 && docker-compose -f ./build/local/docker-compose-local.yml --profile database --profile init-backend --profile init-frontend --profile backend --profile frontend --profile setup -p zitadel up

I guess you are missing COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1

I tried it once more

  1. docker system prune -a
COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 && docker-compose -f ./build/local/docker-compose-local.yml --profile database -p zitadel up --exit-code-from db-migrations && sleep 5 && docker-compose -f ./build/local/docker-compose-local.yml --profile database --profile init-backend --profile init-frontend --profile backend --profile frontend --profile setup -p zitadel up

worked on the first approach 🤷

After a stop and restart it works with me 😁

image

@gc-ss do you have the same problem?

It defaults to version 2 btw. 😁

ffo@pc-ffo:~/go/src/github.com/caos/zitadel$ docker --version
Docker version 20.10.7, build f0df350
ffo@pc-ffo:~/go/src/github.com/caos/zitadel$ docker-compose --version
Docker Compose version v2.0.0-beta.6

The setup looks working image

so it must be something when zitadel starts

Also, can you tell me what command you typed in the fresh box? Was anything different from:

I did use your exact command

Well I think that is not necessary with a fresh setup it get the following:

image

Let me dig in why this happens

@gc-ss hm, let me cross check what happens on a “fresh” machine. I will try it ASAP on a WSL2 Ubuntu