Cloud and Self-Hosting

Snipe-IT Installation on Ubuntu 24.04 (Updated from the 20.04 Guide)

Install Snipe-IT 8 on Ubuntu 24.04 with Apache, PHP 8.3 and MariaDB: database, .env, Composer, permissions, HTTPS, cron and upgrades. Replaces the 20.04 guide.

By Amjid Ali · · Updated · 7 min read

Snipe IT Instsallation Ubuntu 20.04: SyncBricks cover
In this article
  1. Quick answer: Snipe-IT on Ubuntu 24.04 in 9 steps
  2. Requirements
  3. Step 1: Update Ubuntu 24.04
  4. Step 2: Install Apache, MariaDB and PHP 8.3
  5. Step 3: Secure MariaDB and create the database
  6. Step 4: Install Composer 2
  7. Step 5: Download Snipe-IT
  8. Step 6: Configure the .env file
  9. Step 7: Install dependencies and generate the app key
  10. Step 8: Set ownership and permissions
  11. Step 9: Create the Apache virtual host
  12. Step 10: Run the setup wizard
  13. Backups and upgrades
  14. Migrating from the Ubuntu 20.04 install
  15. Alternative: the official install script
  16. Troubleshooting
  17. 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

  1. sudo apt update && sudo apt upgrade -y
  2. Install Apache, MariaDB, PHP 8.3 and the extensions (Step 2 below).
  3. Create the snipeit database and user in MariaDB.
  4. Install Composer 2.
  5. git clone https://github.com/grokability/snipe-it /var/www/snipe-it
  6. Copy .env.example to .env; set APP_URL, APP_TIMEZONE and the DB_ values.
  7. composer install --no-dev --prefer-source, then php artisan key:generate.
  8. Set ownership and permissions, create the Apache virtual host, enable mod_rewrite.
  9. 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_URL must start with http:// or https://, must not end in a slash, must not contain /public, and must match the address you type in the browser. Use http:// until HTTPS is set up in Step 10.
  • DB_CONNECTION=mariadb is recommended in the current .env.example when your server is MariaDB, so backups call mariadb-dump.
  • Keep APP_DEBUG=false in production. Switch it to true only 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:

  1. On the old server, run php artisan snipeit:backup and copy the zip plus your .env (for APP_KEY).
  2. Build the new 24.04 server with this guide, using the same APP_KEY in .env instead of generating a new one.
  3. Restore with sudo -u www-data php artisan snipeit:restore /path/to/backup.zip and then sudo -u www-data php artisan migrate --force.
  4. 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_KEY or 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_URL does not match the URL in your browser. Fix it and run php artisan config:clear.
  • 404 on every page except the home page: mod_rewrite is off or AllowOverride All is missing from the virtual host.
  • Changes to .env do nothing: run sudo -u www-data php artisan config:clear and restart Apache.

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

  1. Snipe-IT requirements, Snipe-IT documentation
  2. Snipe-IT configuration (.env), Snipe-IT documentation
  3. Downloading Snipe-IT, Snipe-IT documentation
  4. Common issues, Snipe-IT documentation
  5. grokability/snipe-it releases, GitHub (Grokability)
  6. 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