Repository navigation
Installation
Get BookStorage running locally for development or deploy it on a Linux server for production use.
- Prerequisites
- Development setup
- Production installation (Linux)
- Using a GitHub Actions artifact
- Update recommendations
| Requirement | Notes |
|---|---|
| Go 1.22+ | Download Go |
| GCC | Required for CGO (SQLite compilation) |
git clone https://github.com/LGARRABOS/BookStorage.git
cd BookStorage
go run ./cmd/bookstorageThe server starts on http://127.0.0.1:5000 by default.
Alternative run commands:
make run # via Makefile
bsctl run # via bsctl CLIOptionally copy the environment template for local configuration:
cp .env.example .envDefaults work for local development. See Configuration for all available settings.
git clone https://github.com/LGARRABOS/BookStorage.git
cd BookStorage
sudo ./deploy/install.shThe installer sets up:
- Compiled application binary
-
bsctlCLI for service management (installed to/usr/local/bin) - systemd service (
bookstorage.service) withEnvironmentFile=-/opt/bookstorage/.env - Firewall configuration
- Bash completion for
bsctl(when/etc/bash_completion.d/exists)
bsctl startTo install Prometheus alongside BookStorage:
INSTALL_WITH_PROMETHEUS=1 sudo -E ./deploy/install.shThis installs the distribution prometheus package (or falls back to the official tarball), generates a BOOKSTORAGE_METRICS_TOKEN if missing, and enables the bookstorage-prometheus systemd unit (Prometheus UI on http://127.0.0.1:9091).
After installation:
sudo systemctl restart bookstorage
sudo systemctl status bookstorage-prometheusSee Configuration for metrics and Prometheus configuration details.
INSTALL_WITH_BACKUP_TIMER=1 sudo -E ./deploy/install.shThis enables bookstorage-backup.timer for daily SQLite snapshots. See CI / CD for bsctl backup details.
As an alternative to cloning the repository, you can use the pre-built binary from GitHub Actions:
- Go to Actions > Deploy workflow and trigger a manual run
- Download the
bookstorage-linux-amd64.tar.gzartifact - Extract and copy the files:
tar xzf bookstorage-linux-amd64.tar.gz
sudo cp bookstorage /usr/local/bin/
sudo cp bsctl /usr/local/bin/
sudo cp bookstorage.service /etc/systemd/system/- Use
bsctl installandbsctl startas usual
-
Prefer the latest major release (
vX.0.0) for maximum stability in production. -
Non-major releases (
vX.Y.Zwith Y > 0 or Z > 0) may ship with regressions that can break some features. - Before updating, back up at least
database.dband thestatic/images/static/avatarsfolders, then smoke-test the app after restart. - Use
bsctl updatefor managed updates — see CI / CD for the full command reference.
Configuration — Next: configure environment variables and site settings.