Asset Management

Asset management systems help teams inventory, track and manage hardware such as computers and printers, then track their lifecycle - acquisition, usage, maintenance then disposal.

This helps teams to understand the state of play, track assets, review its history and easily have all the required information in a single source of truth.

Introducing Snipe-IT

Snipe-IT is an open source self-hostable asset management solution, which prides itself on being secure first with no vendor lock-in.

Snipe-IT also brings added benefits of:

  • License management
  • Checkout and checkin notifications with EULA acceptance
  • Mobile friendly, although third party apps are available
  • LDAP, SAML and MFA support
  • Apple MDM integration for:
  • Plenty of other integrations for example

Installation

Ref docs

A Debain 13.5 server running Snipe-IT for asset and license management.

Virtual Machine

Create a fresh Virtual machine

  • Name: SNIPEIT
  • Spec
    • CPU: 1
    • RAM: 4096 MB
    • Storage: 20GB
  • Account
    • Root: Locked
    • User: Changeme
    • Password: Changeme
  • Software Selection
    • No Desktop environment
    • SSH Server
    • Standard System Utilities
  • Updates completed upon restart sudo apt update && sudo apt full-upgrade -y

Server Setup

Install Apache httpd, PHP, MariaDB and other requirements.

sudo apt install -y mariadb-server mariadb-client apache2 php-fpm php php-curl php-mysql php-gd php-ldap php-zip php-mbstring php-xml php-bcmath php-intl php-bz2 curl git unzip

Enable PHP-FPM for Apache

sudo a2enmod proxy_fcgi setenvif
sudo a2enconf php8.4-fpm
sudo systemctl restart apache2

Create a Database and User

sudo mysql -u root

CREATE DATABASE snipeit;
CREATE USER 'snipeit'@'localhost' IDENTIFIED BY 'Changeme';
GRANT ALL PRIVILEGES ON snipeit.* TO 'snipeit'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Create a Snipe-IT deploy user

sudo adduser --disabled-password --gecos "" snipeit
sudo usermod -aG www-data snipeit

Install package dependencies via composer

Never run composer as a super-user or Administrator. Always run it as the user that owns the Snipe-IT files, in our case `snipeit`.
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
sudo chmod +x /usr/local/bin/composer

Download Snipe-IT

cd /var/www
sudo git clone https://github.com/snipe/snipe-it.git snipeit
sudo chown -R www-data:www-data /var/www/snipeit
sudo chmod -R 755 /var/www/snipeit

Install dependencies using composer as the snipeit user

cd /var/www/snipeit
sudo -u snipeit composer install --no-dev --prefer-source --no-interaction

Configure Snipe-IT environment

cd /var/www/snipeit
sudo -u www-data cp .env.example .env

Configuration

Configure the .env file

sudo nano /var/www/snipeit/.env
APP_URL=http://ChangeMe
APP_TIMEZONE='Europe/London'
APP_LOCALE=en-GB

DB_DATABASE=snipeit
DB_USERNAME=snipeit
DB_PASSWORD=ChangeMe

#MAIL settings (SMTP)

Generate the App Key

Make sure you keep a copy of your APP_KEY in a safe place.
sudo -u www-data php artisan key:generate

Configure Apache webserver

Create /etc/apache2/sites-available/snipeit.conf:

<VirtualHost *:80>
  ServerName snipeit.park.internal
  DocumentRoot /var/www/snipeit/public
  
  <Directory /var/www/snipeit/public>
    AllowOverride All
    Require all granted
    Options -Indexes
  </Directory>
  
  ErrorLog ${APACHE_LOG_DIR}/snipeit_error.log
  CustomLog ${APACHE_LOG_DIR}/snipeit_access.log combined
</VirtualHost>

Enable site and modules

sudo a2dissite 000-default
sudo a2dissite default-ssl
sudo a2ensite snipeit
sudo a2enmod rewrite
sudo systemctl restart apache2

Scheduled Jobs

sudo crontab -e

Add

* * * * * php /var/www/snipeit/artisan schedule:run >> /dev/null 2>&1

First Login

Log into Snipe-IT using https://servername/ or IP address

Progress through the setup wizard

  • Create the tables
  • Create an Admin User

You are now ready to start configuring Snipe-IT.