Install on cPanel
Inventoros runs on cPanel shared hosting using a release package built specifically for the split directory layout cPanel expects.
What the cPanel release includes
The cPanel release packages are specially built and include:
- Pre-compiled frontend assets (no npm required on the server)
- Production-optimized dependencies
- A cPanel-compatible directory structure
- A modified
index.phpfor the split directory setup
Prerequisites
- Access to your cPanel control panel
- PHP 8.2 or higher enabled for your domain
- A MySQL database available
- SSH access (recommended) or the cPanel Terminal
- At least 512MB of disk space
Step 1: Download the cPanel release
Download the latest cPanel-specific release package from GitHub. Look for the file named inventoros-cpanel-X.X.X.zip.
Latest release: https://github.com/Inventoros/Inventoros/releases/latest
The package contains:
inventoros-cpanel-X.X.X/
inventoros/ # Laravel application files
public_html/ # Web-accessible files
INSTALL.md # Quick reference
Step 2: Create the database
In cPanel, open MySQL Databases:
- Create a new database (for example
username_inventoros). - Create a database user with a strong password.
- Add the user to the database with ALL PRIVILEGES.
- Note down the database name, username, and password.
Example credentials to save:
Database: cpaneluser_inventoros
Username: cpaneluser_invuser
Host: localhost
Password: [your secure password]
Step 3: Upload the files
Extract the ZIP and upload using cPanel File Manager or FTP:
- Upload the
inventorosfolder to your home directory. Result:/home/username/inventoros/ - Upload the contents of
public_htmlto your web root. Result:/home/username/public_html/
Final directory structure:
/home/username/
inventoros/
app/
bootstrap/
config/
vendor/
...
public_html/
index.php
build/
.htaccess
Step 4: Set permissions
Using SSH or the cPanel Terminal, run:
# Make Laravel files readable
chmod -R 755 ~/inventoros
# Make storage and cache writable
chmod -R 775 ~/inventoros/storage
chmod -R 775 ~/inventoros/bootstrap/cache
You can also use cPanel File Manager to set permissions on these folders.
Step 5: Configure the environment
Set up your environment file:
cd ~/inventoros
cp .env.example .env
Edit .env with your settings:
APP_NAME=Inventoros
APP_ENV=production
APP_DEBUG=false
APP_URL=https://yourdomain.com
DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=cpaneluser_inventoros
DB_USERNAME=cpaneluser_invuser
DB_PASSWORD=your_password
Step 6: Generate the key, migrate, and cache
Using SSH or the cPanel Terminal, run:
cd ~/inventoros
# Generate the application key
php artisan key:generate
# Run database migrations
php artisan migrate
# Create the storage symlink (the standard storage:link does not work with
# the split directory layout, so link manually)
ln -s ~/inventoros/storage/app/public ~/public_html/storage
# Optimize for production
php artisan config:cache
php artisan route:cache
php artisan view:cache
Step 7: Enable HTTPS
Secure your installation:
- In cPanel, go to SSL/TLS Status or Let's Encrypt.
- Install a free SSL certificate for your domain.
- Ensure
APP_URLin.envuseshttps://.
Installing on a subdomain or addon domain
Installing on a subdomain or addon domain requires adjusting the paths.
For subdomains, if your subdomain points to ~/inventory_public:
- Upload the
inventorosfolder to~/inventoros/. - Upload the
public_htmlcontents to~/inventory_public/. - Update the
index.phppath if needed:$laravelPath = __DIR__ . '/../inventoros';
For addon domains, if your addon domain points to ~/yourdomain.com:
- Upload the
inventorosfolder to~/inventoros_yourdomain/. - Upload the
public_htmlcontents to~/yourdomain.com/. - Update
index.php:$laravelPath = __DIR__ . '/../inventoros_yourdomain';
Troubleshooting
- 500 Internal Server Error. Check storage and bootstrap/cache permissions, verify
.envexists, and check~/inventoros/storage/logs/laravel.logfor errors. - Assets not loading (CSS / JS broken). Ensure the
build/folder was uploaded topublic_htmland.htaccessis present. Check thatAPP_URLmatches your domain. - Database connection failed. Verify the credentials in
.env. Test the same credentials in phpMyAdmin. Ensure the database user has privileges. - PHP version issues. In cPanel, open MultiPHP Manager or Select PHP Version and ensure PHP 8.2+ is selected for your domain.
- Storage link issues. If uploaded files are not accessible, verify the symlink with
ls -la ~/public_html/storageand recreate it if needed.
Report an issue: https://github.com/Inventoros/Inventoros/issues
Need a hand?
Open an issue or start a discussion on GitHub and the community will help you out.