I use Single File PHP Gallery. Put the file in root dir of your photos and set it executable in web server. That's it. The settings are also inside the file, if you need any tweaking.
https://sye.dk/sfpg/