Kılavuzlar /

Kurulum

/

Docker Image

Docker Image

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

Step 1 - Installing the container

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

Step 2 - Configure the reverse proxy

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;
    }
}

Adım 3 - Yapılandırma

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 :

  • Host : piwigo-db:3306
  • Kullanıcı : piwigodb_user
  • Şifre : Use the password you wrote in the .env file
  • Veritabanı adı : piwigodb
  • Piwigo tablo adları için bir önek : piwigo_

Web yöneticisi hesabını oluşturmak için aşağıdakiler gereklidir.:

  • Sizin tarafınızdan seçilen bir hesap tanımlayıcısı
  • Kontrol etmek için iki kez girmeniz gereken bir şifre
  • Ziyaretçilerin sizinle iletişim kurabilmesi için e-posta adresiniz

“Yüklemeyi Başlat” eylemini çalıştırın.

kurulum tarafı

Kurulum işleminin başarısı veya başarısızlığı hakkında bilgilendirileceksiniz.

Başarılı kurulum

Adım 4 - İlk bağlantı

Kurulum tamamlandıktan sonra galerinize gidebilirsiniz. Web yöneticisi hesabınızla giriş yapın ve yönetim paneline ulaşabilirsiniz.

Piwigo yüklendi

Hala cevaplanmamış sorularınız mı var?

Forum'dan biraz yardım alabilir veya belgelerde kendi yanıtlarınızı bulabilirsiniz.