Hello. When running Ory Hydra within the docker c...
# ory-selfhosting
r
Hello. When running Ory Hydra within the docker container, is there something I need to do to make it accessible from the host machine? My
docker-compose
is as follows:
Copy code
hydra:  
  image: oryd/hydra:v2.2.0  
  depends_on:  
    - redis  
    - db  
  ports:  
    - "4444:4444" # Public port  
    - "4445:4445" # Admin port  
  healthcheck:  
    test: ["CMD-SHELL", " netstat -an | grep -q 4444"]  
    interval: 1s  
    timeout: 1s  
    retries: 10  
    start_period: 1s  
  env_file:  
    - .env.hydra  
  volumes:  
    - ./ory/hydra:/usr/local/conf/hydra  
  restart: unless-stopped  
  command: serve -c /usr/local/conf/hydra/hydra.yml all --dev  
  networks:  
    - some-network
The container is running well, but I can't access neither the public nor private endpoints from my host machine on
<http://127.0.0.1:4444>
/
<http://127.0.0.1:4445>
. Note: I can access the endpoints from within the container. What could I be missing?
What I've tried so far: • Updating
SERVE_PUBLIC_HOST
to
0.0.0.0
• Validated that there are no other services on those ports
Here's my
.env.hydra
env variable file
Removing my custom configs for
Copy code
SERVE_PUBLIC_PORT
SERVE_PUBLIC_HOST


SERVE_ADMIN_PORT
SERVE_ADMIN_HOST
seems to have resolved this issue
m
Glad you figured it out! We are usually not really able to help with container issues...