# Cannery

Cannery is a self-hosted firearm and ammunition inventory tracker.

Canonical page: https://ourlocalhost.com/app/8243/cannery

## Description

Cannery is a self-hosted firearm and ammunition inventory tracker. It lets you log firearms, ammo types and counts, containers and storage locations, custom tags, and shot records, so you always know what you have on hand. It suits gun owners and reloaders who want a private, self-hosted alternative to cloud-based inventory spreadsheets.

## Platform availability

Available on 1 of 10 platforms: Any server.

## Health score

51/100 (Fair), based on 2 of 4 factors.
- Easy to install: 25 (1 install platform, install notes)
- Light to run: 85 (512 MB minimum RAM)

## Links

- Documentation: https://wiki.linux-server-admin.com/web-apps/inventory-management/cannery/setup/docker
- Official website: https://cannery.app

## Common questions

### What port does Cannery run on, and can I put it behind a reverse proxy?

Cannery listens on internal port 4000, which you map in Docker Compose, and it is typically deployed behind a reverse proxy. Make sure port 4000 is available and set the HOST environment variable to your domain instead of localhost.

### How do I generate the SECRET_KEY_BASE for my Cannery instance?

Run `docker run -it shibaobun/cannery /app/priv/random.sh` and copy the output into the SECRET_KEY_BASE value in your docker-compose.yml file.

### Can I control whether new users can register on my Cannery instance?

Yes, set the REGISTRATION environment variable, which supports three modes: public, invite_only, or disabled. The default in the example compose file is invite_only.

### Where is Cannery's data stored and how should I back it up?

Cannery uses a PostgreSQL 15 database (a separate container in the compose stack), with its data persisted in the `cannery_postgres_data` Docker volume. Back up that volume to preserve your inventory data.

### What environment variables do I need to configure when deploying Cannery with Docker?

The main ones are DATABASE_URL (pointing to the Postgres container), SECRET_KEY_BASE, HOST, PORT, and REGISTRATION. DATABASE_URL should use the database credentials you also pass to the cannery-db container.

---
Source: Our Local Host (https://ourlocalhost.com/app/8243/cannery), the self-hosted and open-source app directory.
