# Set server.basePath and server.host in docker file

**URL:** <https://discuss.elastic.co/t/set-server-basepath-and-server-host-in-docker-file/239979>\
**Category:** Kibana\
**Tags:** docker\
**Created:** [July 6, 2020, 9:22am UTC](https://discuss.elastic.co/t/set-server-basepath-and-server-host-in-docker-file/239979 "2020-07-06T09:22:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AsfK](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/asfk/32/58995_2.png) [@AsfK](https://discuss.elastic.co/u/AsfK)\
**Post date:** [July 6, 2020, 9:22am UTC](https://discuss.elastic.co/t/set-server-basepath-and-server-host-in-docker-file/239979/1 "2020-07-06T09:22:27Z")

</div>

Hello

I have this (working) docker-compose.yml file (before server. tries):

> version: '3'  
> services:  
> elasticsearch:  
> image: [docker.elastic.co/elasticsearch/elasticsearch:7.6.2](http://docker.elastic.co/elasticsearch/elasticsearch:7.6.2)  
> environment:  
> - node.name=es01  
> - cluster.name=es-docker-cluster  
> - "discovery.type=single-node"  
> ports:  
> - 9200:9200
> 
> kibana:  
> depends\_on:  
> - elasticsearch  
> image: [docker.elastic.co/kibana/kibana:7.6.2](http://docker.elastic.co/kibana/kibana:7.6.2)  
> ports:  
> - 5601:5601

With locally kibana I could edit kibana.yml and set server.basePath and server.host (and then do redirect to kibana address using java tomcat servelt ) but I not success to do it via the docker image.  
I tried to add them under environment:

> environment:  
> - "server.basePath: /kibana"  
> - "server.host: 0.0.0.0"

The docker us running but I still can access Kibana via the regular url ([http://localhost:5601](http://localhost:5601))

I'll be glad to know what the correct way to initialize those parameters via docker file.

Thank you very much!

---

<div class="post-metadata">

**Author:** ![Larry\_Gregory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/larry_gregory/32/34969_2.png) [@Larry\_Gregory](https://discuss.elastic.co/u/Larry_Gregory)\
**Post date:** [July 6, 2020, 1:54pm UTC](https://discuss.elastic.co/t/set-server-basepath-and-server-host-in-docker-file/239979/2 "2020-07-06T13:54:14Z")

</div>

Hey @AsfK,

Kibana requires a different config format for docker, in order to be compatible with orchestration systems: [https://www.elastic.co/guide/en/kibana/current/docker.html#environment-variable-config](https://www.elastic.co/guide/en/kibana/current/docker.html#environment-variable-config)

Try specifying this format instead:

```auto
environment:
- "SERVER_BASEPATH=/kibana"
- "SERVER_HOST=0.0.0.0"

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 3, 2020, 1:54pm UTC](https://discuss.elastic.co/t/set-server-basepath-and-server-host-in-docker-file/239979/3 "2020-08-03T13:54:17Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
