cPanel / Shared Hosting
Deploy Lacelium onto standard cPanel or shared Apache/LiteSpeed hosting accounts securely without exposing private application code or environment variables to the web.
Step-by-Step Deployment
Follow these best practices to ensure security on multi-tenant shared servers:
Upload application files to your user home directory (e.g. /home/username/lacelium), not directly inside public_html. This protects your .env file, SQLite databases, and controller code from direct browser downloads.
In cPanel > Domains, set the Document Root for your primary or addon domain to lacelium/public.
If your host does not allow modifying the DocumentRoot away from public_html, create a symlink via cPanel Terminal or PHP script:
# Remove default public_html and link to lacelium/public
rm -rf ~/public_html
ln -s /home/username/lacelium/public /home/username/public_html
Create your database via the cPanel MySQL Database Wizard, assign your user with full privileges, and populate .env:
APP_ENV=production
APP_DEBUG=false
DB_CONNECTION=mysql
DB_HOST=localhost
DB_DATABASE=username_lacelium
DB_USERNAME=username_dbuser
DB_PASSWORD=SecurePasswordGenerated
Apache .htaccess Configuration
Verify that your public/.htaccess file is active and handling clean URL rewrites:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
Nexify Real-Time Limitations on Shared Hosting
Standard cPanel shared hosting accounts frequently throttle persistent background daemons. For applications requiring full real-time Nexify streaming, a Linux VPS is strongly recommended.
Next Steps
- Compare deployment options and production strategies in Deployment Hub.
- Set up complete daemon supervision on a dedicated Linux VPS Guide.
- Review application environment flags in Configuration.