Cloud and Self-Hosting
Snipe-IT Installation on Ubuntu 24.04 (Updated from the 20.04 Guide)
By Amjid Ali · · Updated · 7 min read

In this article
- Quick answer: Snipe-IT on Ubuntu 24.04 in 9 steps
- Requirements
- Step 1: Update Ubuntu 24.04
- Step 2: Install Apache, MariaDB and PHP 8.3
- Step 3: Secure MariaDB and create the database
- Step 4: Install Composer 2
- Step 5: Download Snipe-IT
- Step 6: Configure the .env file
- Step 7: Install dependencies and generate the app key
- Step 8: Set ownership and permissions
- Step 9: Create the Apache virtual host
- Step 10: Run the setup wizard
- Backups and upgrades
- Migrating from the Ubuntu 20.04 install
- Alternative: the official install script
- Troubleshooting
- Related guides
To install Snipe-IT on Ubuntu 24.04, set up Apache, MariaDB and PHP 8.3, create a database, clone Snipe-IT from GitHub into /var/www/snipe-it, configure .env, run Composer and php artisan key:generate, fix permissions on storage, public/uploads and bootstrap/cache, and point Apache at the public folder. You finish in the browser with the setup wizard. It takes about 20 minutes on a fresh server.
This guide replaces my original Snipe-IT installation for Ubuntu 20.04. Ubuntu 20.04 ships PHP 7.4, and Snipe-IT 8 needs PHP 8.2 or newer, so the old steps no longer produce a working install. The address of this page stays the same; the steps are now for Ubuntu 24.04 LTS and Snipe-IT 8.8.0 (released 30 September 2026).
The original video walks through the same flow on 20.04 and is still useful to see the setup wizard:
Quick answer: Snipe-IT on Ubuntu 24.04 in 9 steps
sudo apt update && sudo apt upgrade -y- Install Apache, MariaDB, PHP 8.3 and the extensions (Step 2 below).
- Create the
snipeitdatabase and user in MariaDB. - Install Composer 2.
git clone https://github.com/grokability/snipe-it /var/www/snipe-it- Copy
.env.exampleto.env; setAPP_URL,APP_TIMEZONEand theDB_values. composer install --no-dev --prefer-source, thenphp artisan key:generate.- Set ownership and permissions, create the Apache virtual host, enable
mod_rewrite. - Open
http://your-server/setup, run the pre-flight check, create the admin user, then add HTTPS and the scheduler cron.
Requirements
| Item | Snipe-IT 8 needs | Ubuntu 24.04 provides |
|---|---|---|
| PHP | 8.2.0 to below 8.6 | 8.3 |
| Database | MySQL 5.7+ or MariaDB | MariaDB 10.11 |
| Web server | Apache with mod_rewrite, or Nginx |
Apache 2.4 |
| PHP extensions | JSON, OpenSSL, PDO, Mbstring, Tokenizer, cURL, MySQLi, Zip, Fileinfo, BCMath, XML, Sodium, Exif, GD or Imagick, LDAP (if used) | Available from the Ubuntu archive |
A VM with 2 vCPU, 2 to 4 GB RAM and 20 GB disk is plenty for a few thousand assets. I run small apps like this as VMs on Proxmox; give the server a static IP and a DNS name such as assets.example.com before you start.
Step 1: Update Ubuntu 24.04
sudo apt update && sudo apt upgrade -y
sudo timedatectl set-timezone Australia/Sydney
Use your own time zone; Snipe-IT uses it for audit dates and reports.
Step 2: Install Apache, MariaDB and PHP 8.3
sudo apt install -y apache2 mariadb-server mariadb-client \
libapache2-mod-php php php-cli php-common php-curl php-mysql php-gd \
php-ldap php-zip php-mbstring php-xml php-bcmath php-intl \
git unzip curl
On Ubuntu, Sodium, Exif, Fileinfo, Tokenizer and OpenSSL are part of php8.3-common, so they are already there. Check:
php -v
php -m | grep -E -i "bcmath|curl|exif|fileinfo|gd|ldap|mbstring|mysqli|sodium|xml|zip"
php -v should show PHP 8.3.x. Enable URL rewriting and make sure both services start at boot:
sudo a2enmod rewrite
sudo systemctl enable --now apache2 mariadb
If UFW is on, allow web traffic:
sudo ufw allow "Apache Full"
New to the LAMP stack? My LAMP on Ubuntu guide explains each piece.
Step 3: Secure MariaDB and create the database
sudo mariadb-secure-installation
Press Enter for the current root password (none), keep unix socket authentication, remove anonymous users, disallow remote root login and remove the test database.
Create the database and user. Replace the password:
sudo mariadb
CREATE DATABASE snipeit CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'snipeit'@'localhost' IDENTIFIED BY 'Use-A-Strong-Password-Here';
GRANT ALL PRIVILEGES ON snipeit.* TO 'snipeit'@'localhost';
FLUSH PRIVILEGES;
EXIT;
The old version of this guide had curly quotes in the GRANT line, which MariaDB rejects; copy the block above as plain text.
Step 4: Install Composer 2
Ubuntu's composer package works, but the official installer gives you the current version:
cd ~
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
rm composer-setup.php
composer --version
Step 5: Download Snipe-IT
The project moved from snipe/snipe-it to the grokability organisation on GitHub:
sudo git clone https://github.com/grokability/snipe-it /var/www/snipe-it
cd /var/www/snipe-it
git log -1 --oneline
Using Git (rather than a zip) makes upgrades a single command later.
Step 6: Configure the .env file
sudo cp .env.example .env
sudo nano .env
Change these lines:
APP_URL=https://assets.example.com
APP_TIMEZONE='Australia/Sydney'
APP_LOCALE='en-US'
DB_CONNECTION=mariadb
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=snipeit
DB_USERNAME=snipeit
DB_PASSWORD='Use-A-Strong-Password-Here'
Rules that trip people up:
APP_URLmust start withhttp://orhttps://, must not end in a slash, must not contain/public, and must match the address you type in the browser. Usehttp://until HTTPS is set up in Step 10.DB_CONNECTION=mariadbis recommended in the current.env.examplewhen your server is MariaDB, so backups callmariadb-dump.- Keep
APP_DEBUG=falsein production. Switch it totrueonly while you troubleshoot.
Step 7: Install dependencies and generate the app key
cd /var/www/snipe-it
sudo COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev --prefer-source
sudo php artisan key:generate --force
Composer takes a few minutes. key:generate writes APP_KEY into .env; the console prints Application key set successfully. Save that key in your password manager. Without it, a restored database cannot decrypt encrypted fields.
Step 8: Set ownership and permissions
sudo chown -R www-data:www-data /var/www/snipe-it
sudo chmod -R 775 /var/www/snipe-it/storage /var/www/snipe-it/public/uploads /var/www/snipe-it/bootstrap/cache
sudo chmod 640 /var/www/snipe-it/.env
These three folders must be writable by Apache. Wrong permissions here are the number one cause of the Snipe-IT 500 server error.
Step 9: Create the Apache virtual host
sudo nano /etc/apache2/sites-available/snipe-it.conf
<VirtualHost *:80>
ServerName assets.example.com
DocumentRoot /var/www/snipe-it/public
<Directory /var/www/snipe-it/public>
Options -Indexes +FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/snipe-it-error.log
CustomLog ${APACHE_LOG_DIR}/snipe-it-access.log combined
</VirtualHost>
DocumentRoot must be the public folder, never the top-level Snipe-IT folder, or your .env could be downloadable. Require all granted replaces the old Apache 2.2 Order allow,deny lines from the 20.04 guide.
Enable it:
sudo a2dissite 000-default.conf
sudo a2ensite snipe-it.conf
sudo apache2ctl configtest
sudo systemctl reload apache2
configtest should print Syntax OK.
Step 10: Run the setup wizard
Open http://assets.example.com/setup (or the server IP). The pre-flight page checks the database connection, folder permissions, APP_URL and PHP settings. Fix anything red, then click Next: Create Database Tables, and on the last page create your organisation and the first admin user.
Add HTTPS with Let's Encrypt
sudo apt install -y certbot python3-certbot-apache
sudo certbot --apache -d assets.example.com --redirect
Then update .env:
APP_URL=https://assets.example.com
SECURE_COOKIES=true
and clear the cached config:
cd /var/www/snipe-it
sudo -u www-data php artisan config:clear
Only set SECURE_COOKIES=true after HTTPS works; with plain HTTP, nobody can log in. If Snipe-IT sits behind a reverse proxy, set APP_TRUSTED_PROXIES to the proxy's IP.
Add the scheduler cron
Snipe-IT sends alerts, expiring licence reminders and audit notices from Laravel's scheduler, which needs a cron entry:
sudo crontab -u www-data -e
* * * * * /usr/bin/php /var/www/snipe-it/artisan schedule:run >> /dev/null 2>&1
Set up mail
Fill in the MAIL_ settings in .env (SMTP host, port, user, password, from address), then run sudo -u www-data php artisan config:clear and send a test from Settings > Notifications. A Gmail relay works well for small teams; see Postfix with Gmail SMTP.
Backups and upgrades
Create a backup (database plus uploads, as a zip in storage/app/backups):
cd /var/www/snipe-it
sudo -u www-data php artisan snipeit:backup
Upgrade to the latest release:
cd /var/www/snipe-it
sudo -u www-data php artisan snipeit:backup
sudo php upgrade.php
sudo chown -R www-data:www-data /var/www/snipe-it
upgrade.php checks PHP requirements, pulls the new code, runs Composer, applies migrations and clears caches. Read the release notes first.
Migrating from the Ubuntu 20.04 install
If you followed the old version of this guide:
- On the old server, run
php artisan snipeit:backupand copy the zip plus your.env(forAPP_KEY). - Build the new 24.04 server with this guide, using the same
APP_KEYin.envinstead of generating a new one. - Restore with
sudo -u www-data php artisan snipeit:restore /path/to/backup.zipand thensudo -u www-data php artisan migrate --force. - Point DNS at the new server once you have checked a few assets and users.
Because PHP on 20.04 is too old for Snipe-IT 8, building a new server and restoring into it is cleaner than upgrading PHP in place.
Alternative: the official install script
For a quick test VM, the repository's script installs everything in one go on Ubuntu 23.04 and later:
wget https://raw.githubusercontent.com/grokability/snipe-it/master/snipeit.sh
chmod 744 snipeit.sh
sudo ./snipeit.sh
It asks for the host name, sets up the database with a random password, runs Composer, creates the scheduler cron and prints the URL to finish setup.
Troubleshooting
- 500 server error after install: almost always permissions, a missing
APP_KEYor a missing PHP extension. See my Snipe-IT 500 server error fixes. - CSS and images do not load, or links go to the wrong place:
APP_URLdoes not match the URL in your browser. Fix it and runphp artisan config:clear. - 404 on every page except the home page:
mod_rewriteis off orAllowOverride Allis missing from the virtual host. - Changes to
.envdo nothing: runsudo -u www-data php artisan config:clearand restart Apache.
Related guides
- Install LAMP on Ubuntu Server
- Ubuntu Server installation guide
- Keycloak installation if you want SSO in front of internal apps
If you want to go deeper into the platform I host these apps on, my Proxmox VE course on Udemy covers it end to end.
Frequently asked questions
How do I install Snipe-IT on Ubuntu?+
On Ubuntu 24.04, install Apache, MariaDB and PHP 8.3 with the extensions Snipe-IT needs, create a database and user, clone https://github.com/grokability/snipe-it into /var/www/snipe-it, copy .env.example to .env and set APP_URL and the database details, run composer install --no-dev --prefer-source and php artisan key:generate, set permissions on storage, public/uploads and bootstrap/cache, point an Apache virtual host at the public folder and finish in the web setup wizard.
What PHP version does Snipe-IT 8 need?+
Snipe-IT's requirements page lists PHP 8.2.0 or higher and below 8.6. Ubuntu 24.04 ships PHP 8.3, so the default packages work without a third-party PPA. Ubuntu 20.04 ships PHP 7.4, which current Snipe-IT does not support, which is the main reason to move to 24.04.
Does Snipe-IT still support Ubuntu 20.04?+
Not with its default packages. Ubuntu 20.04 reached the end of standard support in May 2025 and its PHP 7.4 is too old for Snipe-IT 8. Build a new Ubuntu 24.04 server, install Snipe-IT there, and move your database and uploads across rather than upgrading PHP on 20.04.
Is there an automatic install script for Snipe-IT?+
Yes. The Snipe-IT repository includes snipeit.sh, which supports Ubuntu 23.04 and newer, Debian and several RHEL-based systems. It installs Apache, PHP and MariaDB, creates the database, runs Composer and adds the scheduler cron. It is fine for a quick test; the manual steps in this guide give you control over names, passwords and HTTPS.
How do I upgrade Snipe-IT?+
Back up first with php artisan snipeit:backup, then run php upgrade.php from the Snipe-IT folder as the user that owns the files. The script checks requirements, pulls the new code with Git, runs Composer and applies database migrations. Read the release notes for any manual step before a major version jump.
Can I install Snipe-IT with Docker instead?+
Yes. Snipe-IT publishes an official snipe/snipe-it image on Docker Hub with a sample Docker Compose file that pairs it with MariaDB. Docker is easier to upgrade, but the manual install is still the method most people search for and it is easier to troubleshoot permissions and PHP settings on it.
Sources
- Snipe-IT requirements, Snipe-IT documentation
- Snipe-IT configuration (.env), Snipe-IT documentation
- Downloading Snipe-IT, Snipe-IT documentation
- Common issues, Snipe-IT documentation
- grokability/snipe-it releases, GitHub (Grokability)
- snipeit.sh install script, GitHub (Grokability)
Related videos
Video library- Cloud and Self-Hosting
Install a Desktop GUI on Ubuntu Server 20.04
· 3:21 · 65.3K views
Watch on YouTube - Cloud and Self-Hosting
How to Set Static IP on Ubuntu Server | Netplan Configuration (Ubuntu 24.04)
· 3:33 · 2.7K views
Watch on YouTube - Cloud and Self-Hosting
How to Install OpenClaw on Ubuntu 24.04 | OpenClaw Setup in Proxmox VM
· 8:22 · 5.9K views
Watch on YouTube
Keep reading
Cloud and Self-HostingList of Best Server Virtualization Software in ItalyA list of the best server virtualization software options for enterprises in Italy, compared on architecture, licensing, and security. · 5 min read
Cloud and Self-HostingWhen Free Stops Being Free: Understanding Cloud Storage for Business Usesource · 3 min read
Cloud and Self-HostingExchange Server Database won’t Mount after Dirty Shutdown? Here’s How ESEUTIL can HelpExchange admins sometimes face a situation where the database does not come online or fails to mount itself. There are a number of things that could cause · 5 min read