Snipe-IT Installation on Ubuntu 24.04
This guide explains how to install Snipe-IT, a self-hosted IT asset management system, on Ubuntu 24.04 using Nginx, MariaDB, and PHP 8.3.
Ref.
https://snipe-it.readme.io/docs/installation
📦 1. Update the System
sudo apt update && sudo apt upgrade -y
🌐 2. Install Required Packages
Install Nginx, PHP, MariaDB, and all required PHP extensions:
sudo apt install nginx mariadb-server php-bcmath php-common php-ctype php-curl php-fileinfo php-fpm php-gd php-iconv php-intl php-mbstring php-mysql php-soap php-xml php-xsl php-zip git -y
⚙️ 3. Install Composer
sudo apt install composer -y
🛢️ 4. Create the Snipe-IT Database
sudo mysql
Inside the MySQL shell:
CREATE DATABASE snipeit;
GRANT ALL ON snipeit.* TO 'snipeit'@'localhost' IDENTIFIED BY 'yourStrongPassword';
FLUSH PRIVILEGES; EXIT;
📁 5. Download Snipe-IT
cd /var/www/html
sudo git clone https://github.com/snipe/snipe-it
cd snipe-it
⚙️ 6. Create and Configure .env File
.env Filesudo cp .env.example .env
sudo nano .env
Edit the following variables:
APP_URL=http://your-server-ip
DB_DATABASE=snipeit
DB_USERNAME=snipeit
DB_PASSWORD=yourStrongPassword
🔒 7. Set Permissions
sudo chown -R www-data: /var/www/html/snipe-it
sudo chmod -R 755 /var/www/html/snipe-it
🧱 8. Install Dependencies with Composer
sudo composer update --no-plugins --no-scripts
sudo composer install --no-dev --prefer-source --no-plugins --no-scripts
🔑 9. Generate App Key
sudo php artisan key:generate
Make sure you keep a copy of your APP_KEY in a safe place, for example, a secure password manager. This key is required to decrypt any encrypted fields in the database.
🧠 10. Check PHP FPM Version
sudo systemctl list-units --type=service | grep php
Make sureEnsure PHP 8.3 (or current)the current version) is installed and running.