Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Docker for Bitshares Elasticsearch

How to deploy

1. Clone the code

$ git clone
$ cd dockerfile/bts-es

2. Edit the docker-composer.yaml

If you want to setup a single node cluster, please use docker-composer.yaml.single

  • ES_JAVA_OPTS=-Xms3g -Xmx3g can edit your elastic memory usage.
  • ELASTIC_PASSWORD is your elastic password. Please edit --elasticsearch-basic-auth at the same time.
  • #ports: - 9200:9200, if you want to export elastic search http port directly, uncomment this.
  • #ports: - 5601:5601, if you want to export kibana http port directly, uncomment this.

3. Edit password of kibana

Open kibana.yml file and edit the elasticsearch.password to the elastic search password.

4. Create certs

$ docker run \
    -it --rm \
    -v $(pwd)/ssl:/usr/share/elasticsearch/config/certs \ \


# elasticsearch-certutil ca

# elasticsearch-certutil cert --ca elastic-stack-ca.p12

# mv *.p12 config/certs/
# chown 1000:1000 config/certs/*.p12

# exit

5. Increase the vm.max_map_count

$ sudo sysctl -w vm.max_map_count=262144

To set this value permanently, update the vm.max_map_count setting
in /etc/sysctl.conf. To verify after rebooting, run sysctl vm.max_map_count.

6. Edit kibana password

$ vim kibana.yml

Please change elasticsearch.password to your password.

7. Run

$ docker-compose up -d

If you use single node cluster, please run these commands to set number_of_replicas to 0.

$ curl -u elastic:123456 -XPUT "" -H 'Content-Type: application/json' -d'
  "index_patterns": ["*"],
  "settings": {
    "number_of_replicas": 0

Other Commands

1. Check logs

$ docker-compose logs -f --tail 100

2. Stop

$ docker-compose down

3. Check if elastic search is online

$ curl -u elastic:123456 -X GET ''

123456 is the password which you have set in docker-compose.yml.

4. Add es01 into nginx network

If you have nginx which deployed by docker, you can add es01 container
into nginx network. And then nginx can proxy to es01.

Assume that nginx container network's name is lnmp.

docker network connect --ip lnmp es01

Anonymous account

My es node url(HK) :
My es node url(US) :
The anonymous account
Username: bts
Password: btsbts

Any question?

Please be easy to commit an issue if you have any question.

My bitshares account: ety001
My witness account: liuye

You can’t perform that action at this time.