GoGallery is a static site generator written in Go that converts a folder of photos into a deployable photo gallery website, complete with a React-based management dashboard. It was built for large photo collections that exceed typical hosting limits — the author cites a 5GB gallery of about 1000 images — and avoids databases by treating your existing folder structure (albums) as the source of truth.
What is GoGallery?
GoGallery takes a directory of images arranged in subfolders and generates a static website from them. Input is a photo folder plus an optional YAML config file (default $HOME/.gogallery.yaml); output is a set of HTML pages, optimized images, and PWA assets that you can host on any static file server. The project is open source under the Apache-2.0 license and builds from source with Go 1.20 or newer, using the gogallery build, gogallery serve, gogallery deploy, and gogallery template subcommands.
Key Features
- Handlebars templating — Themes are written in Handlebars, so there is no JavaScript single-page app on the generated site; the template language is plain HTML with Handlebars expressions.
- Image optimization — The build process generates multiple image sizes for the web, reducing the payload for viewers.
- PWA support — The generated site is a PWA, so it can be installed and used like a desktop or mobile app.
- React dashboard — A separate React app lets you manage photos: edit captions, hide albums, and upload images into collections.
- Serve command —
gogallery servestarts a local server to preview the generated site before deployment. - Deploy command —
gogallery deploypushes the built site to a remote static host, though the target host is not specified in the documentation. - Config-driven — A YAML config file (default $HOME/.gogallery.yaml) controls build behavior.
- Performance scores — The demo site scores 93/100 for performance and 95/100 for accessibility in Chrome Lighthouse.
- Fyne desktop app — Besides the CLI, a Fyne-based desktop application can be built via the Makefile (
make fyne-build), offering a native interface for managing galleries.
Who is it for?
- Photographers with large local archives — Anyone with tens of thousands of high-resolution images who needs a fast, self-hosted gallery without paying for storage per image.
- Koken users looking for an alternative — The author notes Koken has had no updates in over a year and went silent; GoGallery recreates a subset of the features they used from that CMS.
- Static site enthusiasts — Developers who prefer pre-rendered sites and don't want a database, CMS, or client-side framework on the front end.
What can you do with GoGallery?
- Generate a gallery website — Point GoGallery at a folder of photos, and it produces a complete static site with album pages, photo pages, and a collection view.
- Manage captions and controls — Use the React dashboard to change captions, hide albums, and organize photos without editing files by hand.
- Customize themes — The
templatecommand extracts the default theme so you can edit Handlebars templates, and a theme development guide is included in the repository. - Preview and deploy — Serve the site locally with
gogallery serve, then push it to your host withgogallery deploy.
How does GoGallery work?
The workflow is: install Go 1.20+, build the binary with go build -o gogallery main.go (or make build), then run gogallery build pointing at your photo library. The tool reads the folder structure as albums, resizes images into multiple web sizes, applies the Handlebars theme, and writes the static site. Use gogallery serve for a local preview and gogallery deploy for production.
Pricing
GoGallery is free and open source under the Apache-2.0 license. No paid tiers or hosted service are mentioned.
Alternatives
- Hugo — a general-purpose static site generator that requires a content model and doesn't specialize in large photo galleries.
- Koken — a self-hosted photo CMS that inspired this project, but it has been unmaintained for over a year according to the repository notes.
FAQ
Is GoGallery free?
Yes, GoGallery is licensed under Apache-2.0, so it is free to use, modify, and redistribute. There are no paid tiers or hosting fees described in the project documentation.
What do I need to run GoGallery?
You need Go 1.20 or newer to build from source, plus a local folder of photos. The build process uses make build or go build -o gogallery main.go, and optional Fyne desktop features have additional system dependencies.
Can I customize the look of the generated site?
Yes. The gogallery template subcommand extracts the default theme, and the repository includes a theme development guide under themes/DEVELOPER_README.md. Themes are written with Handlebars templates, so you can edit HTML and styling without touching the Go code.
Does the generated site require a special server?
No. The output is a static site, so any static file host will work. The project's demo is hosted at https://gallery.exceptionerror.io.







