# How can i change the domain name in the container?

**URL:** <https://forum.ghost.org/t/how-can-i-change-the-domain-name-in-the-container/7234>\
**Category:** Developer help\
**Created:** [May 9, 2019, 1:48pm UTC](https://forum.ghost.org/t/how-can-i-change-the-domain-name-in-the-container/7234 "2019-05-09T13:48:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dyzm\_k](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/dyzm_k/32/3525_2.png) [@dyzm\_k](https://forum.ghost.org/u/dyzm_k)\
**Post date:** [May 9, 2019, 1:48pm UTC](https://forum.ghost.org/t/how-can-i-change-the-domain-name-in-the-container/7234/1 "2019-05-09T13:48:17Z")

</div>

I have completed the build using docker-compose, the docker-compose file is as follows:

```
version: '3.1'
services:

  ghost:
    image: ghost:2.20.1
    restart: always
    ports:
      - 80:2368
    environment:
      # see https://docs.ghost.org/docs/config#section-running-ghost-with-config-env-variables
      database__client: mysql
      database __connection__ host: db
      database __connection__ user: root
      database __connection__ password: example
      database __connection__ database: ghost
      url: http://blog.kdyzm.cn
    depends_on:
      - db 
  db: 
    image: mysql:5.7
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: example

```

Now i can access by [blog.kdyzm.cn](http://blog.kdyzm.cn) , but if my domain name changes, how can I modify it?such as [blog.kdyzm.com](http://blog.kdyzm.com) or [https://blog.kdyzm.cn](https://blog.kdyzm.cn/)

---

<div class="post-metadata">

**Author:** ![dyzm\_k](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/dyzm_k/32/3525_2.png) [@dyzm\_k](https://forum.ghost.org/u/dyzm_k)\
**Post date:** [May 17, 2019, 1:56am UTC](https://forum.ghost.org/t/how-can-i-change-the-domain-name-in-the-container/7234/2 "2019-05-17T01:56:15Z")

</div>

I have find the solution,fixed ghost data volume and recreate container from ghost docker image ,all problems have been solved

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/b/ba9ce5100b8bb264586f4f572545596b2ce3f081.png) [@system](https://forum.ghost.org/u/system)\
**Post date:** [May 31, 2019, 1:56am UTC](https://forum.ghost.org/t/how-can-i-change-the-domain-name-in-the-container/7234/3 "2019-05-31T01:56:17Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
