Guide: Free Lifetime Home Hosting on Windows with VirtualBox & aaPanel
Requirements
- RAM: Minimum 512MB (1GB recommended for better performance).
- CPU: At least 1 core.
- Disk Space: 100MB+ available.
- OS: Ubuntu Server 24.04 LTS (recommended).
- Networking: Static IPv4 (recommended).
- Higher specs improve performance.
Why aaPanel?
Step 1: Install VirtualBox & Ubuntu Server
- Download VirtualBox from virtualbox.org
- Download Ubuntu Server 24.04 LTS from ubuntu.com/download/server.
- Install VirtualBox and create a new VM for Ubuntu Server.
- Start the VM and complete the Ubuntu Server installation.
Step 2: Install aaPanel on Ubuntu
- Open the terminal and run:
sudo apt update && sudo apt install openssh-server -y - Execute the script:
sudo systemctl enable --now ssh sudo systemctl status ssh - Type
Y
to confirm installation. Wait for the process to complete.
Step 3: Enable SSH for Remote Access
- Install OpenSSH:
sudo apt update && sudo apt install openssh-server -y - Start and enable SSH:
sudo systemctl enable --now ssh sudo systemctl status ssh
Connect via SSH (Windows)
- Install PuTTY from putty.org.
- Enter your Ubuntu VM’s local IP as the host.
- Port: 22, Connection Type: SSH.
- Log in with your Ubuntu credentials.
1. Install git
- Step 1: Update Your Package List
sudo apt update - Step 2: Install Git
sudo apt install git -y
- Step 3: Verify Git Installation
git --version
2. Installing Composer
- Step 1: Update and Install Required Packages
sudo apt update sudo apt install php-cli unzip curl -y - Step 2: Download Composer Installer
curl -sS https://getcomposer.org/installer -o composer-setup.php - Step 3: Install Composer Globally
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer - Step 4: Verify the Installation
composer --version
Step 4: Add a Website in aaPanel
- Open aaPanel in a browser (http://[your-ip]:7800).
- Go to Website > Add Site.
- Enter a domain (e.g., site1.local:1000 for local testing).
- Configure settings as needed and confirm.
Step 5: Configure PHP for Web Development
PHP Extensions (Required for Laravel, WordPress, etc.)
- In aaPanel, go to App Store > PHP Settings.
- Install these extensions:
- fileinfo
- exif
- mbstring
- pdo_sqlsrv (for SQL Server)
- sqlsrv
- calendar (optional)
Step 6: Laravel-Specific Setup
- Go to the Website tab in the panel → select the website you've created → click Conf.
For Laravel, aaPanel reads the index file from a project. Laravel has specific rules, especially because it uses a public directory to access your website. Also, to run Laravel, you typically use the terminal with the php artisan serve command—this is important for those who are unsure how the project becomes accessible by the server.
Method 1: Manual Public Folder Setup
- Wrap all your Laravel folders and files into one directory. You can name the folder anything you like—for example, I usually name it
resources
. Place your entire Laravel project into that newly created folder - Copy your public folder contents and place them outside, for example: resources/public → public (outside).
- The resulting folder structure will look like this:.
-> resources > Laravel application files (inside this folder) -> index.php -> folders a, b, c (contents from your original public folder)
Here's a visual folder structure diagram to help you better understand the setup:
And make sure your index.php at the root is adjusted to point to the Laravel project inside resources. For example:
Method 2: aaPanel Directory Settings

- Go to Website > Site Directiory Tab .
- Set Site Directory to /public.
- Adjust permissions (right-click folder in files website directory > set owner to www).In Laravel, you may often encounter permission errors. The solution is simple: go to your project directory, right-click on the folder, select "Permission", and choose "www". This will automatically grant the necessary access to your application.
URL Rewrite (Laravel)
- In Site Configuration, go to URL Rewrite.
- Add:
location / { try_files $uri $uri/ /index.php?$query_string; }
Step 7: WordPress Configuration
- Install WordPress normally.
- Edit wp-config.php and add before WP_DEBUG:
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') { $_SERVER['HTTPS'] = 'on'; }
(Prevents HTTP → HTTPS redirect issues.) - you can create instant wordpress in tab WP Toolkit -> make account aaPanel -> login.
and setting name, password or database in section - Create wordpress and done.
Step 8: Make Local Site Globally Accessible
Requirements: A registered domain (cheap options available for ~$1/year)
- Sign up at Cloudflare.
- Add your domain and select the Free plan.
- Configure DNS to point to your home IP (use Dynamic DNS if IP changes).
- Enable Cloudflare proxy (optional for SSL).
Read : How to make Site Globally Accessible ( Cloudflared )
Final Notes
- Always-on hosting requires your PC to stay running.
- Use No-IP or DuckDNS if you lack a static IP.
- Optimize security (firewall, fail2ban) for public-facing servers.
References : https://www.aapanel.com
Comments