# AWS Docker Ghost - Configure URL

**URL:** <https://forum.ghost.org/t/aws-docker-ghost-configure-url/20546>\
**Category:** Developer help\
**Created:** [March 3, 2021, 6:52pm UTC](https://forum.ghost.org/t/aws-docker-ghost-configure-url/20546 "2021-03-03T18:52:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ghostguy](https://avatars.discourse-cdn.com/v4/letter/g/9fc29f/32.png) [@ghostguy](https://forum.ghost.org/u/ghostguy)\
**Post date:** [March 3, 2021, 6:52pm UTC](https://forum.ghost.org/t/aws-docker-ghost-configure-url/20546/1 "2021-03-03T18:52:34Z")

</div>

Hello!

I installed Ghost on AWS / Lightsail Ubuntu 18 / Docker container, per this guide: [Building a Photo Diary on Amazon Lightsail with Ghost | AWS Compute Blog](https://aws.amazon.com/blogs/compute/building-a-photo-diary-ghost-on-amazon-lightsail/)

I am experiencing some bugs, for example, in the admin / “View Site”, the site does not show and Firefox says “Unable to connect”. I believe this is happening because the URL has not been configured in Ghost.

I want to run `ghost config url <your domain here>` but I’m not sure what code to run in front of this command to access Ghost, or if I can even use the command line in this configuration to configure the URL.

Anyone know? Thank you!

---

<div class="post-metadata">

**Author:** ![inoryum](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/inoryum/32/11866_2.png) [@inoryum](https://forum.ghost.org/u/inoryum)\
**Post date:** [March 4, 2021, 12:53am UTC](https://forum.ghost.org/t/aws-docker-ghost-configure-url/20546/2 "2021-03-04T00:53:22Z")

</div>

you can define URL parameter to do that  
stop the container

```auto
docker stop CONATINER-NAME-OR-ID

```

then stat the container with URL parameter like Below

```auto
sudo docker run -d --name blog -e url=https://yourdomain.com -p 80:2368 -v /var/lib/ghost/content:/var/lib/ghost/content ghost

```

hope this helps

---

<div class="post-metadata">

**Author:** ![ghostguy](https://avatars.discourse-cdn.com/v4/letter/g/9fc29f/32.png) [@ghostguy](https://forum.ghost.org/u/ghostguy)\
**Post date:** [March 8, 2021, 4:13am UTC](https://forum.ghost.org/t/aws-docker-ghost-configure-url/20546/3 "2021-03-08T04:13:19Z")

</div>

Hey @inoryum thank you for answering!

The stop command worked. On the second command, I got this error:

```
 Error response from daemon: Conflict. The container name "/blog" is already in use by container “CONTAINER ID”. You have to remove (or rename) that container to be able to reuse that name.

```

I tried some variations of the command that you recommended, but still wasn’t able to configure the URL. I don’t want to create / remove / rename the container, but just set the URL.

Should I start over and use your command in setup, or is there an easier way to configure the URL after running ghost?

---

<div class="post-metadata">

**Author:** ![inoryum](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/inoryum/32/11866_2.png) [@inoryum](https://forum.ghost.org/u/inoryum)\
**Post date:** [March 8, 2021, 4:53pm UTC](https://forum.ghost.org/t/aws-docker-ghost-configure-url/20546/4 "2021-03-08T16:53:41Z")

</div>

The easiest solution to start over…

Otherwise you have to do some more steps

---

<div class="post-metadata">

**Author:** ![ghostguy](https://avatars.discourse-cdn.com/v4/letter/g/9fc29f/32.png) [@ghostguy](https://forum.ghost.org/u/ghostguy)\
**Post date:** [March 8, 2021, 11:17pm UTC](https://forum.ghost.org/t/aws-docker-ghost-configure-url/20546/5 "2021-03-08T23:17:09Z")

</div>

🤦‍♂️ Doh!

Ok, will give it a fresh attempt.

Much appreciated @inoryum

---

<div class="post-metadata">

**Author:** ![inoryum](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/inoryum/32/11866_2.png) [@inoryum](https://forum.ghost.org/u/inoryum)\
**Post date:** [March 9, 2021, 10:24am UTC](https://forum.ghost.org/t/aws-docker-ghost-configure-url/20546/6 "2021-03-09T10:24:25Z")

</div>

or you can use docker-compose with the following `docker-compose.yaml` file

```auto
version: '3'

services:

  ghost:
    container_name: myblog
    image: ghost:latest
    restart: always
    ports:
      - 3000:2368
    volumes:
      - ./content:/var/lib/ghost/content
    environment:
      url: https://mydomain.com
      database__client: mysql
      database __connection__ host: db
      database __connection__ user: root
      database __connection__ password: hidden
      database __connection__ database: myblog_db
      mail__transport: SMTP
      mail__from: "myblogr <noreply@myblog.com>"
      mail __options__ host: "smtp.mailgun.org"
      mail __options__ port: 587
      mail __options__ auth__user: "my@mailgunsmtpuser.com"
      mail __options__ auth__pass: "mailgunsmtppassword"

  db:
    container_name: myblog_db
    image: mysql:5.7
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: hidden
    volumes:
      - ./data:/var/lib/mysql

```

Then to start the container run

```auto
docker-compose up -d

```
