# Docker: Baserow with Appsmith local self hosted

**URL:** https://community.baserow.io/t/docker-baserow-with-appsmith-local-self-hosted/4285
**Category:** Technical Help
**Tags:** docker, self-hosting, baserow
**Created:** [January 16, 2024, 4:04pm UTC](https://community.baserow.io/t/docker-baserow-with-appsmith-local-self-hosted/4285 "2024-01-16T16:04:43Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Edwinzap](https://community.baserow.io/letter_avatar_proxy/v4/letter/e/77aa72/32.png) [@Edwinzap](https://community.baserow.io/u/Edwinzap)
#### Post date: [January 16, 2024, 4:04pm UTC](https://community.baserow.io/t/docker-baserow-with-appsmith-local-self-hosted/4285/1 "2024-01-16T16:04:43Z")

</div>

0

I’m trying to use Baserow with Appsmith locally. Here is my docker-compose.yml:

```auto
version: "3.4"
services:
  appsmith:
    container_name: appsmith
    image: index.docker.io/appsmith/appsmith-ee
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./stacks:/appsmith-stacks
    restart: unless-stopped
    depends_on:
      - baserow
     
  baserow:
    container_name: baserow
    image: baserow/baserow:1.22.2
    environment:
      BASEROW_PUBLIC_URL: 'http://localhost:4001'
    ports:
      - "4001:80"
      - "4002:443"
    volumes:
      - baserow_data:/baserow/data
volumes:
  baserow_data:

```

(I tried first with another port then 443 or 80 for Appsmith but it did not work) With this, everything is working properly except I cannot do a simple curl from appsmith to baserow. If I try this: `curl -X GET -H "Authorization: Token mytoken" "http://baserow/api/database/fields/table/1172/"` It returns an error on AppSmith. If I try this cURL directly in my docker-destkop app I get this:

```auto
<!doctype html>
<html lang="en">
<head>
  <title>Bad Request (400)</title>
</head>
<body>
  <h1>Bad Request (400)</h1><p></p>
</body>
</html>

```

Finally, if I try the same cURL from my terminal (of my computer) it’s working but I use this: `curl -X GET -H "Authorization: Token mytoken" "http://localhost:4001/api/database/fields/table/1172/"`

Thanks for your help!

---

<div class="post-metadata">

### Author: ![olgatrykush](https://community.baserow.io/user_avatar/community.baserow.io/olgatrykush/32/219_2.png) [@olgatrykush](https://community.baserow.io/u/olgatrykush)
#### Post date: [January 16, 2024, 4:10pm UTC](https://community.baserow.io/t/docker-baserow-with-appsmith-local-self-hosted/4285/2 "2024-01-16T16:10:45Z")

</div>

Hello @Edwinzap, first of all, welcome to the Baserow community! 👋

We have @joseph_appsmith from AppSmith here. Joseph, do you have any ideas on how to solve this problem? 🙏

---

<div class="post-metadata">

### Author: ![joseph\_appsmith](https://community.baserow.io/user_avatar/community.baserow.io/joseph_appsmith/32/1036_2.png) [@joseph\_appsmith](https://community.baserow.io/u/joseph_appsmith)
#### Post date: [January 16, 2024, 4:51pm UTC](https://community.baserow.io/t/docker-baserow-with-appsmith-local-self-hosted/4285/3 "2024-01-16T16:51:24Z")

</div>

Hi @Edwinzap , just replace `localhost` with `host.docker.internal` in the url of the curl or API in Appsmith.

> **[Connect to Local Datasource | Appsmith](https://docs.appsmith.com/connect-data/how-to-guides/how-to-work-with-local-apis-on-appsmith?connect-method=localhost#datasource-on-localhost)**
>
> This guide helps you to connect your APIs or databases running on localhost with Appsmith using host.docker.internal or ngrok.

---

<div class="post-metadata">

### Author: ![Edwinzap](https://community.baserow.io/letter_avatar_proxy/v4/letter/e/77aa72/32.png) [@Edwinzap](https://community.baserow.io/u/Edwinzap)
#### Post date: [January 16, 2024, 7:01pm UTC](https://community.baserow.io/t/docker-baserow-with-appsmith-local-self-hosted/4285/4 "2024-01-16T19:01:41Z")

</div>

Thanks for helping me!  
I’m not quit sure to understand what you want me to try. I tried that:  
`curl -X GET -H "Authorization: Token mytoken" "http://host.docker.internal/api/database/fields/table/1172/"`  
=\> returns “Your API failed to execute” with a 401.

and also:  
`curl -X GET -H "Authorization: Token mytoken" "http://baserow/api/database/fields/table/1172/"`  
=\> returns “Your API failed to execute” with a 400.

I don’t see how the first option could work, baserow is in another container.

If I do a `ping baserow`, it’s working (from appsmith container). Same for `ping appsmith` (from baserow container).

Is it possible that it has something to do with that line in the docker-compose?

```auto
      BASEROW_PUBLIC_URL: 'http://localhost:4001'

```

---

<div class="post-metadata">

### Author: ![Edwinzap](https://community.baserow.io/letter_avatar_proxy/v4/letter/e/77aa72/32.png) [@Edwinzap](https://community.baserow.io/u/Edwinzap)
#### Post date: [January 16, 2024, 8:03pm UTC](https://community.baserow.io/t/docker-baserow-with-appsmith-local-self-hosted/4285/5 "2024-01-16T20:03:50Z")

</div>

Ok I found the solution. After checking the logs while sending the request with `curl -X GET -H "Authorization: Token mytoken" "http://baserow/api/database/fields/table/1172/"` I had an error saying that baserow host is not allowed and that I may need to add it to the ALLOWED\_HOSTS.

I found the environment parameter in [the documentation](https://baserow.io/docs/installation/configuration): BASEROW\_EXTRA\_ALLOWED\_HOSTS.  
So I added it in my docker-compose and now it’s working!

```yml
    environment:
      BASEROW_EXTRA_ALLOWED_HOSTS: baserow

```
