New environment not dev

Hello I’m looking for documentation on how I can create my first admin user.

I just spun up a new instance in docker and I see that postgres has all it’s tables etc.
When trying to login via webui no credentials work. When Trying to create an account via the CLI it says I’m not authenticated. Which I’m trying to show any documentation which would point me what -flags I need to put in.

boundary accounts create password -auth-method-id=ampw_bB2CHxJLmw
-login-name=“admin” -password=“password” -name=admin -keyring-type=none
-description=“admin account”

Error from controller when performing create on password-type account

Error information:
Kind: Unauthenticated
Message: Unauthenticated, or invalid token.
Status: 401
context: Error from controller when performing create on password-type account


What Docker command did you use to start Boundary?

I mostly run everything through portainer, for easier management. So I start and stop through there, but I can run this command to start it via the cmd line.

docker run \
  --network host \
  -p 9200:9200 \
  -p 9201:9201 \
  -p 9202:9202 \
  -v "$(pwd)":/boundary/ \
  -e 'BOUNDARY_POSTGRES_URL=postgresql://postgres:postgres@' \

@omkensey Do you have to run in dev mode to setup the first user?

Docker start to start the already existing container.

If you run in dev mode, Boundary runs Postgres itself (in a Docker container) and creates a starter user, etc. in that database in one step. When you run in non-dev mode, you have to run Postgres yourself and point Boundary at it – but besides just running the database, there’s an extra database init step that needs to be done before you start the controller, that controls how things get set up initially. You can have that step generate an admin user as the first user, or do that later manually or with Terraform using the recovery KMS key you configured.

You said you already have Postgres initialized, so I assume you did the database init already, but just to be sure, can you list the tables in the database? Also, the database connection string in your Boundary container environment has as the host to connect to – that should probably be either localhost/, or a container/host IP that Postgres is reachable on. Also I think you need to run the Boundary container with server as the argument to the container entrypoint, rather than boundary.

What do the logs in the Boundary Docker container look like?