Using this guide, you will download a compose file with everything you need to deploy your own Piwigo with Docker.
This guide assume you can connect to your server via ssh and already have installed docker, if that's not the case follow the official docker documentation here
Connect to your server and create a folder named Piwigo:
Download the compose.yaml file from Piwigo/piwigo-docker
You can use curl to download it without leaving the terminal
curl -O "https://raw.githubusercontent.com/Piwigo/piwigo-docker/refs/heads/main/compose.yaml"
Create a file named .env, it need to contain the following, with a strong password and your timezone after the equal sign without quotes.
piwigo_port=8080
db_user_password=
timezone=
PIWIGO_UID=
PIWIGO_GID=
You can use truncate to generate a valid password with the following command:
printf $(tr -dc '[:alnum:]' </dev/urandom | head -c64)"\n"
You can change the exposed port by editing piwigo_port
Set the UID and GID of the user and group you want to give access to the piwigo folder in the PIWIGO_UID and PIWIGO_GID fields
Start your container with docker compose up -d
You will want to use an external reverse proxy with Piwigo Docker; you can use the following Nginx config examples:
Piwigo supports being hosted on a domain, subdomain, and/or subpath; whatever you choose, it's advised to not use the Piwigo release number in the URL.
server {
listen 80;
server_name my_domain.tld;
location / {
proxy_pass http://127.0.0.1:8080/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
If you intend to host Piwigo on a subpath (eg: my_domain.tld/gallery) you will need to forward it to the container by adding proxy_set_header X-Forwarded-Prefix /my_subpath
server {
listen 80;
server_name my_domain.tld;
location /gallery/ {
proxy_pass http://127.0.0.1:8080/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Prefix /gallery;
}
}
Once the container is started and your reverse proxy is configured, open a web browser to the web address you are hosting Piwigo on. Piwigo will detect nothing is installed yet, and redirect you to the installation page
If you changed piwigo_port in .env you will also need to modify the proxy_pass section to reflect that. Keep in mind that Docker will ignore all your firewall rules by design.
Fill in MySQL database connection settings with the following :
piwigo-db:3306piwigodb_userpiwigodbpiwigo_
Для этого требуется создать аккаунт вебмастера:
Запуск функции "Старт установки"
Сторона установки
Вы будете проинформированы либо об успехе, либо о сбое процесса установки.
Успешная установка
Как только установка закончена, Вы можете пойти в Вашу галерею. Войдя с учетной записью веб-мастеров, Вы можете достичь панели управления.
Piwigo установлен
You can get some help on the forum or find your own answers in the documentation