Manage Your IT Assets Like a Pro — Install Snipe-IT on Ubuntu Server

💼 Install and Configure Snipe-IT on Ubuntu (Step-by-Step)

Complete guide to deploy the open-source Snipe-IT Asset Management System on Ubuntu 20.04 or 22.04 with Apache, PHP 8.1, and MariaDB.


📋 Prerequisites

  • Ubuntu 20.04 LTS or 22.04 LTS server
  • Root or sudo privileges
  • Active internet connection
  • Optional domain (for HTTPS setup)
  • Installed: PHP 8.1+, Composer, MariaDB/MySQL, Apache/Nginx, Git

⚙️ Installation Procedure

Step 1 – System Update

sudo apt update && sudo apt upgrade -y
sudo apt install unzip curl git software-properties-common -y

Step 2 – Install PHP and Extensions

sudo add-apt-repository ppa:ondrej/php -y
sudo apt update
sudo apt install php8.1 php8.1-cli php8.1-common php8.1-mysql php8.1-gd \
php8.1-xml php8.1-mbstring php8.1-bcmath php8.1-zip php8.1-curl \
php8.1-tokenizer php8.1-fileinfo unzip -y

Step 3 – Install Composer

curl -sS https://getcomposer.org/installer -o composer-setup.php
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
composer --version

Step 4 – Install and Configure MariaDB

sudo apt install mariadb-server mariadb-client -y
sudo mysql_secure_installation

Create the Snipe-IT database and user:

sudo mysql -u root -p
CREATE DATABASE snipeit;
CREATE USER 'snipeit_user'@'localhost' IDENTIFIED BY 'StrongPasswordHere';
GRANT ALL PRIVILEGES ON snipeit.* TO 'snipeit_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Step 5 – Install and Configure Apache

sudo apt install apache2 libapache2-mod-php8.1 -y
sudo a2enmod rewrite
sudo systemctl restart apache2

Step 6 – Download Snipe-IT

cd /var/www/
sudo git clone https://github.com/snipe/snipe-it.git
sudo chown -R www-data:www-data snipe-it
cd snipe-it
cp .env.example .env

Step 7 – Configure .env File

APP_URL=http://your-domain.com
APP_TIMEZONE='Asia/Kolkata'
DB_DATABASE=snipeit
DB_USERNAME=snipeit_user
DB_PASSWORD=StrongPasswordHere

Step 8 – Install Dependencies and Run Migrations

composer install --no-dev --prefer-source
php artisan key:generate
php artisan migrate --seed

Step 9 – Configure Apache Virtual Host

sudo nano /etc/apache2/sites-available/snipeit.conf

Add the following configuration:


    ServerName your-domain.com
    DocumentRoot /var/www/snipe-it/public

    
        AllowOverride All
        Require all granted
    

    ErrorLog ${APACHE_LOG_DIR}/snipeit_error.log
    CustomLog ${APACHE_LOG_DIR}/snipeit_access.log combined

Enable site and reload Apache:
sudo a2ensite snipeit.conf
sudo systemctl reload apache2

Step 10 – Set Permissions

sudo chown -R www-data:www-data /var/www/snipe-it
sudo chmod -R 755 /var/www/snipe-it

Step 11 – Access Snipe-IT

http://your-domain.com

🎉 Open the browser → Complete web setup → Create admin user → Start using Snipe-IT

Step 12 – (Optional) Enable HTTPS

sudo apt install certbot python3-certbot-apache -y
sudo certbot --apache -d your-domain.com

🧩 Validation Checklist

  • ✅ Application loads without error
  • ✅ Database connection successful
  • ✅ Admin user created
  • ✅ HTTPS active (if configured)

📚 References


© 2025 • Snipe-IT on Ubuntu — Sidhesh D. 🌙

Comments

Popular posts from this blog

Install & Configure GLPI on Ubuntu (Nginx + MariaDB + PHP 8.3) — Full SOP 2025

Basic Linux Commands

Secure Ollama API Deployment with Nginx Reverse Proxy