Unofficial container image of novafacile/novagallery.
Powered by novafacile
This container image packages NovaGallery on top of openSUSE Leap and provides an out-of-the-box deployment experience with minimal configuration.
What it does:
- Builds the Apache and PHP environment required by NovaGallery.
- Allows users to adjust the
urlinsite.phpand the ApacheServerNamein the vhost configuration file by setting environment variables at container runtime. - Supports generating
addons.phpat container runtime, includingPassword Protection,Robots Meta Tag, and the basic switch fornovaGallery Pro. - Automatically generates a password hash for
Password Protectionwhen private mode is enabled.
This image is intended to be simple and practical:
- If the required config files do not exist yet, the container generates them at startup.
- If a custom
site.php,addons.php, or Apache vhost configuration is already present, the container will not overwrite it. - This makes it possible to start with environment variables first, and later switch to bind-mounted custom configuration files if you need more control.
To be more specific:
- Environment variables only affect the initial generation of configuration files.
- If the files already exist inside the container, or are bind-mounted by the user, the container will not overwrite them.
- Runtime boolean addon-related environment variables are validated before config generation.
To understand how this actually works, please read start.sh.
Pull the container image:
podman pull ghcr.io/jayhsu397/novagallery:latestMinimal startup command
Visit the gallery at http://127.0.0.1:8000
podman run -p 8000:80 \
-v /path/to/photos:/var/www/novagallery-free/galleries:z \
ghcr.io/jayhsu397/novagallery:latestThis is the simplest way to start the container.
Notes:
- The gallery content should be mounted into
/var/www/novagallery-free/galleries. - Without an additional storage mount, cache-related files will remain inside the container filesystem.
- For long-term use, mounting the storage directory is recommended.
Recommended startup command with persistent storage, custom URL settings, and private mode (password mode) enabled:
podman run -p your-port:80 \
-v /path/to/photos:/var/www/novagallery-free/galleries:z \
-v /path/to/storage:/var/www/novagallery-free/storage:z \
-e SERVER_NAME=your-ip-or-domain \
-e URL=http://your-ip-or-domain:your-port \
-e ADDONS_PRIVATE_MODE_ENABLE=true \
-e PASSWORD=your-password \
ghcr.io/jayhsu397/novagallery:latestThis is the more practical setup for normal self-hosting use.
Notes:
SERVER_NAMEis used for the Apache vhost configuration.URLis written into NovaGallery'ssite.php.- When
ADDONS_PRIVATE_MODE_ENABLE=true,PASSWORDmust also be provided ifaddons.phpdoes not already exist. - The password itself is not written directly into
addons.php; a password hash is generated instead. - If your own
addons.phpis already bind-mounted or already exists in the container, the container will not regenerate it.
If you want to explicitly disable search engine indexing through the built-in addon, you may additionally set:
-e ADDONS_ROBOTS_META_TAG_ENABLE=true \
-e ADDONS_ROBOTS_META_TAG_ALLOW_INDEX=falseYou may also enable the novaGallery Pro entry in addons.php by setting:
-e ADDONS_NOVAGALLERY_PRO_ENABLE=truePlease note that addon-related boolean values must use true or false.
If you use systemd as your init system and want the container to start on boot, Quadlet may satisfy your needs.
Example with private mode enabled, placed in $HOME/.config/containers/systemd/novagallery.container
[Unit]
Description=Novagallery Web Image Gallery
Wants=network.target
After=network.target
[Container]
Image=ghcr.io/jayhsu397/novagallery:latest
PublishPort=your-port:80
Volume=/path/to/photos:/var/www/novagallery-free/galleries:z
Volume=/path/to/storage:/var/www/novagallery-free/storage:z
Environment=SERVER_NAME=your-ip-or-domain
Environment=URL=http://your-ip-or-domain:your-port
Environment=ADDONS_PRIVATE_MODE_ENABLE=true
Environment=PASSWORD=your-password
AutoUpdate=registry
LogDriver=journald
[Service]
Restart=on-failure
RestartSec=5
[Install]
WantedBy=default.target
Remember to run the commands below after configuring your Quadlet file:
systemctl --user daemon-reload
systemctl --user start novagallery| Name | Description |
|---|---|
SERVER_NAME |
The ServerName used in the Apache vhost configuration |
URL |
The site URL written into /var/www/novagallery-free/config/site.php |
ADDONS_PRIVATE_MODE_ENABLE |
Enables the built-in Password Protection addon in addons.php |
PASSWORD |
The plain password used to generate the password hash automatically when private mode is enabled |
ADDONS_ROBOTS_META_TAG_ENABLE |
Enables the built-in Robots Meta Tag addon in addons.php |
ADDONS_ROBOTS_META_TAG_ALLOW_INDEX |
Controls whether search engines are allowed to index the gallery when Robots Meta Tag is enabled |
ADDONS_NOVAGALLERY_PRO_ENABLE |
Enables the novaGallery Pro entry in addons.php |
Additional notes:
- Boolean variables must use
trueorfalse. - The startup script normalizes addon-related boolean values to lowercase before validation.
PASSWORDis only required when private mode is enabled andaddons.phpstill needs to be generated.- These variables are meant for initial config generation, not for rewriting existing config files on every startup.
| Path inside container | Purpose |
|---|---|
/var/www/novagallery-free/galleries |
Stores photo galleries |
/var/www/novagallery-free/storage |
Stores cache files that help accelerate photo loading when you restart the gallery |
Notes:
- Mounting
galleriesis normally required if you want your photo data to live outside the container. - Mounting
storageis strongly recommended if you want cache-related data to persist across container recreation or restart. - On SELinux-enabled systems, keep the
:zor:Zsuffix on bind mounts.
This image provides a basic environment based on the official examples.
If you need more customized features, please visit the source repo of NovaGallery and bind your own configuration file into the container.
This repository is a packaging project.
- My original packaging files, including
Containerfileandstart.sh, are licensed under MIT. - The packaged upstream software, NovaGallery, is licensed under AGPL-3.0-or-later.
- As a result, this repository should not be understood as MIT-only.