Install Snipe-IT on Debian 10/Ubuntu 18.04


Welcome to our guide on how to install Snipe-IT on Debian 10/Ubuntu 18.04. Snipe-IT is a free and opensource IT asset/license management system that enables IT departments to track who has which device, when it was purchased, which software licenses and accessories are available,…

Read more about Snipe-IT features on the features and overview page.

Install Snipe-IT on Debian 10/Ubuntu 18.04

Snipe-IT can be run as a hosted service or self-hosted. This guide focuses on self-hosted Snipe-IT.


Snipe-IT requires LAMP stack set in order to run. Hence, follow the guides below to setup LAMP Stack on Debian 10 or Ubuntu 18.04.

Install LAMP Stack with MariaDB 10 on Debian 10 Buster

Install LAMP Stack (Apache,MariaDB, PHP 7.2) on Ubuntu 18.04 LTS

Install Extra PHP Extensions and other requirements.

apt install php-{bcmath,cli,xml,mbstring,tokenizer,curl,zip,ldap,gd} openssl curl git wget zip

Create Snipe-IT Database

Next, login to MariaDB/MySQL and create Snipe-IT database and database user with all the privileges granted on Snipe-IT database.

mysql -u root -p
create database snipeitdb;
grant all on snipeitdb.* to [email protected] identified by '[email protected]';
flush privileges;

Install Snipe-IT on Debian 10/Ubuntu 18.04

Download Snipe-IT

Clone the Snipe-IT github directory to your web server root directory.

git clone /var/www/html/snipeit

Configure Snipe-IT

Rename the Snipe-IT variables file .env.example to .env file.

cp /var/www/html/snipeit/.env.example /var/www/html/snipeit/.env

Open the environment configuration file.

vim /var/www/html/snipeit/.env

Snipe-IT Basic Application Settings

Set the URL you will use to access your Snipe-IT, the Application language, Timezone. The URL should not have a trailing slash.

# --------------------------------------------
# --------------------------------------------

Snipe-IT Database Settings

Set the database host, database name, user and password created above,

# --------------------------------------------
# --------------------------------------------
[email protected]

If you are gonna need your Snipe-IT to send emails, configure Email Server settings.

Install Required PHP Libraries

To install other required Snipe-IT PHP libraries, you need to install PHP Composer. Note that these are not the same as the PHP extensions installed on our prerequisites page. Hence, navigate to Snipe-IT install directory and install the libraries as follows.

cd /var/www/html/snipeit
curl -sS | php
php composer.phar install --no-dev --prefer-source

Set Snipe-IT Directory Ownership and Permissions

Set the user and group Ownership of Snipe-IT web root directory to Web server www-data.

chown -R www-data:www-data /var/www/html/snipeit

Generate Snipe-IT App Key

App key is a randomly generated key that Snipe-IT uses to encrypt data. The value generated will be assigned automatically to APP_KEY variable in the Snipe-IT configuration file.

php artisan key:generate

This command has to be run from the Snipe-IT directory.

*     Application In Production!     *

 Do you really wish to run this command? (yes/no) [no]:
 > yes

Application key [base64:7xHLDhywQyccOYN9IIOVpkqsdpv34F5RjgtC+Lf+iW8=] set successfully.

The key generated is automatically set as the value of the APP_KEY variable in the .env file.

Configure Apache Web Server for Snipe-IT

Create Snipe-IT Apache configuration file wth the content below;

vim /etc/apache2/sites-available/snipeit.conf
	DocumentRoot /var/www/html/snipeit/public

	<Directory /var/www/html/snipeit/public>
		Allow From All
		AllowOverride None
		Options None

	RewriteEngine On
	RewriteCond %{REQUEST_URI} (.+)/$
	RewriteRule ^ %1 [L,R=301]
	RewriteRule ^ /index.php [L]

	ErrorLog ${APACHE_LOG_DIR}/snipeit-error.log
	CustomLog ${APACHE_LOG_DIR}/snipeit-access.log combined

Save the configuration file and run a file syntax test.

apachectl configtest

If the command return, Syntax Ok, proceed. Otherwise fix the would errors.

Enable Snipe-IT site configuration.

a2ensite snipeit.conf

Enable Rewrite module.

a2enmod rewrite

Restart Apache

systemctl restart apache2

Snipe-IT Pre-Flight & Setup

Run the pre-flight setup to verify that all configurations are okay. You can access Snipe-IT pre-flight page via the URL; http://<Snipe-Hostname or Address>.

The first page will do a system check to make sure your configuration is correct.

Install Snipe-IT on Debian 10/Ubuntu 18.04

If all is fine, proceed to database configuration page. Since we already set up the database, you will be told that it is already setup.

Snipe-IT database setup

Create Snipe-IT admin user and fill in their details.

Snipe-IT create admin user

Click Next to save the user and go to Snipe-IT dashboard.

Snipe-IT dashboard

There you go. You have successfully installed Snipe-IT Asset management tool on Debian 10 Buster/Ubuntu 18.04.

The Snipe-IT dashboard has so many functionalities. Read throughbthe user manual to learn about them.

Snipe-IT Overview

In our next tutorial, we are going to learn how to add assets to Snipe-IT for management.

Snipe-IT has also some command line utilities. Read more about them on Snipe-IT Command Line Utilities page.

Other Tutorials;

Install WonderCMS on Debian 10 Buster

Install WonderCMS with Nginx on Debian 10

Install GoAccess on Ubuntu 18.04/Debian 10 Buster

Configure APT Proxy on Debian 10 Buster



Please enter your comment!
Please enter your name here