Upgrading without loss of data

I’ve been using Penpot on my NAS with pleasure. Recently I upgraded using docker-compose, which went well. But, as I was half-expecting, my data was lost: user was gone, designs and projects were gone: it was a fresh installation. How do you guys preserve the data? I’m terrible at docker, even though I’m a webdeveloper and server admin, I just never got around to digging into it. So: how do you work around this? Is there a workflow you could recommend?

Have you looked at the Technical Guide?
You may find more info in Install with Docker under Update Penpot.

Can you describe what commands you used to perform the update?

Sorry, missed your reply. I followed the technical guide concerning updating and that left me with a clean installation. I noticed this piece of text there:

Penpot uses Docker volumes to store all persistent data. This allows you to delete and recreate containers whenever you want without losing information.

But I don’t understand how to implement this.

More info around docker volume Understanding Docker Volumes: A Comprehensive Guide with Examples | Part 3 | by Praveen Kumar Adoni | Medium

Nice, a good read I think.

OK, so now I understand the reason behind volumes, but does someone have a workflow on what’s the best idea on updating?

I don’t know the answer to that myself, but I did find the following file
hopefully you can find your answer in it 2. Penpot Configuration

Do you use docker compose V2 or the old version?

You can easily check which version of docker compose you have. If you can execute docker compose command, then you have V2. If you need to write docker-compose (with a -) for it to work, you have the old version.

Did you used docker-compose.yaml file to start Penpot in docker? You can find the file here

Hi, I have V2, don’t need the hyphen

Is it possible to share the commands you used to install Penpot self hosted?

And is it possible to answer the question below?

Yes, I followed the instructions on the ‘self hosted’ guide point by point. The commands I executed are basically the ones stated there. I used the stock dockerfile, no adjustments.

@Paula can you have a look @ this topic to help?

@carolina.portugal is dealing with it internally to find out.

Hi @MajorLabel I’ve tried to understand the issue and I’ve some doubts that may be useful to address:

  • if you go back to the previous version you had, do you “recover” the data?
  • do you have any logs given by docker compose logs?
  • which upgrade did you do? from which version to which version?

The recommended flow is to update/upgrade frequently so most updates are minor; when a major update is on the line, we usually explain if there is any specific task to perform. Updating from 1.9 to 2.4 directly (skipping updates) is not recommended; better go from 2.1 to 2.2 and so…

Cheers!

1 Like

Hi @yami

  • To be honest I don’t even know how to go back to a previous version.
  • I can output the logs, but they’re huge and I don’t seem to be able to upload an attachment here.
  • I think it was from 1.8 to the most recent version at this moment (17-1-2025)

@BDV Turns out I did have the old version, where I need to use docker-compose

Hi @MajorLabel

  • to get back to an older version, you should edit your docker-compose.yaml and put the version in penpotapp/frontend:1.8 (same for backend and exporter). If the error is past migrations, it’s not recommended to go back (without logs it’s difficult to say).
  • you can share the logs using pastebin or other tools if you want to
  • from 1.8 to 2.4 is a big step

All of this is in case you really need to recover the data; if it was a testing instance, you may get rid of everything and start fresh with a 2.4 version. If you prefer this way, I can guide you through the steps.

Cheers!

Hi @yami,

This was a test-installation, which I don’t want to downgrade. My main goal was to assess a workflow on how to do regular updates without losing files. This involves docker stuff, making a backup of the volumes that hold the database and the files outside of the container and loading them back in after updating, at least if I understand correctly. And I don’t know how to do that.

Hi @MajorLabel thanks for your details; let me address them:

  • workflow: upgrading frequently (with each release) is the easiest way of being up to date and not losing data. For this, you should check our communications (x, mastodon, this community, dockerhub, even github) and perform the update as soon as it’s available.
  • updating the system does not require dumping the data and loading it again; tipycally consists of: stopping the containers, pulling the new images and launching again the docker-compose.yml (during the start process the migrations are run). You can check the postgresql service and volume to confirm if you still have the data.
  • backups, volumes and docker stuff: penpot uses standard docker configuration, regarding volumes and so. The docker-compose.yml is an example of use, but you may want to use any other configuration that fits your scenario better. We don’t have a strong recommendation about how to use the docker images. The official docker documentation is the place to learn from the basic to the advanced topics.

Cheers!

Maybe Docker Notify can be also helpfull, you can register here.
Will the 1. Self-hosting Guide be updated with your comments because not everything is found in it like e.g. that you should not update from v1.8 to v2.4 in 1 go, but that you should do this step by step?