How to Host a Website for FREE at Home (Windows + VirtualBox + aaPanel)


Ever considered running your own server? Perhaps you also have a website, but the hosting is too costly? Free hosting exists, true but as the saying goes some things are free and “some vendors” not that friendly with it :=) No worries!!! This time we will show you to setup your own server at Home with your cPanel and then create website automatically, hit GO! Come on, read the tutorial below!

Guide: Free Lifetime Home Hosting on Windows with VirtualBox & aaPanel

Requirements

  1. RAM: Minimum 512MB (1GB recommended for better performance).
  2. CPU: At least 1 core.
  3. Disk Space: 100MB+ available.
  4. OS: Ubuntu Server 24.04 LTS (recommended).
  5. Networking: Static IPv4 (recommended).
  6. Higher specs improve performance.
Note: Your computer must stay on for the server to remain active (or schedule uptime).

Why aaPanel?

aaPanel is a free control panel that you can use to manage your VPS server. It features a simple GUI (Graphical User Interface), allowing you to install a web server with just one click.
aaPanel supports both LNMP (Linux, Nginx, MariaDB, PHP) — its recommended stack — and LAMP (Linux, Apache, MariaDB, PHP) as an alternative. This free control panel can be installed on CentOS, Ubuntu, or Debian. Interested in installing aaPanel on your VPS server?

Step 1: Install VirtualBox & Ubuntu Server

  1. Download VirtualBox from virtualbox.org
  2. Download Ubuntu Server 24.04 LTS from ubuntu.com/download/server.
  3. Install VirtualBox and create a new VM for Ubuntu Server.
  4. Start the VM and complete the Ubuntu Server installation.

Step 2: Install aaPanel on Ubuntu

  1. Open the terminal and run:
    sudo apt update && sudo apt install openssh-server -y
  2. Execute the script:
    sudo systemctl enable --now ssh sudo systemctl status ssh
  3. Type Y to confirm installation.
  4. Wait for the process to complete.

Step 3: Enable SSH for Remote Access

  1. Install OpenSSH:
    sudo apt update && sudo apt install openssh-server -y
  2. Start and enable SSH:
    sudo systemctl enable --now ssh sudo systemctl status ssh

Connect via SSH (Windows)

Putty dasboard

PuTTY is an application used for remote access, such as SSH or Telnet. With this application, you can access a server computer remotely without needing to physically go to the data center. Additionally, PuTTY is also an Open Source application, so it can be used for free.
  1. Install PuTTY from putty.org.
  2. Enter your Ubuntu VM’s local IP as the host.
  3. Port: 22, Connection Type: SSH.
  4. 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
You should see something like:
git version 2.x.x

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

add website in aaPanel
  1. Open aaPanel in a browser (http://[your-ip]:7800).
  2. Go to Website > Add Site.
  3. Enter a domain (e.g., site1.local:1000 for local testing).
  4. Configure settings as needed and confirm.

Step 5: Configure PHP for Web Development

PHP Extensions (Required for Laravel, WordPress, etc.)

Step install Plugin
  1. In aaPanel, go to App Store > PHP Settings.
  2. Install these extensions:
    1. fileinfo
    2. exif
    3. mbstring
    4. pdo_sqlsrv (for SQL Server)
    5. sqlsrv
    6. calendar (optional)

Step 6: Laravel-Specific Setup

If you want to configure your project or website globally (except for regular HTML), you can apply the following settings to your site:
  1. 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

  1. 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
  2. Copy your public folder contents and place them outside, for example: resources/public → public (outside).
  3. 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)

  4. Here's a visual folder structure diagram to help you better understand the setup:

    your-website-root/ ├── index.php ← From the original /public folder ├── css/ ← From public/ (e.g., public/css) ├── js/ ← From public/ (e.g., public/js) ├── images/ ← Optional, if used in public/ ├── resources/ ← Your actual Laravel project folder │ ├── app/ │ ├── bootstrap/ │ ├── config/ │ ├── database/ │ ├── public/ ← Original Laravel public folder (now inside resources) │ ├── routes/ │ ├── storage/ │ ├── artisan │ ├── composer.json │ └── ...


And make sure your index.php at the root is adjusted to point to the Laravel project inside resources. For example:

require __DIR__.'/resources/vendor/autoload.php'; $app = require_once __DIR__.'/resources/bootstrap/app.php';

Here is a complete example of the index.php file adjusted to work with your Laravel project inside the /resources folder:

index.php in laravel


Method 2: aaPanel Directory Settings

site directory
  1. Go to Website > Site Directiory Tab .
  2. Set Site Directory to /public.
  3. 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)

  1. In Site Configuration, go to URL Rewrite.
  2. Add:
    location / { try_files $uri $uri/ /index.php?$query_string; }

Step 7: WordPress Configuration

  1. Install WordPress normally.
  2. 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.)
  3. you can create instant wordpress in tab WP Toolkit -> make account aaPanel -> login.
    and setting name, password or database in section


  4. Create wordpress and done.

Step 8: Make Local Site Globally Accessible

Requirements: A registered domain (cheap options available for ~$1/year)

  1. Sign up at Cloudflare.
  2. Add your domain and select the Free plan.
  3. Configure DNS to point to your home IP (use Dynamic DNS if IP changes).
  4. Enable Cloudflare proxy (optional for SSL).

Read : How to make Site Globally Accessible ( Cloudflared )

Final Notes

  1. Always-on hosting requires your PC to stay running.
  2. Use No-IP or DuckDNS if you lack a static IP.
  3. Optimize security (firewall, fail2ban) for public-facing servers.

This setup provides a free, self-managed hosting solution with full control over your server environment.

References : https://www.aapanel.com

Subscribe My Blog

Comments