---
title: 'update docker-grav from version 1 to 2'
url: 'https://willifix.net/blog/update-docker-grav-from-version-1-to-2'
markdown: 'https://willifix.net/blog/update-docker-grav-from-version-1-to-2.md'
date: '2026-06-29'
description: 'Introduction Grav version 2.0 was recently released https://getgrav.org/. The text you’re reading right now is powered by Grav. I’m using a container from linuxserver.io https://docs.linuxserver.io/images/docker-grav/ for this. Version 2.0 of the container has also been made available there. So her…'
---

# update docker-grav from version 1 to 2

## [update docker-grav from version 1 to 2](https://willifix.net/blog/update-docker-grav-from-version-1-to-2)

    29th Jun 2026  

### Introduction

Grav version 2.0 was recently released [https://getgrav.org/](https://getgrav.org). The text you’re reading right now is powered by Grav. I’m using a container from linuxserver.io [https://docs.linuxserver.io/images/docker-grav/](https://docs.linuxserver.io/images/docker-grav) for this. Version 2.0 of the container has also been made available there. So here’s a how-to guide on how to complete the migration using a few tricks.

### Whats needed

Of course, we need an existing grav1 installation and, accordingly, a grav2 installation as well (this is quite easy to set up in a container).

### howto

1. Follow the Instructions from <https://getgrav.org/blog/migrating-to-grav-2> until step 6 **Promote to live** (test will not work correctly)
2. spawn a shell into your current running grav container

    ```
    cd /srv/grav
    docker compose exec grav /bin/bash
    ```
3. navigate to the root folder of the running grav instance and copy the grav-2 folder to a local mountpoint.

    ```
    cd /app/www/public
    cp -a grav-2 ./user/pages
    exit
    ```
4. stop the grav1 container

    ```
    docker compose down
    ```

you should now have a folder grav-2 in your ./config/www/user/pages

5. create a new grav2 container

    ```
    mkdir /srv/grav2
    cd /srv/grav2
    ```

    insert the following listing in a file named `docker-compose.yml`

    ```
    services:
    grav:
    image: lscr.io/linuxserver/grav:latest
    container_name: grav
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
    volumes:
      - ./config:/config
    ports:
      - 80:80
    restart: unless-stopped
    ```
6. start the grav2 instance and wait until it says ready

    ```
    docker compose up
    ```

    ![RWill_2026-06-25%2008-45-08](https://willifix.net/user/pages/03.blog/update-docker-grav-from-version-1-to-2/RWill_2026-06-25%2008-45-08.png "RWill_2026-06-25%2008-45-08")
7. stop the instance by pressing `Ctrl+c`
8. Copy the user folder from the grav-2 migration directory to the correct location and start the container

    ```
    cd /srv/grav2
    cp -a /srv/grav/config/www/user/pages/grav-2/user/* /srv/grav2/config/www/user
    docker compose up -d
    ```
9. visit your admin Page an check if everything works as expected.

### problems found

At first, my blog posts looked pretty messed up. I had to add the following entries to the item.md files:

```yaml
process:
    markdown: true
```

 [ Previous Post](https://willifix.net/blog/openvpn-2-7-multisocket-howto) [Next Post ](https://willifix.net/blog/uprade-immich-to-v3)

---

## Navigation

- Parent: [Blog](https://willifix.net/blog.md)
- Previous: [uprade immich to version 3](https://willifix.net/blog/uprade-immich-to-v3.md)
- Next: [OpenVPN 2.7 Multisocket howto](https://willifix.net/blog/openvpn-2-7-multisocket-howto.md)
