Skip to content

Setup using self signed certificates

Josh Rickard edited this page Nov 6, 2020 · 4 revisions

Setting up elk-tls-docker using self-signed certificates

This documentation relates to the setup of elk-tls-docker using self-signed certificates.

This documentation is for testing on your local network/system.

.env variable setup

Within your .env file you need to set STAGING to true. You can find more information about the .env here: Environment Variables

Run docker-compose

By default creation of self-signed certificates is used and makes the most sense when testing out this project. To do so you simply run the following command first:

docker-compose -f docker-compose.setup.yml run --rm certs

Once you run this yaml file, you should have all necessary certificates/keys. You can set passwords for all accounts within ELK but this is optional and it it will use the default password defined in your .env file under the ELASTIC_PASSWORD value.

Setting Passwords

The following section outlines an optional step of setting passwords for all accounts within ELK. By default we will use the value provided in your .env under the ELASTIC_PASSWORD for all accounts.

Let's run our ELK stack now:

docker-compose up -d

You will need to set passwords for all accounts. I recommend in a testing environment to create a single password and use this across all accounts - it makes it easier when troublehshooting.

We need to access the elasticsearch container and generate our passwords:

docker-compose exec elasticsearch bash
> bin/elasticsearch-setup-passwords interactive -u "https://0.0.0.0:9200"
# Set passwords for all accounts when prompted

For more information about generating passwords and certificates, please see our documentation in our WiKi

Running

Now that you have the correct certificates, we can now run elk-tls-docker and access it via our localhost.

docker-compose up -d

Access

You should now be able to access Kibana at your domain by going to your browser and entering:

NOTE: You may run into certificate issues by modern browsers like Chrome. Please see this section if you run into issues:

https://localhost:5601
# or
# https://0.0.0.0:5601

Feedback

As always, feedback, additions, and edits are always welcome. Please submit a pull request or create an issue in this repository.

Enjoy!

Clone this wiki locally