Self-Hosting Snipe-IT: The Operational Checklist I'd Use Again.

Manav Mehta 1419 words · 6 min read #self-hosting#snipe-it#operations#backups

The deployment guide gets you running. This is the recurring maintenance loop: backups, restore drills, pinned updates, and credential hygiene that keeps the instance trustworthy.

Tip (TL;DR)

Deployment is day one. Operations is every day after. Back the database and uploaded files on a schedule, restore-test them quarterly, pin APP_VERSION instead of riding latest, rotate the .env secrets you pasted on day one, monitor disk before it fills, and record the update runbook. The checklist at the bottom is the whole post.

Introduction

My Snipe-IT deployment guide walks through Docker Compose, APP_KEY, Caddy, and first start. It ends with the instance up and an inventory ready to import.

This post is about what happens next. No install tutorial covers it — it is the same regardless of which tutorial you followed. Self-hosting an ITAM tool is not a deployment event; it is a recurring obligation. The assets, checkouts, and audit trails only mean something if the instance is still there and still correct six months from now.

The failures here are quiet: a backup cron job that has been erroring since week two, an APP_KEY rotation that re-encrypts nothing, an update that pulls latest into a breaking change on a Tuesday.

Day-One Choices That Are Really Operations Decisions

A few things in the deployment guide look like setup steps but are really operational commitments.

Secrets in .env. The guide’s example ships DB_PASSWORD=changeme1234 and MYSQL_ROOT_PASSWORD=changeme1234. Fine for a tutorial, unacceptable for a live instance. Treat every credential in .env as one you must rotate at least once, and know where the real values are stored.

APP_KEY. Generated once, never changed casually. It encrypts application data. Losing it means losing the ability to decrypt; rotating it without a plan means re-encrypting everything. Store it in your password manager with the same gravity as a root credential, not in a shell history.

APP_VERSION left empty. The guide notes this means Docker defaults to latest. On day one that is convenient. In operations it means every docker compose up -d after a restart can be an unreviewed upgrade. Pin the version tag, upgrade when you decide to.

Backups configured but not scheduled. Snipe-IT can produce database dumps (documented backup commands, artisan backup:run and friends), but nothing in a default Compose deployment guarantees they run, land somewhere durable, or succeed. The tool offering backups and you having backups are different states.

Backups: What to Capture, Where to Put It

An incomplete backup is a specific trap with Snipe-IT. The database alone is not the instance.

  • The database holds assets, users, licenses, history, audit trails.
  • storage/uploads (the PRIVATE_FILESYSTEM_DISK / PUBLIC_FILESYSTEM_DISK paths) holds every image and attachment: the actual evidence photos, invoices, and asset labels referenced by rows in that database.

Capturing only one produces a restore that either has rows pointing at nothing or photos with no records. Capture both, from the same point in time.

Off-box is the only kind that counts. A backup on the same VPS protects you against application corruption. It is useless if you lose the VPS. Copy both artifacts off the host, to object storage or another machine, and verify the copy, not just the transfer.

Schedule and alert. A cron job or systemd timer, with a notification path for failure. The failure mode to fear is not “no backup job.” It is a job that has been silently failing for weeks. Test the alert at the same time you set it up.

Restore Drills: The Checkpoint Most People Skip

The deployment guide’s conclusion already says it: a backup you have never restored is an assumption, not a recovery strategy. This post exists partly to expand that sentence into practice.

A restore drill answers questions no backup job can:

  1. Does the dump actually load into a clean database?
  2. Do the uploads line up with the rows?
  3. How long does a full restore take, and does that fit your real outage tolerance?
  4. Does the application start against restored data with the APP_KEY you have stored?
  5. Does anyone besides you know the procedure?

Run it quarterly, on a scratch host or container, with the documented procedure in hand. If the procedure doesn’t exist yet, writing it is the drill. Record the date and duration somewhere durable. A restore you performed nine months ago is evidence. One you performed last week is confidence.

The Update Runbook

The guide’s update section is two commands against latest. The operational version is a procedure:

Terminal window
# 1. Read release notes for breaking changes and migrations first
# 2. Back up database + uploads (never skip this before an upgrade)
docker compose exec db mysqldump -u snipeit -p snipeit > backup-before-update.sql
# 3. Pin the new version in .env, then recreate
# APP_VERSION=x.y.z
docker compose down
docker compose up -d
# 4. Verify: login, asset list, a known record's attachments

Constraints worth keeping:

  • Never update without a same-day backup. Upgrades and backups are one step, not two.
  • Read the release notes first. Jumping multiple versions at once means multiple migration sets. Update in sequence when the project documents it.
  • Verify after, not just during. The containers being Up in docker ps is not success — a known asset record loading with its attachment is.
  • Keep a rollback tag. If APP_VERSION was pinned, rolling back is a version change plus the pre-update dump, provided you took it.

Credentials and Access Hygiene

  • Rotate the .env passwords once the instance is real, and store them in a password manager. The values in the guide’s example are public on the internet. Anything derived from them is too.
  • Mind SESSION_LIFETIME=12000 from the default config. That is a very long session for an asset database. Set it to something matching your risk tolerance.
  • SECURE_COOKIES=false and ENABLE_HSTS=false in the defaults are fine behind Caddy’s HTTPS, but verify the Caddy site is actually serving TLS before treating them as harmless.
  • Admin accounts should not be shared. Snipe-IT has per-user accounts precisely so audit trails attribute actions. Each person who uses Snipe-IT should have their own account. If everyone logs in as admin, the audit trail you are backing up records nothing usable.
  • API tokens are long-lived by default config (API_TOKEN_EXPIRATION_YEARS=40). Any token you issue should be scoped, stored, and revocable. Treat them like passwords.

Keep It Alive: Monitoring and Housekeeping

The recurring maintenance burden is small but nonzero:

  • Disk space. Uploads, logs, and database growth fill small VPS disks slowly, then suddenly. Monitor the host and measure before you assume.
  • Container health. docker ps -a after every host reboot. A Compose stack that did not come back is invisible until someone needs it.
  • Log growth. LOG_MAX_DAYS=10 helps application logs, but the host’s own logs and any backup logs need a rotation story too.
  • Certificate renewal. Caddy handles it. Verify renewal happened (caddy reload logs) rather than trusting that it did.
  • Data-entry drift. An ITAM tool is only as good as its records. Audit a few checkouts per quarter, reconcile a shelf of hardware against the system. Most ITAM failures are not server failures. They are records that drifted away from the hardware.

The Checklist I’d Use Again

Task Cadence Done?
Database + storage/uploads captured together Daily ☐
Backup copied off-box and copy verified Daily ☐
Backup alert tested Setup, re-test yearly ☐
Restore drill into a clean environment Quarterly ☐
Release notes read before any update Per update ☐
Pre-update backup taken before docker compose up Per update ☐
Post-update verification (record + attachment loads) Per update ☐
APP_VERSION pinned, upgrade deliberate Ongoing ☐
.env secrets stored in password manager, rotated from defaults Once, then yearly ☐
Disk, container health, cert renewal reviewed Monthly ☐
Sample of checkouts reconciled against physical assets Quarterly ☐

References and Attribution

Where to Go From Here

Getting Snipe-IT running is the easy part. Keeping it reliable means knowing your backups work, updating on your own schedule, and being able to recover if something goes wrong.

Start with the backups. Schedule the database and uploads, copy them off the server, and restore them into a clean environment this week. Record how long it takes and fix anything that doesn’t work.

Then put a quarterly restore drill on the calendar. It is cheaper than finding out your backup is broken during an outage.

Keyboard Shortcuts