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,…
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.
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;
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.
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.
Create Snipe-IT admin user and fill in their details.
Click Next to save the user and go to 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.
We're passionate about sharing our knowledge and experiences with you through our blog. If you appreciate our efforts, consider buying us a virtual coffee. Your support keeps us motivated and enables us to continually improve, ensuring that we can provide you with the best content possible. Thank you for being a coffee-fueled champion of our work!
koromicha
I am the Co-founder of Kifarunix.com, Linux and the whole FOSS enthusiast, Linux System Admin and a Blue Teamer who loves to share technological tips and hacks with others as a way of sharing knowledge as:
"In vain have you acquired knowledge if you have not imparted it to others".
I followed your guide, but do get an empty screen at step “Snipe-IT Pre-Flight & Setup” only.
Maybe it is because I want to use it in “intranet” only and have configured /var/www/html/snipeit/.env APP_URL=http://MYlocalIPaddress only?
apachectl configtest
AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1. Set the ‘ServerName’ directive globally to suppress this message
Thanks for the guide. I have successfully installed snipe it. Was going through videos in youtubes, pages and etc. Nothing worked but your tutorials here helped me to set it up perfectly. I had two issues while installing it but managed to solve it and posted the solutions on top. Thanks alot for your time in creating this guide. Have a great day!
Hi koromicha
First of all…great post! I am very thankfull for such posts as I am a user without any debian knowledge.
I am trying to host snipe-it on a Raspberry Pi 3 on Raspbian Buster following your guides for LAMP stack and this post.
Unfortunately I am not able to go further after “Snipe-IT Database settings”
My steps and the outcome are per information on the below.
What is getting wrong on my installation and how can I solve it? As said I do not have any idear how to solve this as google search is overhelming me 🙁
Thanks, Markus
Install Required PHP Libraries
sudo curl -sS https://getcomposer.org/installer | php
giving me the output
All settings correct for using Composer
The installation directory “/var/www/html/snipeit” is not writable
sudo php composer.phar install –no-dev –prefer-source
giving me the output
Do not run Composer as root/super user! See……
Loading composer repositories with package information
Installing dependencies from lock file
Your requirements could not be resolved to an installable set of packages.
php composer.phar install –no-dev –prefer-source
giving me the output
Could not open input file: composer.phar
chown -R www-data:www-data /var/www/html/snipeit
giving me the output
chown: cannot read directory ‘/var/www/html/snipeit’: Permission denied
sudo chown -R www-data:www-data /var/www/html/snipeit
giving me the output
no error
Generate Snipe-IT App Key
php artisan key:generate
giving me the output
Could not open input file: artisan
Sudo php artisan key:generate
giving me the output
Warning: require(/var/www/html/snipeit/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /var/www/html/snipeit/bootstrap/autoload.php on line 17
PHP Fatal error: require(): Failed opening required ‘/var/www/html/snipeit/bootstrap/../vendor/autoload.php’ (include_path=’.:/usr/share/php’) in /var/www/html/snipeit/bootstrap/autoload.php on line 17
Hello Markus, apologies for the delayed response. We are looking into the issue, If you have not already solved it, and we will get back as soon as possible.
I don’t have a snipeadmin mysql user. Do I need to create it?
Yes please, see the section, Create Snipe-IT Database
I followed your guide, but do get an empty screen at step “Snipe-IT Pre-Flight & Setup” only.
Maybe it is because I want to use it in “intranet” only and have configured /var/www/html/snipeit/.env APP_URL=http://MYlocalIPaddress only?
its great.. just follow your step you can do it.
Thanks a lot.
I’m at Install Required PHP Libraries and got error installing the composer and
I added this, sudo chown -R snipeit /var/www/html/snipe
before proceeding to
cd /var/www/html/snipeit
curl -sS https://getcomposer.org/installer | php
php composer.phar install –no-dev –prefer-source.
it works and still in the midst of installing the snipeit. Hopefully it works at the end.
If this error occurs,
apachectl configtest
AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1. Set the ‘ServerName’ directive globally to suppress this message
Please do this,
Go to vim /etc/apache2/apache2.conf
insert anywhere ServerName snipeit.example.com
then restart apache by typing
sudo systemctl reload apache2
then all good to go, you will only see Syntax Ok.
Thanks for the guide. I have successfully installed snipe it. Was going through videos in youtubes, pages and etc. Nothing worked but your tutorials here helped me to set it up perfectly. I had two issues while installing it but managed to solve it and posted the solutions on top. Thanks alot for your time in creating this guide. Have a great day!
Hello Karthik. We are glad the tutorial helped.
Thank you for your feedback. This well help somebody someday. Cheers
Hi koromicha
First of all…great post! I am very thankfull for such posts as I am a user without any debian knowledge.
I am trying to host snipe-it on a Raspberry Pi 3 on Raspbian Buster following your guides for LAMP stack and this post.
Unfortunately I am not able to go further after “Snipe-IT Database settings”
My steps and the outcome are per information on the below.
What is getting wrong on my installation and how can I solve it? As said I do not have any idear how to solve this as google search is overhelming me 🙁
Thanks, Markus
Install Required PHP Libraries
sudo curl -sS https://getcomposer.org/installer | php
giving me the output
All settings correct for using Composer
The installation directory “/var/www/html/snipeit” is not writable
sudo php composer.phar install –no-dev –prefer-source
giving me the output
Do not run Composer as root/super user! See……
Loading composer repositories with package information
Installing dependencies from lock file
Your requirements could not be resolved to an installable set of packages.
php composer.phar install –no-dev –prefer-source
giving me the output
Could not open input file: composer.phar
chown -R www-data:www-data /var/www/html/snipeit
giving me the output
chown: cannot read directory ‘/var/www/html/snipeit’: Permission denied
sudo chown -R www-data:www-data /var/www/html/snipeit
giving me the output
no error
Generate Snipe-IT App Key
php artisan key:generate
giving me the output
Could not open input file: artisan
Sudo php artisan key:generate
giving me the output
Warning: require(/var/www/html/snipeit/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /var/www/html/snipeit/bootstrap/autoload.php on line 17
PHP Fatal error: require(): Failed opening required ‘/var/www/html/snipeit/bootstrap/../vendor/autoload.php’ (include_path=’.:/usr/share/php’) in /var/www/html/snipeit/bootstrap/autoload.php on line 17
Hello Markus, apologies for the delayed response. We are looking into the issue, If you have not already solved it, and we will get back as soon as possible.