https://www.growthbook.io/ logo
#announcements
Title
# announcements
s

some-umbrella-45927

04/19/2023, 4:58 PM
Hi, Im trying to self-host using MacOS arm64, but am not able to connect to the GrowthBook API (see image). Could someone please provide me with some guidance? Thank you in advance.
b

blue-hamburger-60411

04/19/2023, 5:24 PM
Are you using docker? Can you share the docker compose config file if you have made any local changes? What do you get when you hit GB api http://localhost:3100 directly? I'm also new to growthbook, but if you don't mind I can take a look.
Also check container logs for any errors
s

some-umbrella-45927

04/19/2023, 6:18 PM
Hi, thanks for your reply. This is the docker compose config file I am using, I added `platform: "linux/amd64"`:
When I hit the api directly, I get a "Load failed" error:
Also, do you know where we can find the logs? And http://localhost:3100/ on start up is there, but becomes unresponsive.
b

better-magician-65629

04/19/2023, 6:59 PM
a contributor ran into a similar problem. can you set the following environment variable:
Copy code
DOCKER_DEFAULT_PLATFORM=linux/amd64 docker-compose up -d
this is the PR they provided for us to update the docs: https://github.com/growthbook/growthbook/pull/1194 did you want to test their suggestions to see if it works and let us know?
b

blue-hamburger-60411

04/19/2023, 7:06 PM
adding
DOCKER_DEFAULT_PLATFORM
should help as suggested above. for logs, I check the container logs using
docker container logs -f <container_name>
container name could be something like
growthbook_growthbook_1
f

fresh-football-47124

04/19/2023, 7:32 PM
connecting directly to the api (port 3100) should give you a small json object
if this is not working, its often from not setting the JWT_SECRET and ENCRYPTION_KEY when setting to production mode
s

some-umbrella-45927

04/19/2023, 8:20 PM
Thanks for the help. Got it to work after adding
DOCKER_DEFAULT_PLATFORM
and using an earlier version of MongoDB 5.0+ as "MongoDB 5.0+ requires a CPU with AVX support, and your current system does not appear to have that!"
🙌 1
b

blue-hamburger-60411

04/19/2023, 9:12 PM
Glad to hear that @some-umbrella-45927 may I suggest you to update the docker compose file to contain platform directive at 2 places as suggested on the PR, this way related configs stay in one place.
s

some-umbrella-45927

04/21/2023, 9:24 PM
@blue-hamburger-60411 This is the docker compose file that got it to run; however, having memory issues leading to "load failed" error.
Copy code
version: "3"
services:
  mongo:
    image: "mongo:4.4.6"
    environment:
      - MONGO_INITDB_ROOT_USERNAME=root
      - MONGO_INITDB_ROOT_PASSWORD=password
  growthbook:
    image: "growthbook/growthbook:latest"
    platform: "linux/amd64"
    ports:
      - "3000:3000"
      - "3100:3100"
    depends_on:
      - mongo
    environment:
      - MONGODB_URI=<mongodb://root:password@mongo:27017/>
    volumes:
      - uploads:/Users/Hajime.Alabanza/growthbook/data/
volumes:
  uploads:
12 Views