# Upgrade Running Docker Ghost website

**URL:** <https://forum.ghost.org/t/upgrade-running-docker-ghost-website/20846>\
**Category:** Developer help\
**Created:** [March 17, 2021, 5:47pm UTC](https://forum.ghost.org/t/upgrade-running-docker-ghost-website/20846 "2021-03-17T17:47:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![csgeek](https://avatars.discourse-cdn.com/v4/letter/c/9de053/32.png) [@csgeek](https://forum.ghost.org/u/csgeek)\
**Post date:** [March 17, 2021, 5:47pm UTC](https://forum.ghost.org/t/upgrade-running-docker-ghost-website/20846/1 "2021-03-17T17:47:49Z")

</div>

I’m currently running a ghost instance using docker using version 3.41.5 using a mysql database for a backend.

I would love to know if there is an upgrade guide for docker use case? I realize that there is a documentation for the bare metal install [here](https://ghost.org/docs/update/) but I couldn’t find any instructions if you’re using a docker instance?

I was going to go through the steps as best as I can figure out, but if the ghost community is maintaining a docker image, then we should also have some instructions on how to migrate from one version to the next.

My current thought is going inside the running 3.41.5 container, running ghost update, assuming everything goes fine, stopping the container, updating the version.

ie.

```auto
Step 0: take full database backup of database, backup content folder, and download entire site content via Admin interface.
docker exec -it <containerID> --rm /bin/bash
npm install -g ghost-cli@latest
ghost update
docker stop <containerID>
update docker compose to point to 4.0.1
docker-compose up -d 

```

Haven’t confirmed it, but it’d be great if there was a more official instructions on the process.

---

<div class="post-metadata">

**Author:** ![vikaspotluri123](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/vikaspotluri123/32/24_2.png) [@vikaspotluri123](https://forum.ghost.org/u/vikaspotluri123)\
**Post date:** [March 17, 2021, 7:45pm UTC](https://forum.ghost.org/t/upgrade-running-docker-ghost-website/20846/2 "2021-03-17T19:45:06Z")

</div>

Since Ghost runs migrations as part of starting Ghost, you should, in theory, be able to just upgrade your image from 3.latest (be sure to be on the latest version of 3.x as per Ghost’s migration policy) to 4.x. The CLI hasn’t run migrations for Ghost for a while.

_That being said, I personally don’t use Ghost with Docker so I can’t say if it worked or not from me._

---

<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 17, 2021, 7:57pm UTC](https://forum.ghost.org/t/upgrade-running-docker-ghost-website/20846/3 "2021-03-17T19:57:09Z")

</div>

It worked for me …

I have successfully upgraded ghost from 3.2.2 to 4.0.1

I am using docker with docker-compose

---

<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 17, 2021, 7:59pm UTC](https://forum.ghost.org/t/upgrade-running-docker-ghost-website/20846/4 "2021-03-17T19:59:18Z")

</div>

> [@csgeek](#):
>
> ```auto
> Step 0: take full database backup of database, backup content folder, and download entire site content via Admin interface.
> docker exec -it <containerID> --rm /bin/bash
> npm install -g ghost-cli@latest
> ghost update
> docker stop <containerID>
> update docker compose to point to 4.0.1
> docker-compose up -d 
> 
> ```

If you are using docker then you dont need ghost cli

you can upgrade using via command

```auto
docker-compose pull && docker-compose down && docker-compose up -d

```

---

<div class="post-metadata">

**Author:** ![miladiir](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/miladiir/32/13339_2.png) [@miladiir](https://forum.ghost.org/u/miladiir)\
**Post date:** [May 23, 2021, 6:48pm UTC](https://forum.ghost.org/t/upgrade-running-docker-ghost-website/20846/5 "2021-05-23T18:48:28Z")

</div>

Simply using the new tag did not work for me in my docker setup. After using the new image, I encountered an exception, where the SQLite dependency could not be found. Probably, because the files for the 3.x version was not included in the docker image.

I instead opted to use the ghost:3 for the moment and upgrade using the ghost-cli npm package.

```auto
docker exec -it ghost-container-name
# >> Then in the attached container
npm i -g ghost-cli
su node
ghost update v3 # or whatever your current major version is
ghost update
exit

```

Then, back in your host machine, bump the tag to :4 und deploy the container as you normally would. As i used docker-compose it is as simple as `docker-compose restart`.

---

<div class="post-metadata">

**Author:** ![RAHUL\_JAIN](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/rahul_jain/32/23618_2.png) [@RAHUL\_JAIN](https://forum.ghost.org/u/RAHUL_JAIN)\
**Post date:** [March 20, 2023, 4:28am UTC](https://forum.ghost.org/t/upgrade-running-docker-ghost-website/20846/6 "2023-03-20T04:28:57Z")

</div>

It is not working as you stated. i am trying to upgrade from v3.10.0 to v3latest. on restarting the service it shows

 ![Screen Shot 2023-03-20 at 13.28.27](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/3X/5/4/54438c768b5728490e87fca7aac0f716e85c9434.jpeg)

Please help someone. it will be quiet appreciating.

---

<div class="post-metadata">

**Author:** ![RAHUL\_JAIN](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/rahul_jain/32/23618_2.png) [@RAHUL\_JAIN](https://forum.ghost.org/u/RAHUL_JAIN)\
**Post date:** [March 23, 2023, 2:06am UTC](https://forum.ghost.org/t/upgrade-running-docker-ghost-website/20846/7 "2023-03-23T02:06:28Z")

</div>

It is not working as you stated. i am trying to upgrade from v3.10.0 to v3latest. on restarting the service it shows

 ![Screen Shot 2023-03-20 at 13.28.27](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/3X/5/4/54438c768b5728490e87fca7aac0f716e85c9434.jpeg)  
Please help. it will be quiet appreciating.
