Deploy MedCore HMS on your local server. Runs completely offline - no internet required for daily hospital operations.
OS
Ubuntu 22.04+
PHP
8.2 or higher
Database
MySQL 8 / SQLite
Web Server
Nginx
Node.js
18+ (build only)
Composer
2.x
RAM
2GB minimum
Storage
10GB+ free
# Update system sudo apt update && sudo apt upgrade -y # PHP 8.2 + extensions sudo apt install -y php8.2 php8.2-fpm php8.2-cli php8.2-sqlite3 \ php8.2-mysql php8.2-mbstring php8.2-xml php8.2-curl php8.2-zip \ php8.2-gd php8.2-bcmath php8.2-intl # Nginx + Supervisor sudo apt install -y nginx supervisor # Composer curl -sS https://getcomposer.org/installer | php sudo mv composer.phar /usr/local/bin/composer # Node.js 18 curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - sudo apt install -y nodejs
Copy the MedCore folder to the server via USB, network share, or SCP.
sudo mkdir -p /var/www/medcore sudo chown $USER:$USER /var/www/medcore # Copy from USB/network cp -r /media/usb/MedCore/* /var/www/medcore/
cd /var/www/medcore # Install PHP packages (production) composer install --no-dev --optimize-autoloader # Install Node & build CSS/JS npm install && npm run build
cp .env.example .env
nano .env
Update these values:
APP_ENV=production APP_DEBUG=false APP_URL=http://192.168.x.x # Your server LAN IP # MySQL (recommended) DB_CONNECTION=mysql DB_DATABASE=medcore_hms DB_USERNAME=medcore DB_PASSWORD=strong_password_here # Or SQLite (simpler, no MySQL needed) DB_CONNECTION=sqlite
# If using MySQL: sudo mysql -u root -e "CREATE DATABASE medcore_hms;" sudo mysql -u root -e "CREATE USER 'medcore'@'localhost' IDENTIFIED BY 'your_password';" sudo mysql -u root -e "GRANT ALL ON medcore_hms.* TO 'medcore'@'localhost'; FLUSH PRIVILEGES;" # If using SQLite: touch database/database.sqlite # Generate key, run migrations, seed default data php artisan key:generate php artisan migrate --force php artisan db:seed --force php artisan storage:link
sudo chown -R www-data:www-data /var/www/medcore
sudo chmod -R 755 /var/www/medcore
sudo chmod -R 775 /var/www/medcore/storage
sudo chmod -R 775 /var/www/medcore/bootstrap/cache
sudo nano /etc/nginx/sites-available/medcore
Paste this:
server {
listen 80;
server_name 192.168.x.x;
root /var/www/medcore/public;
index index.php;
client_max_body_size 10M;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.(?!well-known).* { deny all; }
}
sudo ln -s /etc/nginx/sites-available/medcore /etc/nginx/sites-enabled/
sudo rm -f /etc/nginx/sites-enabled/default
sudo nginx -t && sudo systemctl restart nginx
sudo nano /etc/supervisor/conf.d/medcore-worker.conf
[program:medcore-worker] command=php /var/www/medcore/artisan queue:work --sleep=3 --tries=3 autostart=true autorestart=true user=www-data redirect_stderr=true stdout_logfile=/var/www/medcore/storage/logs/worker.log
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl start medcore-worker:*
php artisan config:cache
php artisan route:cache
php artisan view:cache
Open a browser on any device connected to the same network:
http://192.168.x.x # Replace with your server IP
Default Login Credentials
Super Admin: superadmin@medcore.com / password
Admin: admin@medcore.com / password
Change these passwords immediately after first login!
Any computer, phone or tablet on the same WiFi/LAN can access MedCore.
# Find your server IP: ip addr show | grep "inet " # On other devices, open browser: http://192.168.x.x
Always back up your data. Copy to USB drive regularly.
# MySQL backup mysqldump -u medcore -p medcore_hms > backup.sql # SQLite (just copy the file) cp database/database.sqlite /backup/
Works without internet:
Needs internet (occasional):
Just connect briefly when needed, then disconnect.
© 2026 MedCore HMS · Powered by Hakateq Solutions Limited · Lira, Uganda