Ubuntu
This guide will walk you through the process of setting up the SilkPanel SaaS application on Ubuntu Server.
Prerequisites
Before you begin, make sure you have:
- Ubuntu 24.04 LTS or higher
- Root or sudo access
- A domain name pointed to your server (optional for local development)
Step 1: Update System
First, update your system packages:
sudo apt update
sudo apt upgrade -yStep 2: Install PHP 8.4
Add the PHP repository and install PHP with required extensions:
sudo apt install software-properties-common -y
sudo add-apt-repository ppa:ondrej/php -y
sudo apt updateInstall PHP 8.4 and necessary extensions:
sudo apt install php8.4 php8.4-fpm php8.4-cli php8.4-common php8.4-mysql \
php8.4-zip php8.4-gd php8.4-mbstring php8.4-curl php8.4-xml \
php8.4-bcmath php8.4-intl php8.4-readline -yVerify PHP installation:
php -vStep 3: Install Microsoft ODBC Driver 18 and PHP SQL Server Extensions
SilkPanel requires SQL Server connectivity for the Silkroad MSSQL databases. On Ubuntu 24.04 with PHP 8.4, install the Microsoft ODBC Driver 18 together with the sqlsrv and pdo_sqlsrv PHP extensions.
3.1 Check for conflicting Microsoft APT repository entries
If the Microsoft repository was added before, make sure there is no duplicate entry using a different keyring:
sudo -i
grep -R -n "packages.microsoft.com\|microsoft.gpg\|microsoft-prod.gpg" /etc/apt/sources.list /etc/apt/sources.list.d /etc/apt/keyrings 2>/dev/nullA common conflict looks like this:
/etc/apt/sources.list.d/microsoft-prod.list/etc/apt/sources.list.d/mssql-release.list
If both files exist and point to the same Ubuntu 24.04 repository, remove the duplicate file:
rm -f /etc/apt/sources.list.d/mssql-release.listVerify that only the correct Microsoft repository entry remains:
grep -R -n "packages.microsoft.com\|microsoft.gpg\|microsoft-prod.gpg" /etc/apt/sources.list /etc/apt/sources.list.d /etc/apt/keyrings 2>/dev/nullThe valid remaining entry should look like this:
/etc/apt/sources.list.d/microsoft-prod.list:1:deb [arch=amd64,arm64,armhf signed-by=/usr/share/keyrings/microsoft-prod.gpg] https://packages.microsoft.com/ubuntu/24.04/prod noble main3.2 Install or reinstall the official Microsoft repository package
curl -sSL -O https://packages.microsoft.com/config/ubuntu/24.04/packages-microsoft-prod.deb
dpkg -i packages-microsoft-prod.deb
rm -f packages-microsoft-prod.deb
apt-get update3.3 Install ODBC Driver 18 and PHP 8.4 build dependencies
ACCEPT_EULA=Y apt-get install -y msodbcsql18 unixodbc-dev php-pear php8.4-devVerify that the ODBC driver is installed:
odbcinst -q -dExpected relevant output:
ODBC Driver 18 for SQL Server3.4 Install sqlsrv and pdo_sqlsrv via PECL
Configure PECL to use the PHP 8.4 FPM configuration:
pecl config-set php_ini /etc/php/8.4/fpm/php.iniInstall the PHP SQL Server extensions:
pecl install sqlsrv
pecl install pdo_sqlsrv3.5 Enable the extensions for PHP 8.4 FPM
Create the module ini files:
printf "; priority=20\nextension=sqlsrv.so\n" > /etc/php/8.4/mods-available/sqlsrv.ini
printf "; priority=30\nextension=pdo_sqlsrv.so\n" > /etc/php/8.4/mods-available/pdo_sqlsrv.iniEnable the modules:
phpenmod -v 8.4 sqlsrv pdo_sqlsrv3.6 Restart PHP-FPM
systemctl restart php8.4-fpm3.7 Verify the PHP SQL Server extensions
php -m | grep -E 'sqlsrv|pdo_sqlsrv'Also verify the FPM module links:
ls /etc/php/8.4/fpm/conf.d/*sqlsrv.iniINFO
SilkPanel uses Microsoft SQL Server connectivity for the Silkroad databases. On Ubuntu 24.04 with PHP 8.4, the recommended setup is msodbcsql18 together with the PHP extensions sqlsrv and pdo_sqlsrv.
WARNING
If apt-get update fails with a Signed-By conflict, you most likely have duplicate Microsoft repository definitions pointing to the same URL with different keyrings. Remove the duplicate entry before continuing.
Step 4: Install Composer
Download and install Composer globally:
cd ~
curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php
sudo php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composerVerify Composer installation:
composer --versionStep 5: Install Node.js
Install Node.js (v18 or higher) using NodeSource repository:
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt install nodejs -yVerify Node.js and npm installation:
node -v
npm -vStep 6: Install and Configure Nginx
Install Nginx web server:
sudo apt install nginx -yStart and enable Nginx:
sudo systemctl start nginx
sudo systemctl enable nginxStep 7: Install MySQL
Install MySQL server:
sudo apt install mysql-server -ySecure MySQL installation:
sudo mysql_secure_installationCreate a database and user for SilkPanel:
sudo mysql -u root -pThen run the following SQL commands:
CREATE DATABASE silkpanel;
CREATE USER 'silkpanel'@'localhost' IDENTIFIED BY 'your_secure_password';
GRANT ALL PRIVILEGES ON silkpanel.* TO 'silkpanel'@'localhost';
FLUSH PRIVILEGES;
EXIT;Step 8: Install Git
Install Git if not already installed:
sudo apt install git -yStep 9: Download the Project
Navigate to the web root directory and clone the repository:
cd /var/www
sudo git clone https://github.com/Devsome/silkpanel-cms silkpanel-saas
cd silkpanel-saasSet proper ownership:
sudo chown -R www-data:www-data /var/www/silkpanel-saas
sudo chmod -R 755 /var/www/silkpanel-saasStep 10: Install Dependencies
Install PHP Dependencies
sudo -u www-data composer install --no-dev --optimize-autoloaderInstall Node.js Dependencies
npm installBuild Frontend Assets
npm run buildStep 11: Configure Environment
Copy the example environment file:
sudo cp .env.example .envSet proper permissions:
sudo chown www-data:www-data /var/www/silkpanel-saas/.env
sudo chmod 600 /var/www/silkpanel-saas/.envTIP
You do not need to manually edit the .env file. The Installation Wizard in Step 15 will guide you through all configuration settings including database credentials, application URL, and mail settings.
Step 12: Configure Nginx
Create an Nginx configuration file for SilkPanel:
sudo nano /etc/nginx/sites-available/silkpanelAdd the following configuration:
server {
listen 80;
listen [::]:80;
server_name yourdomain.com www.yourdomain.com;
root /var/www/silkpanel-saas/public;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options "nosniff";
index index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
error_page 404 /index.php;
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php8.4-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.(?!well-known).* {
deny all;
}
}Enable the site and remove the default configuration:
sudo ln -s /etc/nginx/sites-available/silkpanel /etc/nginx/sites-enabled/
sudo rm /etc/nginx/sites-enabled/defaultTest Nginx configuration:
sudo nginx -tReload Nginx:
sudo systemctl reload nginxStep 13: Set Proper Permissions
Set the correct permissions for Laravel:
sudo chown -R www-data:www-data /var/www/silkpanel-saas
sudo chmod -R 755 /var/www/silkpanel-saas
sudo chmod -R 775 /var/www/silkpanel-saas/storage
sudo chmod -R 775 /var/www/silkpanel-saas/bootstrap/cacheStep 14: Configure SSL with Let's Encrypt (Recommended)
Install Certbot:
sudo apt install certbot python3-certbot-nginx -yObtain and install SSL certificate:
sudo certbot --nginx -d yourdomain.com -d www.yourdomain.comFollow the prompts. Certbot will automatically configure Nginx for HTTPS.
Test automatic renewal:
sudo certbot renew --dry-runStep 15: Run the Installation Wizard
Open your browser and navigate to:
https://yourdomain.com/installThe installation wizard will:
- Check system requirements — verifies PHP version, required extensions (including the SQL Server driver), and directory permissions
- Validate your SilkPanel API license key
- Configure the MySQL database — tests the connection and runs migrations automatically
- Configure the MSSQL database — tests the connection to your Silkroad Online databases (Account, Shard, Log, Custom, and optionally Portal)
- Set up application settings — app name, URL, environment, and optional mail configuration
- Generate the application key and seed initial data
WARNING
Make sure all PHP extensions from Step 2 and Step 3 are installed before starting the wizard. The wizard will block you if required SQL Server extensions are missing.
Step 16: Configure Queue Worker (Optional)
If your application uses queues, set up a queue worker with Supervisor:
Install Supervisor:
sudo apt install supervisor -yCreate a Supervisor configuration:
sudo nano /etc/supervisor/conf.d/silkpanel-worker.confAdd the following configuration:
[program:silkpanel-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/silkpanel-saas/artisan queue:work --sleep=3 --tries=3 --max-time=3600
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
user=www-data
numprocs=1
redirect_stderr=true
stdout_logfile=/var/www/silkpanel-saas/storage/logs/worker.log
stopwaitsecs=3600Update Supervisor:
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl start silkpanel-worker:*Step 17: Configure Cron for Scheduled Tasks
Laravel requires a cron entry for scheduled tasks:
sudo crontab -e -u www-dataAdd the following line:
* * * * * cd /var/www/silkpanel-saas && php artisan schedule:run >> /dev/null 2>&1Optimization for Production
Run these commands to optimize your application:
cd /var/www/silkpanel-saas
sudo php artisan optimizeSecurity Hardening
Configure Firewall
sudo ufw allow OpenSSH
sudo ufw allow 'Nginx Full'
sudo ufw enableDisable Directory Listing
This is already handled by the Nginx configuration above.
Keep System Updated
Regularly update your system:
sudo apt update && sudo apt upgrade -yTroubleshooting
Microsoft APT repository Signed-By conflict
If apt-get update fails with a message similar to this:
E: Conflicting values set for option Signed-By regarding source https://packages.microsoft.com/ubuntu/24.04/prod/ noble: /usr/share/keyrings/microsoft-prod.gpg != /usr/share/keyrings/microsoft.gpgcheck for duplicate Microsoft repository definitions:
sudo -i
grep -R -n "packages.microsoft.com\|microsoft.gpg\|microsoft-prod.gpg" /etc/apt/sources.list /etc/apt/sources.list.d /etc/apt/keyrings 2>/dev/nullIf both of these files are present and point to the same repository, remove the duplicate file:
/etc/apt/sources.list.d/microsoft-prod.list/etc/apt/sources.list.d/mssql-release.list
rm -f /etc/apt/sources.list.d/mssql-release.list
apt-get updatePermission Issues
If you encounter permission issues:
sudo chown -R www-data:www-data /var/www/silkpanel-saas
sudo chmod -R 755 /var/www/silkpanel-saas
sudo chmod -R 775 /var/www/silkpanel-saas/storage
sudo chmod -R 775 /var/www/silkpanel-saas/bootstrap/cacheClear Application Cache
cd /var/www/silkpanel-saas
sudo php artisan optimize:clear
php artisan config:clear
php artisan cache:clearCheck Logs
Application logs:
sudo tail -f /var/www/silkpanel-saas/storage/logs/laravel.logNginx error logs:
sudo tail -f /var/nginx/error.logPHP-FPM logs:
sudo tail -f /var/log/php8.4-fpm.logVerify SQL Server connectivity in Laravel
If the SQL Server connection does not work, verify that the driver is loaded:
php -m | grep -E 'sqlsrv|pdo_sqlsrv'
php --ri sqlsrv
php --ri pdo_sqlsrvYou can also test the Laravel connection:
php artisan tinkerThen run:
DB::connection()->getPdo();
DB::select('SELECT 1 as test');Next Steps
Once installation is complete, you can:
- Access the admin panel at
https://yourdomain.com/admin - Configure your application settings
- Set up your first server
- Explore the configuration guide
TIP
For production environments, always use HTTPS and keep your system and dependencies up to date.
WARNING
Never expose your .env file publicly. It contains sensitive credentials and configuration.