# Install on container- how to access to server? help please

**URL:** <https://forum.metasfresh.org/t/install-on-container-how-to-access-to-server-help-please/1851>\
**Category:** Uncategorized\
**Created:** [June 14, 2020, 11:40pm UTC](https://forum.metasfresh.org/t/install-on-container-how-to-access-to-server-help-please/1851 "2020-06-14T23:40:05Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aman\_Slamaa](https://forum.metasfresh.org/user_avatar/forum.metasfresh.org/aman_slamaa/32/704_2.png) [@Aman\_Slamaa](https://forum.metasfresh.org/u/Aman_Slamaa)\
**Post date:** [June 14, 2020, 11:40pm UTC](https://forum.metasfresh.org/t/install-on-container-how-to-access-to-server-help-please/1851/1 "2020-06-14T23:40:05Z")

</div>

i follow instruction of install metasfresh based on container. [https://docs.metasfresh.org/installation\_collection/EN/How\_do\_I\_setup\_the\_metasfresh\_stack\_using\_Docker.html](https://docs.metasfresh.org/installation_collection/EN/How_do_I_setup_the_metasfresh_stack_using_Docker.html)  
I write my local host to access : 192.18.72.142  
and the page doesn’t upload and i can’t access to metasfresh.  
what i do

---

<div class="post-metadata">

**Author:** ![julian.bischof](https://forum.metasfresh.org/user_avatar/forum.metasfresh.org/julian.bischof/32/36_2.png) [@julian.bischof](https://forum.metasfresh.org/u/julian.bischof)\
**Post date:** [June 15, 2020, 5:58am UTC](https://forum.metasfresh.org/t/install-on-container-how-to-access-to-server-help-please/1851/2 "2020-06-15T05:58:48Z")

</div>

Hi @Aman_Slamaa

In order to debug your issue, it’s best you provide more infos:  
a) what is the ip address of your docker-host which shall be reachable from your client PC where you run your browser  
b) what is the output of `docker ps`?  
c) can you post the contents of your `docker-compose.yml`?

Please note when posting output/configs here in the forum, it’s best to use a code-block

```
indent preformatted text by 4 spaces

```

This is necessary to check if your indentation in your `docker-compose.yml` is fine.

Cheers,  
Julian.

---

<div class="post-metadata">

**Author:** ![Aman\_Slamaa](https://forum.metasfresh.org/user_avatar/forum.metasfresh.org/aman_slamaa/32/704_2.png) [@Aman\_Slamaa](https://forum.metasfresh.org/u/Aman_Slamaa)\
**Post date:** [June 16, 2020, 12:13am UTC](https://forum.metasfresh.org/t/install-on-container-how-to-access-to-server-help-please/1851/3 "2020-06-16T00:13:15Z")

</div>

Hi julian  
it is my first time i install docker and metasfesh  
a) i open web browser on same machine that i insatll metasfresh on it.  
i write dockerhost: 172.17.0.1  
b) the output of docker ps is:

 ![image](https://forum.metasfresh.org/uploads/default/original/1X/98c61b70918f9ceffcda71a66da7e8d912604e7e.png)

---

<div class="post-metadata">

**Author:** ![Aman\_Slamaa](https://forum.metasfresh.org/user_avatar/forum.metasfresh.org/aman_slamaa/32/704_2.png) [@Aman\_Slamaa](https://forum.metasfresh.org/u/Aman_Slamaa)\
**Post date:** [June 16, 2020, 12:16am UTC](https://forum.metasfresh.org/t/install-on-container-how-to-access-to-server-help-please/1851/4 "2020-06-16T00:16:50Z")

</div>

c) the content of docker-compose.yml is:  
\> db:  
\> build: db  
\> restart: always  
\> volumes:  
\> - ./volumes/db/data:/var/lib/postgresql/data  
\> - ./volumes/db/log:/var/log/postgresql  
\> - /etc/localtime:/etc/localtime:ro  
\> - /etc/timezone:/etc/timezone:ro  
\> environment:  
\> - METASFRESH\_USERNAME=metasfresh  
\> - METASFRESH\_PASSWORD=metasfresh  
\> - METASFRESH\_DBNAME=metasfresh  
\> - DB\_SYSPASS=System  
\> - POSTGRES\_PASSWORD=ip2LmNzXX8p8iXg9lZTWEJ9524kQDbXFudB7LR03T-xK9fLweX3TLMkA2AYcEiaS  
\> app:  
\> build: app  
\> hostname: app  
\> links:  
\> - db:db  
\> - rabbitmq:rabbitmq  
\> - search:search  
\> expose:  
\> - “8282”  
\> - “61616”  
\> - “8788”  
\> restart: always  
\> volumes:  
\> - ./volumes/app/log:/opt/metasfresh/log:rw  
\> - ./volumes/app/heapdump:/opt/metasfresh/heapdump:rw  
\> - /etc/localtime:/etc/localtime:ro  
\> - /etc/timezone:/etc/timezone:ro  
\> environment:  
\> - METASFRESH\_HOME=/opt/metasfresh  
\> webapi:  
\> build: webapi  
\> links:  
\> - app:app  
\> - db:db  
\> - rabbitmq:rabbitmq  
\> - search:search  
\> expose:  
\> - “8789”  
\> # to access the webui-api directly  
\> # (eg. for debugging or connecting your app to the metasfresh api)  
\> # uncomment following port:  
\> #ports:  
\> #- “8080:8080”  
\> restart: always  
\> volumes:  
\> - ./volumes/webapi/log:/opt/metasfresh-webui-api/log:rw  
\> - ./volumes/webapi/heapdump:/opt/metasfresh-webui-api/heapdump:rw  
\> - /etc/localtime:/etc/localtime:ro  
\> - /etc/timezone:/etc/timezone:ro  
\> webui:  
\> build: webui  
\> links:  
\> - webapi:webapi  
\> ports:  
\> - “80:80”  
\> - “443:443”  
\> restart: always  
\> volumes:  
\> - /etc/localtime:/etc/localtime:ro  
\> - /etc/timezone:/etc/timezone:ro  
\> #uncomment and set to URL where metasfresh will be available from browsers  
\> #environment:  
\> #- WEBAPI\_URL=http://192.168.72.142:8080  
\> rabbitmq:  
\> build: rabbitmq  
\> expose:  
\> - “5672”  
\> restart: always  
\> volumes:  
\> - ./volumes/rabbitmq/log:/var/log/rabbitmq/log  
\> - /etc/localtime:/etc/localtime:ro  
\> - /etc/timezone:/etc/timezone:ro  
\> environment:  
\> RABBITMQ\_DEFAULT\_USER: “metasfresh”  
\> RABBITMQ\_DEFAULT\_PASS: “metasfresh”  
\> RABBITMQ\_DEFAULT\_VHOST: “/”  
\> search:  
\> build: search  
\> ulimits:  
\> memlock:  
\> soft: -1  
\> hard: -1  
\> nofile:  
\> soft: 65536  
\> hard: 65536  
\> cap\_add:  
\> - IPC\_LOCK  
\> # to access the search api directly  
\> # (e.g. if you did docker-compose up search to have the deachboard with your locally running metasfresh services)  
\> # uncomment following ports:  
\> # ports:  
\> # - “9200:9200”  
\> # - “9300:9300”  
\> volumes:  
\> - ./volumes/search/data:/usr/share/elasticsearch/data  
\> - /etc/localtime:/etc/localtime:ro  
\> - /etc/timezone:/etc/timezone:ro  
\> environment:  
\> - “ES\_JAVA\_OPTS=-Xms128M -Xmx256m”  
\> restart: always

---

<div class="post-metadata">

**Author:** ![xxkk](https://forum.metasfresh.org/letter_avatar_proxy/v4/letter/x/ea666f/32.png) [@xxkk](https://forum.metasfresh.org/u/xxkk)\
**Post date:** [August 9, 2020, 11:54pm UTC](https://forum.metasfresh.org/t/install-on-container-how-to-access-to-server-help-please/1851/5 "2020-08-09T23:54:15Z")

</div>

Hi Julian, a newbie here. Same problem. I’m running Docker Desktop WSL.

- I followed these instructions ([https://medium.com/@callback.insanity/using-docker-with-windows-subsystem-for-linux-wsl-on-windows-10-d2deacad491f](https://medium.com/@callback.insanity/using-docker-with-windows-subsystem-for-linux-wsl-on-windows-10-d2deacad491f))

- and your doc ([How to set up the metasfresh stack using Docker?](https://docs.metasfresh.org/installation_collection/EN/How_do_I_setup_the_metasfresh_stack_using_Docker.html)).

- Only changed at docker-compose.yml `environment: - WEBAPI_URL=http://localhost:80`

- On Docker, everything seems working fine: 

but I just get this on the browser:

```
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<meta name="mobile-web-app-capable" content="yes">
<link rel="icon" type="image/png" href="[/favicon.png](http://localhost/favicon.png)">
<title>Metasfresh</title>
</head>
<body>
<div id="root"></div>
<script src="[/config.js](http://localhost/config.js)"></script>
<script type="text/javascript" src="[/bundle-2240a5322580a3d9d144-git-23515c5.js](http://localhost/bundle-2240a5322580a3d9d144-git-23515c5.js)"></script></body>
</html>

```

Any solution? thanks

---

<div class="post-metadata">

**Author:** ![julian.bischof](https://forum.metasfresh.org/user_avatar/forum.metasfresh.org/julian.bischof/32/36_2.png) [@julian.bischof](https://forum.metasfresh.org/u/julian.bischof)\
**Post date:** [August 10, 2020, 5:48am UTC](https://forum.metasfresh.org/t/install-on-container-how-to-access-to-server-help-please/1851/6 "2020-08-10T05:48:38Z")

</div>

Hi @xxkk

Can you post your `docker-compose.yml ` file in here (you may want to redact some internal sensitive information like hostname or IPs).

Most of these issues are due to wrong `docker-compose.yml` settings.

Cheers

---

<div class="post-metadata">

**Author:** ![xxkk](https://forum.metasfresh.org/letter_avatar_proxy/v4/letter/x/ea666f/32.png) [@xxkk](https://forum.metasfresh.org/u/xxkk)\
**Post date:** [August 10, 2020, 7:25am UTC](https://forum.metasfresh.org/t/install-on-container-how-to-access-to-server-help-please/1851/7 "2020-08-10T07:25:26Z")

</div>

Here it’s my docker-compose.yml:

```
 db:
  build: db
  restart: always
  volumes:
    - ./volumes/db/data:/var/lib/postgresql/data
    - ./volumes/db/log:/var/log/postgresql
    - /etc/localtime:/etc/localtime:ro
    - /etc/timezone:/etc/timezone:ro
  environment:
    - METASFRESH_USERNAME=metasfresh
    - METASFRESH_PASSWORD=metasfresh
    - METASFRESH_DBNAME=metasfresh
    - DB_SYSPASS=System
    - POSTGRES_PASSWORD=ip2LmNzXX8p8iXg9lZTWEJ9524kQDbXFudB7LR03T-xK9fLweX3TLMkA2AYcEiaS
app:
  build: app
  hostname: app
  links:
    - db:db
    - rabbitmq:rabbitmq
    - search:search
  expose:
    - "8282"
    - "61616"
    - "8788"
  restart: always
  volumes:
    - ./volumes/app/log:/opt/metasfresh/log:rw
    - ./volumes/app/heapdump:/opt/metasfresh/heapdump:rw
    - /etc/localtime:/etc/localtime:ro
    - /etc/timezone:/etc/timezone:ro
  environment:
    - METASFRESH_HOME=/opt/metasfresh
webapi:
  build: webapi
  links:
    - app:app
    - db:db
    - rabbitmq:rabbitmq
    - search:search
  expose:
    - "8789"
# to access the webui-api directly 
# (eg. for debugging or connecting your app to the metasfresh api) 
# uncomment following port:
  #ports:
   #- "8080:8080"
  restart: always
  volumes:
    - ./volumes/webapi/log:/opt/metasfresh-webui-api/log:rw
    - ./volumes/webapi/heapdump:/opt/metasfresh-webui-api/heapdump:rw
    - /etc/localtime:/etc/localtime:ro
    - /etc/timezone:/etc/timezone:ro
webui:
  build: webui
  links:
    - webapi:webapi
  ports:
    - "80:80"
    - "443:443"
  restart: always
  volumes:
    - /etc/localtime:/etc/localtime:ro
    - /etc/timezone:/etc/timezone:ro
  #uncomment and set to URL where metasfresh will be available from browsers
  environment:
    - WEBAPI_URL=http://localhost:8080
rabbitmq:
  build: rabbitmq
  expose:
    - "5672"
  restart: always
  volumes:
    - ./volumes/rabbitmq/log:/var/log/rabbitmq/log
    - /etc/localtime:/etc/localtime:ro
    - /etc/timezone:/etc/timezone:ro
  environment:
    RABBITMQ_DEFAULT_USER: "metasfresh"
    RABBITMQ_DEFAULT_PASS: "metasfresh"
    RABBITMQ_DEFAULT_VHOST: "/"
search:
  build: search
  ulimits:
    memlock:
      soft: -1
      hard: -1
    nofile:
      soft: 65536
      hard: 65536
  cap_add:
    - IPC_LOCK
# to access the search api directly
# (e.g. if you did docker-compose up search to have the deachboard with your locally running metasfresh services)
# uncomment following ports:
# ports:
# - "9200:9200"
# - "9300:9300"
  volumes:
    - ./volumes/search/data:/usr/share/elasticsearch/data
    - /etc/localtime:/etc/localtime:ro
    - /etc/timezone:/etc/timezone:ro
  environment:
    - "ES_JAVA_OPTS=-Xms128M -Xmx256m"
  restart: always
```

---

<div class="post-metadata">

**Author:** ![julian.bischof](https://forum.metasfresh.org/user_avatar/forum.metasfresh.org/julian.bischof/32/36_2.png) [@julian.bischof](https://forum.metasfresh.org/u/julian.bischof)\
**Post date:** [August 10, 2020, 8:58am UTC](https://forum.metasfresh.org/t/install-on-container-how-to-access-to-server-help-please/1851/8 "2020-08-10T08:58:54Z")

</div>

Hi @xxkk

It looks like you set `WEBAPI_URL` to `http://localhost:8080` but on the other hand you set `webui` host-bound ports to `80` and `443`.

The variable-name of `WEBAPI_URL` is unfortunately somewhat misleading and although this is used to tell your browser where your API is accessible, the request itself is usually handled by the `webui` container.

You need to set `WEBAPI_URL` to the URL where metasfresh (webui-port) will be available from browsers - see the example `docker-compose.yml` in here: [https://docs.metasfresh.org/installation\_collection/EN/How\_do\_I\_setup\_the\_metasfresh\_stack\_using\_Docker.html](https://docs.metasfresh.org/installation_collection/EN/How_do_I_setup_the_metasfresh_stack_using_Docker.html)

* * *

In order to solve your issue, you have two possibilities:

1. Change `WEBAPI_URL` to `http://localhost` (assuming you want to access metasfresh via browser using [http://localhost](http://localhost) in the URL bar if your browser is running on the same machine as the metasfresh-stack  
Note: on Windows you might run into permission issues when trying to run a service on `localhost` `80/TCP`

OR

1. Change the `port` part in your `webui` section to use port `8080` on your host and leave `WEBAPI_URL` as it is right now:

```auto
...
webui:
...
  ports:
    - "8080:80"
...
  environment:
    - WEBAPI_URL=http://localhost:8080

```

After that, just restart your docker-compose project. After everything has booted up (might take a few minutes, depending on your hardware) you should be able to access metasfresh using your browser:  
Solution 1: `http://localhost`  
Solution 2: `http://localhost:8080`
