Why You Should Install and Use Snipe-IT: A Comprehensive Guide

Introduction to Snipe-IT

Snipe-IT is an open-source asset management software designed to track and manage your assets effectively. Whether you’re a small business or a large organization, Snipe-IT offers a robust solution to keep track of your inventory, licenses, and warranties, ensuring that you always know what assets you have, where they are, and who is using them.

Pros of Snipe-IT

  • Open Source: Free to use and highly customizable.
  • User-Friendly Interface: Clean and intuitive, making asset management efficient.
  • Comprehensive Features: Includes asset auditing, check-in/check-out functionality, detailed asset histories, and notifications.
  • Scalability: Suitable for both small and large organizations.
  • Active Community and Support: Extensive documentation, forums, and community support available.

Cons of Snipe-IT

    • Self-Hosting Requirements: Requires technical expertise to set up and maintain a server.
    • Regular Maintenance: Needs ongoing updates and maintenance for optimal performance and security.
    • Learning Curve: New users might face a learning curve when configuring and using all features

Security Aspects of Snipe-IT

Snipe-IT addresses security concerns with several features:

  • Data Encryption: Sensitive data is encrypted.
  • User Role Management: Define roles and permissions for access control.
  • Audit Logs: Detailed logs of all system actions.
  • Regular Updates: Frequent security patches and updates.

Step-by-Step Tutorial: Installing Snipe-IT on Ubuntu

System Requirements

Before installing Snipe-IT, ensure your system meets these minimum requirements:

  • CPU: 1 GHz dual-core processor
  • RAM: 2 GB (4 GB recommended for better performance)
  • Storage: 20 GB free space
  • Operating System: Ubuntu 20.04 LTS or later
  • Web Server: Apache2 or Nginx
  • Database: MySQL 5.6+ or MariaDB 10.1+
  • PHP: 7.4 or higher

Step 1: Update Your System and Install Required Dependencies

				
					console.log( 'Code is Poetry' );sudo apt update
sudo apt upgrade -y
sudo apt install apache2 php libapache2-mod-php php-json php-mbstring php-tokenizer php-curl php-mysql php-ldap php-zip php-bcmath php-xml php-imagick mariadb-server git curl

				
			

Step 2: Enable Apache's mod_rewrite Module

				
					sudo a2enmod rewrite
sudo systemctl restart apache2

				
			

Step 3: Install Composer (PHP Dependency Management Tool)

				
					cd ~
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer

				
			

Step 4: Create a Database and User for Snipe-IT

Log into MySQL:

				
					sudo mysql -u root
				
			

In the MySQL shell, run:

				
					CREATE DATABASE snipeit_data;
CREATE USER 'snipeit_data_user'@'localhost' IDENTIFIED BY 'your_secure_password';
GRANT ALL ON snipeit_data.* TO 'snipeit_data_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

				
			

Step 5: Create Snipe-IT Directory and Set Permissions

				
					sudo mkdir /var/www/snipe-it
sudo chown -R $USER:www-data /var/www/snipe-it/
sudo chmod -R 750 /var/www/snipe-it/
sudo chmod g+s /var/www/snipe-it/

				
			

Step 6: Clone Snipe-IT Repository

				
					git clone https://github.com/snipe/snipe-it /var/www/snipe-it
				
			

Step 7: Set Additional Permissions

				
					sudo chmod -R g+w /var/www/snipe-it/storage
sudo chmod -R g+w /var/www/snipe-it/public/uploads

				
			

Step 8: Configure Snipe-IT

Navigate to the Snipe-IT directory:

				
					cd /var/www/snipe-it
				
			

Copy the environment configuration file and edit it:

				
					cp .env.example .env
sudo nano .env

				
			

Update the following lines in the .env file:

				
					APP_URL=http://10.100.50.30
DB_DATABASE=snipeit_data
DB_USERNAME=snipeit_data_user
DB_PASSWORD=your_secure_password

				
			

Add your email configuration:

				
					MAIL_MAILER=smtp
MAIL_HOST=mail.yourdomain.com
MAIL_PORT=587
MAIL_USERNAME=your_email@yourdomain.com
MAIL_PASSWORD=your_email_password
MAIL_FROM_ADDR=your_email@yourdomain.com
MAIL_FROM_NAME='Snipe-IT'
MAIL_REPLYTO_ADDR=your_email@yourdomain.com
MAIL_REPLYTO_NAME='Snipe-IT'
MAIL_AUTO_EMBED_METHOD='attachment'
MAIL_TLS_VERIFY_PEER=true

				
			

Step 9: Install Snipe-IT Dependencies

				
					composer install --no-dev --prefer-source
				
			

Step 10: Generate Application Key

				
					php artisan key:generate
				
			

Step 11: Configure Apache Virtual Host

Create a new virtual host configuration file:

				
					sudo nano /etc/apache2/sites-available/snipe-it.conf
				
			

Add the following content to the file:

				
					<VirtualHost *:80>
    ServerName 10.100.50.30
    DocumentRoot /var/www/snipe-it/public
    <Directory /var/www/snipe-it/public>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>
</VirtualHost>

				
			

Step 12: Enable the New Virtual Host and Disable the Default One

				
					sudo a2ensite snipe-it.conf
sudo a2dissite 000-default.conf
sudo systemctl restart apache2

				
			

Step 13: Set Proper Permissions for the Web Server

				
					sudo chown -R www-data:www-data /var/www/snipe-it
				
			

Step 14: Access Snipe-IT Through Your Web Browser

Navigate to your domain or IP address to access Snipe-IT and follow the on-screen setup wizard to complete the installation.

Step 15: Secure Your Installation (Optional but Recommended)

Set up SSL/TLS encryption for your domain. You can use Let’s Encrypt for a free SSL certificate:

				
					sudo apt install certbot python3-certbot-apache
sudo certbot --apache

				
			

Follow the prompts to configure SSL for your domain

Basic Tasks in Snipe-IT

After installation, here are some basic tasks you can perform:

  • Adding Assets: Navigate to Assets > Create New Asset and fill in the details.
  • Assigning Assets: Select an asset and click “Checkout” to assign it to a user.
  • Running Reports: Go to Reports to generate various asset-related reports.
  • Managing Users: Add and manage users under the Admin > Users section.

Troubleshooting Common Installation Issues

  • Database Connection Error: Ensure your database credentials in the .env file are correct.
  • Permission Issues: Check that the web server has proper permissions on the Snipe-IT directory.
  • Composer Errors: Make sure you have the latest version of Composer installed.
  • Web Server Configuration: Verify that mod_rewrite is enabled for Apache or the Nginx configuration is correct.

Upgrading Snipe-IT

To upgrade Snipe-IT in the future:

    1. Backup your database and Snipe-IT directory.
    2. Download the latest release from the official GitHub repository.
    3. Replace the existing files with the new ones, keeping your .env file intact.
    4. Run composer install –no-dev to update dependencies.
    5. Run php artisan migrate to apply any database changes.

Conclusion

Snipe-IT is a powerful and versatile asset management tool that can significantly streamline your asset tracking and management processes. By following this guide, you can install, configure, and start using Snipe-IT on an Ubuntu server, leveraging its full potential while ensuring a secure and efficient setup. Remember to keep your installation updated and secure, and don’t hesitate to explore the community forums for additional support and tips.