Self-hosted: Reconfigure public URI

Hello…

I fired up a self-hosted instance of Penpot, running inside Docker. I just sent myself a test invitation and discovered that the links in the email are all links to localhost:9001.

I need to set the correct public URI, but I don’t know how to reconfigure a Penpot instance inside a Docker container that’s already up and running. Help, please!

Thanks
–Steve

Hello,

there should be a PENPOT_PUBLIC_URI in the docker-compose.yaml file that by default is configured to http://localhost:9001
You may change that to the correct URL you want it to be.
Note that you may need to do aditional changes for it to work: if you change the port, you may need to change the port where the frontent listens, or may be configure a proxy in front of it. Also changing it from http to https may require aditional configuration, like certificates.

1 Like

Right. I’m familiar with docker-compose.yaml. I set it up when I installed Penpot. The other config options are fine; I just need to change PENPOT_PUBLIC_URI.

But I don’t want to run docker compose again and mess things up. The reason I posted is because I have a mostly-working Penpot install that contains data. I’m not worried about losing the data, which is stored outside the container. But I also don’t know if I’ll screw things up if I simply delete the container and re-run docker compose. Can I do that without breaking things?

Thanks

Unless you have changed something outside the yaml, it is supposed to be stopped and started with docker compose and take the config changes just fine.
https://help.penpot.app/technical-guide/getting-started/#start-penpot

docker compose -p penpot -f docker-compose.yaml down
docker compose -p penpot -f docker-compose.yaml up -d

I have been starting and stopping without any issue. Projects are still there and changing the public URI does not seem to affect anything in a bad way.
If I’m not mistaken, the only thing that may be lost during a restart of the containers (if there is no PENPOT_SECRET_KEY configured) are the invitations and sessions, that will be rendered invalid.

3 Likes

Thanks, that works!!!

3 Likes