Running the Open Source IT Asset Manager Snipe-IT on Docker

How to Get Up and Running snipe-it on Docker

* This page contains promotional content

I wanted to manage software licences as well as the appliances and assets in my home, so I looked around for a good open source option, found the IT asset management system Snipe-IT, and set it up right away.

This is how to install it with Docker

Installation and configuration

$ git clone https://github.com/snipe/snipe-it.git
  • Edit .env.docker
 APP_DEBUG=false
 # please regenerate the APP_KEY value by calling `docker-compose run --rm snipeit bash` and then `php artisan key:generate --show` and then copy paste the value here
 APP_KEY=base64:3ilviXqB9u6DX1NRcyWGJ+sjySF+H18CPDGb3+IVwMQ=
 APP_URL=http://localhost:8000
-APP_TIMEZONE='UTC'
-APP_LOCALE=en
+APP_TIMEZONE='Asia/Tokyo'
+APP_LOCALE=ja

Port 8000 is used by default, so if you want to change it, change ports in docker-compose.yml

Starting it up and connecting

$ docker-compose up -d

Once it has started without problems, connect at http://localhost:8000

Untitled

A screen like this appears

Check with Send Test in the Email field whether it succeeds.
(mailhog is up as well, so it will almost certainly succeed)

Click Next: Create Database Tables

Click Next:Create User

Untitled

The orange bar on the right marks the required fields, so fill them in as appropriate and you are done

After that all you have to do is create new entries and enter the data

Looking at the settings, it appears to support two-factor authentication, Slack integration, and LDAP, SAML and OAuth authentication as well

Impressions

My impression from trying it is that the fields you can register cover a wide range, and it feels functional enough to be practical at a workplace as well.
With the maintenance history feature, registering things like HDDs or when to replace the filters around the house might be handy.

For managing assets at home you do not need this much functionality, so in the end I feel that Notion or Vaultwarden(Bitwarden) is enough

Other notes

Regenerating APP_KEY

If you are going to expose it externally, change APP_KEY first.

  • Enter the snipe-it container and run the following command
$ docker exec -it snipe-it /bin/bash
# php artisan key:generate --show
base64:fIbC/i31OpEVWL3FhA7nr+hX1BVwzXZ0wrvzP3dj87U=
# exit

Make a note of the base64:fIbC.... field

  • Edit .env.docker

Replace the value in the APP_KEY field

APP_KEY=base64:fIbC/i31OpEVWL3FhA7nr+hX1BVwzXZ0wrvzP3dj87U=

Making it accessible from outside

  • Edit the APP_URL field in .env.docker

Change localhost to an FQDN or an IP

- APP_URL=http://localhost:8000
+ APP_URL=http://example.com
OSS 

See also