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.
Reference: Snipe-IT Official Installation Guide
1. Update the System
2. Install Required Packages
Install Nginx, MariaDB server, PHP 8.3, 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
4. Create the Snipe-IT Database
Start the MariaDB shell:
In the MariaDB shell, run:
CREATE DATABASE snipeit;
GRANT ALL ON snipeit.* TO 'snipeit'@'localhost' IDENTIFIED BY 'yourStrongPassword';
FLUSH PRIVILEGES;
EXIT;
Note
Replace 'yourStrongPassword' with a strong password of your choice.
5. Download Snipe-IT
6. Create and Configure the Environment File
Copy the example environment file and edit it:
Edit the following variables:
APP_URL=http://your-server-ip
DB_DATABASE=snipeit
DB_USERNAME=snipeit
DB_PASSWORD=yourStrongPassword
Note
Replace your-server-ip and yourStrongPassword as appropriate.
7. Set Permissions
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 the Application Key
Warning
Save a copy of your APP_KEY in a secure location. It is required to decrypt any encrypted fields in the database.
10. Check PHP-FPM Version
Note
Ensure that PHP 8.3 (or your current version) is installed and running.
11. Enable PHP-FPM
12. Create Nginx Configuration for Snipe-IT
Create the site configuration file:
Paste the following content (adjust server_name and PHP version if needed):server {
listen 80;
server_name your-server-ip;
root /var/www/html/snipe-it/public;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include fastcgi.conf;
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.3-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Note
Replace your-server-ip with your server's IP address if needed. Adjust PHP socket path/version if you are using a different PHP release.
13. Enable the Site
Create a symlink to enable the site:
14. Update Nginx Main Config
Edit Nginx's main configuration file:
Add the following line inside the http block:15. Restart Nginx
16. Access the Snipe-IT Web Interface
Open your web browser and visit:
http://your-server-ip Follow the web-based setup wizard to complete installation.
Your Snipe-IT instance should now be running. Refer to the Snipe-IT Official documentation for advanced configuration and troubleshooting.