# Deploy FusionAuth docker images is not Working

**URL:** <https://community.fly.io/t/deploy-fusionauth-docker-images-is-not-working/6519>\
**Category:** Questions / Help\
**Tags:** docs, postgres\
**Created:** [August 23, 2022, 12:22pm UTC](https://community.fly.io/t/deploy-fusionauth-docker-images-is-not-working/6519 "2022-08-23T12:22:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![duke](https://avatars.discourse-cdn.com/v4/letter/d/e8c25b/32.png) [@duke](https://community.fly.io/u/duke)\
**Post date:** [August 23, 2022, 12:22pm UTC](https://community.fly.io/t/deploy-fusionauth-docker-images-is-not-working/6519/1 "2022-08-23T12:22:49Z")

</div>

Hey, am trying to deploy fusionAuth images. The deployment was successful and the app is running but i cant visit the url.

On my local machine, i can visit the page on localhost but on [Fly.io](http://Fly.io) it said is `Running` but i cant visit the page, from the logs the application should be running on localhost so am expecting that i should be able to visit the page

`Dockerfile`

```auto
FROM fusionauth/fusionauth-app:latest as build

FROM debian:buster-slim
RUN apt-get update && apt-get install -y \
    curl \
    ca-certificates \
    --no-install-recommends

#RUN addgroup fusionauth && adduser -G fusionauth -D -H fusionauth
RUN groupadd fusionauth
RUN useradd -r -s /bin/sh -g fusionauth -u 1001 fusionauth

# copy FusionAuth from other image.
COPY --chown=fusionauth:fusionauth --from=build /usr/local/fusionauth /usr/local/fusionauth
ENV FUSIONAUTH_APP_URL="http://0.0.0.0:9011"

CMD ["/usr/local/fusionauth/fusionauth-app/bin/start.sh"]

```

---

<div class="post-metadata">

**Author:** ![kurt](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/kurt/32/43757_2.png) [@kurt](https://community.fly.io/u/kurt)\
**Post date:** [August 23, 2022, 10:53pm UTC](https://community.fly.io/t/deploy-fusionauth-docker-images-is-not-working/6519/3 "2022-08-23T22:53:57Z")

</div>

This probably means the health checks are failing. If you run `fly status` you should see health check information.

This usually happens when the service _only_ binds to localhost/127.0.0.1. We need it to bind to 0.0.0.0 to be able to access it: [Troubleshooting your Deployment · Fly Docs](https://fly.io/docs/getting-started/troubleshooting/#host-checking)

---

<div class="post-metadata">

**Author:** ![duke](https://avatars.discourse-cdn.com/v4/letter/d/e8c25b/32.png) [@duke](https://community.fly.io/u/duke)\
**Post date:** [August 24, 2022, 9:23am UTC](https://community.fly.io/t/deploy-fusionauth-docker-images-is-not-working/6519/4 "2022-08-24T09:23:06Z")

</div>

Thanks @kurt for your response.

The `FusionAuth` is design to run at `localhost:9011`.  
Any recommendation or way to reverse it.

BTW, i have edited the post

---

<div class="post-metadata">

**Author:** ![duke](https://avatars.discourse-cdn.com/v4/letter/d/e8c25b/32.png) [@duke](https://community.fly.io/u/duke)\
**Post date:** [August 24, 2022, 10:59am UTC](https://community.fly.io/t/deploy-fusionauth-docker-images-is-not-working/6519/5 "2022-08-24T10:59:14Z")

</div>

Hey @kurt i have updated the Dockerfile to set app url to `0.0.0.0:9011`

On my when run `sudo docker run -p 9012:9011 49b1a2f367a0`, the app runs and below is the logs

```auto
Starting fusionauth-app...
  --> Logging to /usr/local/fusionauth/logs/fusionauth-app.log
---------truncate 
---------------------------------------------------------------------------------------------------------
--------------------------------------- Entering Maintenance Mode ---------------------------------------
---------------------------------------------------------------------------------------------------------

2022-08-24 10:22:48.681 AM INFO io.fusionauth.api.configuration.DefaultFusionAuthConfiguration - Loading FusionAuth configuration file [/usr/local/fusionauth/config/fusionauth.properties]
2022-08-24 10:22:48.682 AM INFO io.fusionauth.api.configuration.DefaultFusionAuthConfiguration - Set property [fusionauth-app.url] set to [http://0.0.0.0:9011] using configured value.
2022-08-24 10:22:48.682 AM INFO com.inversoft.configuration.BasePropertiesFileInversoftConfiguration - 
  - Overriding default value of property [database.mysql.enforce-utf8mb4] with value [true]
  - Overriding default value of property [fusionauth-app.runtime-mode] with value [development]
  - Overriding default value of property [search.type] with value [database]

2022-08-24 10:22:48.682 AM INFO com.inversoft.maintenance.MaintenanceModePoller - Poller started to Wait for configuration to be completed.
2022-08-24 10:22:48.683 AM INFO io.fusionauth.app.primeframework.FusionHTTPContextAuthSetup - Initializing the FusionAuth HTTP Context.
2022-08-24 10:22:48.728 AM INFO org.primeframework.mvc.netty.PrimeHTTPServer - Starting FusionAuth HTTP server on port [9011]
2022-08-24 10:22:48.765 AM INFO org.primeframework.mvc.netty.PrimeHTTPServer - Starting FusionAuth HTTP loopback server on port [9012]
^C2022-08-24 10:27:10.896 AM INFO org.primeframework.mvc.netty.PrimeHTTPServer - Shutting down the Prime HTTP server [/0.0.0.0:9011]
2022-08-24 10:27:10.897 AM INFO org.primeframework.mvc.netty.PrimeHTTPServer - Shutting down the Prime HTTP server [/0.0.0.0:9012]

```

But on `Fly.io` i got this is the logs

```auto
2022-08-24T10:48:23Z runner[0cfdfb1b] fra [info]Starting virtual machine
2022-08-24T10:48:23Z app[0cfdfb1b] fra [info]Starting init (commit: dc4478d)...
2022-08-24T10:48:23Z app[0cfdfb1b] fra [info]Preparing to run: `/usr/local/fusionauth/fusionauth-app/bin/start.sh` as root
2022-08-24T10:48:24Z app[0cfdfb1b] fra [info]2022/08/24 10:48:24 listening on [fdaa:0:8396:a7b:a992:cfd:fb1b:2]:22 (DNS: [fdaa::3]:53)
2022-08-24T10:48:29Z app[0cfdfb1b] fra [info]Starting fusionauth-app...
2022-08-24T10:48:29Z app[0cfdfb1b] fra [info] --> Logging to /usr/local/fusionauth/logs/fusionauth-app.log
2022-08-24T10:53:36Z runner[0cfdfb1b] fra [info]Shutting down virtual machine
2022-08-24T10:53:37Z app[0cfdfb1b] fra [info]Sending signal SIGINT to main child process w/ PID 515
2022-08-24T10:53:38Z app[0cfdfb1b] fra [info]Starting clean up.

```

---

<div class="post-metadata">

**Author:** ![duke](https://avatars.discourse-cdn.com/v4/letter/d/e8c25b/32.png) [@duke](https://community.fly.io/u/duke)\
**Post date:** [August 25, 2022, 9:42am UTC](https://community.fly.io/t/deploy-fusionauth-docker-images-is-not-working/6519/6 "2022-08-25T09:42:26Z")

</div>

The issue was the port.  
So i just changed the internal port on `fly.toml` to the port the app is running.

```auto
[[services]]
  http_checks = []
  internal_port = 9011 # changed this port
  processes = ["app"]
  protocol = "tcp"
  script_checks = []

```
