# How to redirect traffic docker container

**URL:** <https://forum.ghost.org/t/how-to-redirect-traffic-docker-container/13537>\
**Category:** Installation\
**Created:** [April 15, 2020, 2:11pm UTC](https://forum.ghost.org/t/how-to-redirect-traffic-docker-container/13537 "2020-04-15T14:11:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![InvisibleRasta](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/invisiblerasta/32/7344_2.png) [@InvisibleRasta](https://forum.ghost.org/u/InvisibleRasta)\
**Post date:** [April 15, 2020, 2:11pm UTC](https://forum.ghost.org/t/how-to-redirect-traffic-docker-container/13537/1 "2020-04-15T14:11:22Z")

</div>

hello guys, i installed ghost with docker on my dedicated server following this guide as debian buster was giving me alot of warnings about deprecated stuff with the normal ghost install… [Docker](https://hub.docker.com/_/ghost/)  
i now have the docker container running and i was wondering how i can redirect `http://mywebsite.com:3001` to my actual website url, without the port number

---

<div class="post-metadata">

**Author:** ![tillg](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/tillg/32/5810_2.png) [@tillg](https://forum.ghost.org/u/tillg)\
**Post date:** [April 19, 2020, 4:49pm UTC](https://forum.ghost.org/t/how-to-redirect-traffic-docker-container/13537/2 "2020-04-19T16:49:05Z")

</div>

Within the docker container ghost uses port 2368. I assume you started the docker with 3001 mapped to the internal ghost port 2368. So probably you used:

```auto
$ docker run -d --name some-ghost -e url=http://localhost:3001 -p 3001:2368 ghost

```

If you want to access it on port :80 (the standard HTPP port), just replace the 3001 with 80 in the above command.

**Note** : It’s not good to use Ghost directly facing the internet in production. If this is meant for production, you should for example put a Nginx reverse proxy in front.

I wrote a setup for docker-compose that contains all needed components:

[https://bitbucket.org/tgartner/ghost.docker.image/src/master/](https://bitbucket.org/tgartner/ghost.docker.image/src/master/)

Good luck,  
Till.
