Garamoff
Garamoff

Reputation: 94

Can't connect to Vault web ui

Can't connect to Vault Web UI. I used docker-compose to create vault container. Trying to connect from another machine using ip address, but have error:

ERR_CONNECTION_REFUSED

docker-compose.yml:

version: '2'
services:
vault:
image: vault
container_name: vault
ports:
  - "8200:8200"
environment:
  - VAULT_ADDR=http://127.0.0.1:8200
  - VAULT_API_ADDR=http://127.0.0.1:8200
restart: always
volumes:
  - /var/lib/vault/volumes/logs:/vault/logs
  - /var/lib/vault/volumes/file:/vault/file
  - /var/lib/vault/volumes/config:/vault/config
cap_add:
  - IPC_LOCK
entrypoint: vault server -config=/vault/config/vault.hcl`

vault.hcl:

ui = true

storage "file" {
path = "/var/lib/vault/data"
}

listener "tcp" {
address = "127.0.0.1:8200"
tls_disable = "true"
}

Upvotes: 2

Views: 1060

Answers (1)

Garamoff
Garamoff

Reputation: 94

127.0.0.1 - it's ip address of localhost. It means listening on only local interface (loopback).

So, for connect from another machine, you should use ip address 0.0.0.0 in configuration files above, which means listening on every available network interface.

Upvotes: 2

Related Questions