Issue initializing vault

Hello, i have an issue while doign the setup tutorial for self managed vault.

Context:
OS: Ubuntu 24.04.1 LTS
Vault version: 1.17.6 installed via snap

So, im doing the tutorial as root here is the step as a reminder

  1. Create a directory for storing the server data.
$ mkdir /tmp/vault-data
  1. Use openssl to generate a self-signed TLS certificate and key for the server to use, and write them to the files /tmp/vault-cert.pem and /tmp/vault-key.pem.
$ openssl req -x509 -newkey rsa:4096 -sha256 -days 365 \
    -nodes -keyout /tmp/vault-key.pem -out /tmp/vault-cert.pem \
    -subj "/CN=localhost" \
    -addext "subjectAltName=DNS:localhost,IP:127.0.0.1"
  1. Create a basic server configuration file at the path /tmp/vault-server.hcl.
$ cat > /tmp/vault-server.hcl << EOF
api_addr                = "https://127.0.0.1:8200"
cluster_addr            = "https://127.0.0.1:8201"
cluster_name            = "learn-vault-cluster"
disable_mlock           = true
ui                      = true

listener "tcp" {
address       = "127.0.0.1:8200"
tls_cert_file = "/tmp/vault-cert.pem"
tls_key_file  = "/tmp/vault-key.pem"
}

backend "raft" {
path    = "/tmp/vault-data"
node_id = "learn-vault-server"
}
EOF
  1. Start the server, and specify the full path to the server configuration file.
$ vault server -config=/tmp/vault-server.hcl

The server doesn’t start and i got the error: error loading configuration from /tmp/vault-server.hcl: stat /tmp/vault-server.hcl: no such file or directory

I aldready try to put the different file elsewhere on the my machine, to change ownership of file to vault but i got the same error. Obviously my files are existing but i think vault doesn’t have the right to read or access even with what a i tried.

Anyone got an idea please ?

solution: don t install vault via snap but only via apt