Skip to content

21 Comments

  1. Todd Avery
    October 24, 2020 @ 3:22 am

    This is a great outline. Do you have a how to for upgrading to the newest version if you already have it going with these instructions? Snipe-IT released their new version this past week.

    Reply

    • Jay Singh
      October 24, 2020 @ 2:44 pm

      Thank you for your feedback.

      I made a video on upgrade. Here is the video https://www.youtube.com/watch?v=M17jI71EcKA&t=54s. There is a security risk mentioned in the pinned comment. I will try to post a blog on it and rectify the security risk.

      Reply

  2. Dan
    November 4, 2020 @ 1:24 am

    great guide worked perfectly, thank you

    Reply

  3. emr66
    November 16, 2020 @ 4:51 pm

    great article, most of the installation guide has some missing points, I tried for 2 days, finally I found myself in your article, now everything working except then date settings. I configured date in env file and also php.ini file. Even that still I see wrong date in Localization menu, time is correct but date is wrong and not changing. Always 2020-11-25. How can I fix this?

    Reply

    • Jay Singh
      November 17, 2020 @ 11:24 am

      Thank you.
      This is odd, even that date is in future. I will look into this and update you here.
      Jay

      Reply

      • emr66
        November 17, 2020 @ 5:00 pm

        Also if possible, could you clarify smtp settings, I tried almost all the options which adviced online articles, no luck. I use smtp settings for our exchange server 2016

        Reply

        • Jay Singh
          November 17, 2020 @ 5:24 pm

          This is what I have in my docs, however, these are consumer Outlook settings.

          MAIL_DRIVER=smtp
          MAIL_HOST=smtp-mail.outlook.com
          MAIL_PORT=25
          MAIL_USERNAME=test@outlook.com
          MAIL_PASSWORD=YourPassword
          MAIL_ENCRYPTION=TLS
          MAIL_FROM_ADDR=test@outlook.com
          MAIL_FROM_NAME=’Snipe-IT’
          MAIL_REPLYTO_ADDR=test@outlook.com
          MAIL_REPLYTO_NAME=’Snipe-IT’

          Reply

  4. Moad
    March 2, 2021 @ 9:11 pm

    Thanks for your great article.
    After all of these steps, when i want to start setup it show me this error
    Database D’oh! Looks like we can’t connect to your database. Please update your database settings in your .env file. Your database says: SQLSTATE[HY000] [2002] Connection refused (SQL: select 2 + 2)

    How to fix this issue?

    Reply

    • Jay Singh
      March 3, 2021 @ 11:56 am

      Check the MySQL server details in the .env file. If everything is fine there then it would be to do something with the user you created and permissions of this user on snipeit database.

      Reply

  5. Josh
    March 5, 2021 @ 4:09 am

    Really appreciate this outline. I was wondering if you could provide the command that will take down the test PHP page created by the “sudo bash -c “echo -e ‘<?php\nphpinfo();\n?>’ > /var/www/html/phpinfo.php” command that you provide during the testing phase. It is helpful for testing, but certainly would be nice to take down once it has served its purpose. Thanks!

    Reply

    • Jay Singh
      March 7, 2021 @ 5:57 pm

      Thank you for your feedback. I agree with you and will add that step to remove test PHP page.

      Reply

      • Josh
        May 1, 2021 @ 6:57 am

        Believe I found the solution:

        $ cd /var/www/html/
        # Browses to where the phpinfo.php file was created

        $ sudo rm phpinfo.php
        # Removes the phpinfo.php file containing the PHP info that Apache would display

        Reply

  6. Zed
    July 1, 2021 @ 7:01 am

    Hi, i did all this
    But in the end my preflight test says
    “File Owner: It looks like your files are owned by root, which might be a root/admin account. It’s never a good idea to run a website with escalated priveliges.”

    Edit: Sorted. Just had to chown -R www-data:www-data /var/www/snipeit

    Reply

    • Ben Griffiths
      October 10, 2021 @ 11:55 am

      Just a heads up, your content should also not be owned by www-data. The only content which should be owned by www-data is the specific files that you need Snipe-IT to be able to modify and specific directories that they need to be able to create or delete files in. This includes the storage and public/uploads directories. The remaining directories and files should not be owned (or writable) by www-data because every file that www-data can write to is a file that an attacker who compromises your web server (including any scripts or web apps that it is running) will be able to replace with whatever malicious data they may choose. All other files should be owned by a non-root user, like Ubuntu.

      Reply

  7. Giri
    August 17, 2021 @ 1:03 am

    Job for apache2.service failed because the control process exited with error code.
    See “systemctl status apache2.service” and “journalctl -xe” for details.

    Hi please help me on this

    Reply

  8. Ehsan
    September 10, 2021 @ 11:35 am

    How can we enable HTTPS on this local snipe it and with a URL instead of ip address

    Reply

  9. Rakesh
    February 17, 2022 @ 3:10 am

     Failed to parse dotenv file due to an invalid name. Failed at [REQUIRED: BASIC APP SETTINGS]. while updating this command sudo php artisan key:generate
    

    Reply

  10. Iamoe
    May 30, 2022 @ 6:41 am

    > Illuminate\Foundation\ComposerScripts::postAutoloadDump
    > @php artisan package:discover –ansi
    The environment file is invalid!
    Failed to parse dotenv file. Encountered an invalid name at [REQUIRED: BASIC APP SETTINGS].
    Script @php artisan package:discover –ansi handling the post-autoload-dump event returned with error code 1

    Reply

  11. Shaik
    January 18, 2024 @ 4:06 am

    I follow as you provide all steps successfully, and i can acess apache2 site also but i getting this error in after exquisite ip
    D’oh! Looks like we can’t connect to your database. Please update your database settings in your .env file. Your database says: SQLSTATE[HY000] [1045] Access denied for user ‘itasset’@’localhost’ (using password: YES) (SQL: select 2 + 2)”

    After click create new user i got error 500 server

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *