user674669
user674669

Reputation: 12352

Unable to access vault ui while running vault in docker: 404 page not found

I am running vault in docker like:

$ docker run -it  --rm -p 8200:8200  vault:0.9.1

I have unsealed the vault:

$ VAULT_ADDR=http://localhost:8200 VAULT_SKIP_VERIFY="true" vault operator unseal L6M8O7Xg7c8vBe3g35s25OWeruNDfaQzQ5g9UZ2bvGM=
Key             Value
---             -----
Seal Type       shamir
Initialized     false
Sealed          false
Total Shares    1
Threshold       1
Version         0.9.1
Cluster Name    vault-cluster-52a8c4b5
Cluster ID      96ba7037-3c99-5b6e-272e-7bcd6e5cc45c
HA Enabled      false

However, I can't access the UI http://localhost:8200/ui in firefox. The error is:

404 page not found

enter image description here

Do you know what I am doing wrong? Does the vault docker image in docker hub have UI compiled in it?

Upvotes: 2

Views: 4771

Answers (2)

Alex Konkin
Alex Konkin

Reputation: 736

I observed this behavior with the Vault 0.10.3 (https://releases.hashicorp.com/vault/0.10.3/vault_0.10.3_linux_amd64.zip) when I put the adjustment that enabled ui in the very bottom of the vault configuration file (etc. config.json), so Config that returns a 404 error looks like one below:

{
"listener": [{
"tcp": {
"address" : "0.0.0.0:8200",
"tls_disable" : 1
}
}],
"api_addr": "http://172.16.94.10:8200",
"storage": {
    "consul" : {
      "address" : "127.0.0.1:8500",
      "path": "vault"
    }
   }
 },
"max_lease_ttl": "10h",
"default_lease_ttl": "10h",
"ui":"true"
}

and one that works with Vault 0.10.3 has a ui in the very top of its configuration file:

{
"ui":"true",
"listener": [{
"tcp": {
"address" : "0.0.0.0:8200",
"tls_disable" : 1
}
}],
"api_addr": "http://172.16.94.10:8200",
"storage": {
    "consul" : {
      "address" : "127.0.0.1:8500",
      "path": "vault"
    }
   }
 },
"max_lease_ttl": "10h",
"default_lease_ttl": "10h"
}

Upvotes: 2

bagljas
bagljas

Reputation: 850

Web UI was opensourced in v0.10.0, so v0.9.1 doesn't have Web UI. Here is blog announcing release and CHANGELOG for v0.10.0 - take a look at FEATURES subsection.

To see Web UI in web browser try running this command:

$ docker run -it  --rm -p 8200:8200  vault:0.10.0

However, I would suggest using more recent Vault version, as there have been many improvements and bug fixes in the meantime. Also features added in the Web UI, so if you follow latest documentation, some of the things described there might not be available in older versions.

Upvotes: 3

Related Questions