Cloud and Self-Hosting
Snipe-IT 500 Server Error (RESOLVED)
By Amjid Ali · · Updated · 5 min read

In this article
- Quick fix checklist
- Step 1: Find the real error
- Fix 1: Folder permissions (the most common cause)
- Fix 2: Missing or invalid APP_KEY
- Fix 3: PHP version mismatch after an upgrade
- Fix 4: Missing PHP extension
- Fix 5: Database connection errors
- Fix 6: Migrations not run after an upgrade
- Fix 7: Missing vendor folder or Composer packages
- Fix 8: Passport (API) keys missing
- Fix 9: Stale cached config or OPcache
- Not a 500, but often confused with one
- Related guides
A Snipe-IT 500 server error means PHP or Laravel hit an error it could not show you. To fix it, read the real message in storage/logs/laravel.log (for example /var/www/snipe-it/storage/logs/laravel.log), then fix the cause it names. In most cases that is folder permissions, a missing APP_KEY, a PHP version or extension mismatch, wrong database settings or migrations not run after an upgrade. The fixes below cover each of these, with the exact error text you will see in the log.
Updated October 2026 for Snipe-IT 8.x (8.8.0 is current) on Ubuntu 24.04. If you are installing from scratch, follow my Snipe-IT installation guide for Ubuntu 24.04 first.
Quick fix checklist
Run these from the Snipe-IT folder. They fix the majority of 500 errors and are safe to run:
cd /var/www/snipe-it
sudo chown -R www-data:www-data .
sudo chmod -R 775 storage public/uploads bootstrap/cache
sudo -u www-data php artisan optimize:clear
sudo systemctl restart apache2
On Nginx with PHP-FPM, restart php8.3-fpm and nginx instead of apache2. If the error is still there, read the log.
Step 1: Find the real error
sudo tail -n 50 /var/www/snipe-it/storage/logs/laravel.log
Look at the newest production.ERROR: line. If the file is empty or not updating, the failure happened before Laravel could log it (often because it cannot write to storage), so check the web server log:
sudo tail -n 50 /var/log/apache2/error.log
To see the error in the browser for a minute, set APP_DEBUG=true in .env, run sudo -u www-data php artisan config:clear, reload the page, then set it back to false and clear the config again.
The original video for this post shows the permissions fix at about 13 minutes in:
Fix 1: Folder permissions (the most common cause)
Log shows: The stream or file "/var/www/snipe-it/storage/logs/laravel.log" could not be opened in append mode: Failed to open stream: Permission denied, or The /var/www/snipe-it/bootstrap/cache directory must be present and writable.
Snipe-IT writes to three places: storage, bootstrap/cache and public/uploads. The web server user (www-data on Ubuntu and Debian, apache on RHEL-based systems) must be able to write to them:
cd /var/www/snipe-it
sudo chown -R www-data:www-data .
sudo chmod -R 775 storage public/uploads bootstrap/cache
Do not use chmod -R 777 on the whole folder; it hides the problem and exposes .env. On RHEL, Rocky or Alma with SELinux enforcing, also label the writable folders:
sudo chcon -R -t httpd_sys_rw_content_t storage public/uploads bootstrap/cache
A related symptom from the Snipe-IT docs: a 500 error only when saving asset models or importing is also bootstrap/cache not being writable. Missing barcodes point at public/uploads/barcodes.
Fix 2: Missing or invalid APP_KEY
Log shows: No application encryption key has been specified. or The MAC is invalid. / The payload is invalid.
Check the key:
grep ^APP_KEY /var/www/snipe-it/.env
If it says APP_KEY=ChangeMe or is empty on a new install, generate one:
cd /var/www/snipe-it
sudo -u www-data php artisan key:generate --force
sudo -u www-data php artisan config:clear
On an existing install, do not generate a new key: put back the original key from your old .env or backup. A new key makes previously encrypted data unreadable, which is exactly what The MAC is invalid means. The Snipe-IT docs also note that The payload is invalid can be caused by Xdebug, so disable Xdebug on production servers.
Fix 3: PHP version mismatch after an upgrade
Log or browser shows: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.2.0".
Snipe-IT 8 requires PHP 8.2 or later and below 8.6. Check what the web server and CLI are using:
php -v
apache2ctl -M 2>/dev/null | grep -i php
Ubuntu 24.04 ships PHP 8.3, which is fine. Ubuntu 20.04 (PHP 7.4) and 22.04 (PHP 8.1) are too old for Snipe-IT 8 with stock packages, so either move to 24.04 or install a newer PHP and switch Apache to it:
sudo a2dismod php8.1
sudo a2enmod php8.3
sudo systemctl restart apache2
Fix 4: Missing PHP extension
Log shows: Class "DOMDocument" not found (php-xml), Call to undefined function mb_strlen() (php-mbstring), could not find driver (php-mysql), Call to undefined function bcadd() (php-bcmath) or Class "ZipArchive" not found (php-zip).
Install the full set Snipe-IT needs and restart Apache:
sudo apt install -y php-curl php-mysql php-gd php-ldap php-zip php-mbstring php-xml php-bcmath php-intl
sudo systemctl restart apache2
Fix 5: Database connection errors
Log shows: SQLSTATE[HY000] [1045] Access denied for user 'snipeit'@'localhost' or SQLSTATE[HY000] [2002] Connection refused.
1045: theDB_USERNAMEorDB_PASSWORDin.envis wrong. Put passwords with special characters in single quotes:DB_PASSWORD='p@ss#word'.2002: MariaDB is not running orDB_HOSTis wrong. Checksudo systemctl status mariadband tryDB_HOST=127.0.0.1.
Test the same credentials from the shell:
mariadb -u snipeit -p -h 127.0.0.1 snipeit -e "SELECT 1;"
Then sudo -u www-data php artisan config:clear.
Fix 6: Migrations not run after an upgrade
Log shows: SQLSTATE[42S22]: Column not found: 1054 Unknown column or SQLSTATE[42S02]: Base table or view not found.
The code is newer than the database. Back up, then apply migrations:
cd /var/www/snipe-it
sudo -u www-data php artisan snipeit:backup
sudo -u www-data php artisan migrate --force
Next time, upgrade with php upgrade.php, which runs Composer and migrations for you.
Fix 7: Missing vendor folder or Composer packages
Log or browser shows: require(/var/www/snipe-it/vendor/autoload.php): Failed to open stream: No such file or directory, or Class "..." not found right after a git pull.
cd /var/www/snipe-it
sudo COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev --prefer-source
sudo chown -R www-data:www-data .
sudo -u www-data php artisan optimize:clear
Fix 8: Passport (API) keys missing
Log shows: Key path "file:///var/www/snipe-it/storage/oauth-private.key" does not exist or is not readable.
The API and some pages need OAuth keys. Create them and make them readable by the web server:
cd /var/www/snipe-it
sudo -u www-data php artisan passport:install
sudo chmod 600 storage/oauth-private.key storage/oauth-public.key
sudo chown www-data:www-data storage/oauth-*.key
Fix 9: Stale cached config or OPcache
If you changed .env or upgraded and the error message does not match your current settings, Laravel is using a cached config. The Snipe-IT docs recommend clearing everything and restarting the web server (which also clears OPcache):
cd /var/www/snipe-it
sudo -u www-data php artisan optimize:clear
sudo rm -f bootstrap/cache/config.php bootstrap/cache/services.php bootstrap/cache/compiled.php
sudo systemctl restart apache2
Not a 500, but often confused with one
- Pages load without CSS, or redirect to the wrong address:
APP_URLdoes not match the browser address. It must includehttp://orhttps://, with no trailing slash and no/public. - 404 on everything except the home page:
mod_rewriteis off (sudo a2enmod rewrite) or the virtual host lacksAllowOverride All. - Cannot log in, no error:
SECURE_COOKIES=truewhile you are on plain HTTP. Set it tofalseor finish HTTPS. - Blank tables or "400 Header too large": clear browser cookies; the docs suggest
BS_TABLE_STORAGE="localStorage"in.env.
Related guides
- Snipe-IT installation on Ubuntu 24.04
- Install LAMP on Ubuntu Server
- Ubuntu disk contains a file system with errors, if the server itself is failing
Frequently asked questions
What causes a 500 server error in Snipe-IT?+
The most common causes are folder permissions (Apache or Nginx cannot write to storage, bootstrap/cache or public/uploads), a missing or invalid APP_KEY, a PHP version or extension that does not match the Snipe-IT version, wrong database settings in .env, database migrations not run after an upgrade, and stale cached configuration. The exact cause is written to storage/logs/laravel.log.
Where is the Snipe-IT error log?+
Snipe-IT logs application errors to storage/logs/laravel.log inside the install folder, for example /var/www/snipe-it/storage/logs/laravel.log. If that file has nothing new, the error happened before Laravel started, so check the web server log instead: /var/log/apache2/error.log on Apache or /var/log/nginx/error.log plus the PHP-FPM log on Nginx.
How do I fix Snipe-IT permissions?+
Make the web server user own the install and give it write access to the three folders Snipe-IT writes to. On Ubuntu with Apache: sudo chown -R www-data:www-data /var/www/snipe-it, then sudo chmod -R 775 on storage, public/uploads and bootstrap/cache. Then clear caches with sudo -u www-data php artisan optimize:clear.
Why did Snipe-IT break after an upgrade?+
Usually because the new version needs a newer PHP, new Composer packages were not installed, or migrations were not run. Snipe-IT 8 needs PHP 8.2 to 8.5. Run php upgrade.php from the install folder, which checks requirements, runs Composer and applies migrations, or run composer install --no-dev and php artisan migrate --force by hand.
Is it safe to set APP_DEBUG=true?+
Only briefly while you troubleshoot. With APP_DEBUG=true Snipe-IT shows the full error and stack trace in the browser, which can include paths and configuration values. Set it back to false and run php artisan config:clear as soon as you have the message.
Sources
- Common issues, Snipe-IT documentation
- Snipe-IT requirements, Snipe-IT documentation
- Snipe-IT configuration (.env), Snipe-IT documentation
- grokability/snipe-it releases, GitHub (Grokability)
Related videos
Video libraryKeep reading
Cloud and Self-HostingHow to Deploy a Flexible VPS for Apps: Kamatera ReviewNeed to deploy a flexible VPS for apps without committing to a fixed server shape? This Kamatera review examines its configurable cloud servers, scaling options, trial… · 8 min read
Cloud and Self-HostingExchange Server to Microsoft 365 Migration: A Pre-Migration Readiness ChecklistWhat to check before moving Exchange Server mailboxes to Microsoft 365: environment, migration method, identity, mail flow, permissions, security, pilot and cutover. · 7 min read
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