P1 - Install Snipeit on Ubuntu Server Step by Step GUI
🚀 Snipe-IT – P1 How to Install Snipe-IT on Ubuntu Server (Step-by-Step GUI Guide)
🔎 Introduction
Installing Snipe-IT on Ubuntu Server is one of the most effective ways to deploy a powerful, open-source IT asset management system in your organization. Snipe-IT enables IT administrators to centrally manage hardware assets, software licenses, accessories, and users through a clean web-based dashboard.
In this step-by-step guide, you will install and configure all required components, including Apache, PHP, MariaDB (MySQL), Composer, and the Snipe-IT application itself. We will also configure environment variables, adjust file permissions, generate the application key, migrate the database, and complete the web UI setup.
This installation method is suitable for:
IT administrators deploying asset management systems
System engineers building internal inventory platforms
Small businesses and enterprise IT teams
Ubuntu Server 20.04 and 22.04 environments
By the end of this guide, you will have a fully functional Snipe-IT platform ready for production use.
🧩 Step 1: Environment Setup
🔹 #1 Update System
sudo apt update && sudo apt upgrade -y
🔹 #2 Install Apache, PHP and Required Extensions
sudo apt install apache2 -y
sudo apt install php php-cli php-mbstring php-xml php-bcmath php-curl php-mysql \
php-common php-zip php-gd php-tokenizer unzip curl git -y
🗄 Step 2: Install MariaDB (or MySQL)
🔹 Install MariaDB
sudo apt install mariadb-server mariadb-client -y
🔹 Enable MariaDB Service
sudo systemctl enable mariadb
sudo systemctl start mariadb
🔹 Secure MySQL Installation
sudo mysql_secure_installation
When prompted, press enter if no root password exists.
🗃 Step 3: Create Database for Snipe-IT
🔹 Enter MariaDB Shell
sudo mysql -u root -p
🔹 Create Database and User
CREATE DATABASE snipeit;
CREATE USER 'snipeuser'@'localhost' IDENTIFIED BY 'Abc@1234';
GRANT ALL PRIVILEGES ON snipeit.* TO 'snipeuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
📦 Step 4: Install Composer (PHP Package Manager)
cd ~
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
⬇ Step 5: Download Snipe-IT Source Code
Official download page:
https://snipeitapp.com/download
cd /var/www/
sudo wget https://github.com/grokability/snipe-it/archive/refs/tags/v8.1.15.tar.gzsudo tar -xzf v8.1.15.tar.gz
sudo mv snipe-it-8.1.15 snipe-it
sudo chown -R www-data:www-data snipe-it
cd snipe-it
sudo cp .env.example .env
⚙ Step 6: Configure .env File
sudo nano .env
Edit the following lines:
APP_URL=http://192.168.16.208
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=snipeit
DB_USERNAME=snipeuser
DB_PASSWORD=Abc@1234
Save and exit.
🧱 Step 7: Install PHP Libraries Using Composer
🔹 Mark Directory as Safe
git config --global --add secure.directory /var/www/snipe-it
🔹 Upgrade PHP to 8.2 (Required for Latest Snipe-IT / Laravel 11)
1️⃣ Add PHP Repository
sudo apt install software-properties-common -y
sudo add-apt-repository ppa:ondrej/php -y
sudo apt update
2️⃣ Install PHP 8.2
sudo apt install php8.2 php8.2-cli php8.2-mysql php8.2-mbstring php8.2-xml \
php8.2-bcmath php8.2-curl php8.2-zip php8.2-gd php8.2-common php8.2-tokenizer -y
3️⃣ Set PHP 8.2 as Default
sudo update-alternatives --install /usr/bin/php php /usr/bin/php8.2 1
sudo update-alternatives --config php
Select PHP 8.2 from the list.
4️⃣ Enable Apache PHP Module
sudo apt install libapache2-mod-php8.2 -y
sudo a2dismod php8.1
sudo a2enmod php8.2
sudo systemctl restart apache2
5️⃣ Verify Version
php -v
🔹 Install Composer Dependencies
sudo chown -R bao:www-data /var/www/snipe-it
sudo chmod -R 755 /var/www/snipe-it
cd /var/www/snipe-it
composer install --no-dev --prefer-source
This process may take 10–20 minutes.
🔐 Step 8: Generate Application Key and Migrate Database
cd /var/www/snipe-it/
php artisan key:generate
php artisan migrate:fresh
👤 Step 9: Create Admin User
php artisan snipeit:create-admin \
--email="admin@example.com" \
--first_name="Admin" \
--last_name="User" \
--username="admin" \
--password="Abc#1234"
🌐 Step 10: Configure Apache Virtual Host
🔹 Create Configuration File
sudo nano /etc/apache2/sites-available/snipeit.conf
Add the following:
<VirtualHost *:80>
ServerName http://192.168.16.208
DocumentRoot /var/www/snipe-it/public<Directory /var/www/snipe-it/public>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/snipeit_error.log
CustomLog ${APACHE_LOG_DIR}/snipeit_access.log combined
</VirtualHost>
🔹 Enable Site and Rewrite Module
sudo a2ensite snipeit.conf
sudo a2enmod rewrite
sudo systemctl restart apache2
🔹 Assign Write Permissions
sudo chown -R www-data:www-data /var/www/snipe-it/storage /var/www/snipe-it/bootstrap/cache
sudo chmod -R 775 /var/www/snipe-it/storage /var/www/snipe-it/bootstrap/cache
🌍 Step 11: Complete Web UI Setup
Open your browser and access:
http://192.168.16.208
Log in using the admin credentials created earlier and complete the web-based setup.
Your Snipe-IT asset management system is now ready.
🏁 Conclusion
You have successfully installed Snipe-IT on Ubuntu Server with Apache, MariaDB, PHP 8.2, and Composer. This setup provides a stable and secure open-source IT asset management platform suitable for production environments.
With Snipe-IT, you can now:
Track hardware assets
Manage software licenses
Control accessory allocation
Monitor asset lifecycle
Centralize IT inventory management
This deployment method ensures compatibility with modern Laravel versions and enterprise-grade configurations.
See also related articles
P13 – Ultimate QR Code SnipeIT Setup Made Easy
P13 – Ultimate QR Code SnipeIT Setup Made Easy SnipeIT – P13 QR Code Setup Guide | Create and Print Asset QR Codes Managing IT assets without proper labeling can quickly become chaotic.When devices move between departments, employees leave, or audits happen, identifying assets manually wastes time and increases errors....
Read MoreP12 – Ultimate Bulk Method to Check In Check Out Assets in SnipeIT
P12 – Ultimate Bulk Method to Check In Check Out Assets in SnipeIT SnipeIT – P12 The Fastest Way to Check-In & Check-Out Assets in Snipe-IT (Bulk Method) Managing a few devices manually is easy. Managing 100–500 assets during onboarding, offboarding, or department transfers? That’s a different story. If you...
Read MoreP11 – Ultimate Guide to Check In Check Out in SnipeIT
P11 – Ultimate Guide to Check In Check Out in SnipeIT SnipeIT – P11 How to Manage Check In Check Out in SnipeIT (Step-by-Step) Efficient asset tracking is the backbone of every IT department. If you cannot accurately manage Check In check Out in SnipeIT, your asset database quickly becomes...
Read More