How to Turn Your Windows 11 PC into a Homelab Server for Hosting Websites and Data
Want to turn your old or existing Windows 11 PC into your own personal server? You can create a powerful homelab server capable of hosting websites, databases, applications and other services directly from your computer.
In this detailed guide, we will set up a Windows 11 PC with 8 GB RAM as a beginner-friendly homelab server using WSL2, Ubuntu, Docker and Nginx. You will gradually build a server environment capable of hosting websites and storing web data.
- What Is a Homelab Server?
- What We Are Going to Build
- How the Homelab System Works
- Requirements
- Step 1 — Prepare Your Windows PC
- Step 2 — Install WSL2 and Ubuntu
- Step 3 — Install Docker Desktop
- Step 4 — Prepare Your Website for Local Hosting
- Step 5 — Host and Manage Your Website With Nginx
- Step 6 — Access the Server From Your Network
- Step 7 — Add a Database Server
- The Complete Homelab Architecture
- Why Build a Homelab?
- Making Your Server Available on the Internet
- What You Can Add Next
- Useful Homelab Services
- Important Security Considerations
- Video Tuitorial
- Frequently Asked Questions
- Conclusion
What Is a Homelab Server?
A homelab is a personal server environment created using your own computer and network. Instead of paying for a cloud server, you can use your existing PC to run websites, databases, applications and other services.
Your Computer
↓
Install Server Software
↓
Run Applications
↓
Access Your Services
A homelab server can run continuously and provide services to devices connected to your local network. With the correct network configuration, some services can also be accessed from the Internet.
INTERNET
│
▼
ROUTER
│
▼
YOUR HOME NETWORK
│
▼
WINDOWS 11 PC
│
┌───────────┼───────────┐
│ │ │
▼ ▼ ▼
WEBSITES DATABASES FILES
What We Are Going to Build
Our Windows 11 PC will gradually become a personal server environment capable of running multiple services.
✓ Windows 11 server computer
✓ WSL2 Linux environment
✓ Ubuntu Server environment
✓ Docker containers
✓ Nginx web server
✓ Website hosting
✓ MariaDB/MySQL database
✓ Local network access
✓ Multiple applications
✓ Future remote Internet access
How the Homelab System Works
INTERNET
│
▼
ROUTER
│
▼
WINDOWS 11 PC
│
▼
WSL2
│
▼
UBUNTU
│
▼
DOCKER
│
┌─────────────┼─────────────┐
│ │ │
▼ ▼ ▼
NGINX DATABASE APPS
WEBSITE MariaDB SERVICES
│ │ │
└─────────────┼─────────────┘
│
▼
USERS
Docker allows you to run different server applications inside isolated containers. This makes it easier to install, manage and update services without manually configuring everything directly on Windows.
Requirements
Before starting, make sure your Windows computer has enough resources to run the homelab services you plan to install.
| Requirement | Recommendation |
|---|---|
| Operating System | Windows 11 |
| RAM | 8 GB minimum for a small homelab |
| Processor | 64-bit processor with virtualization support |
| Storage | At least 30–50 GB free space recommended |
| Network | Ethernet recommended for better stability |
| Internet | Optional for local hosting; required for remote access and downloads |
Step 1 — Prepare Your Windows PC
1 Prevent Your PC From Sleeping
A server should remain available while you want to access its services. If your computer enters sleep mode, your websites and applications will stop responding.
Open:
Settings → System → Power & battery → Screen and sleep
Set the sleep option appropriately so the computer does not automatically sleep while you want the server to remain available.
2 Check Available Storage
Make sure your computer has enough free storage for Ubuntu, Docker images, databases and website files.
Step 2 — Install WSL2 and Ubuntu
3 Open PowerShell as Administrator
Search for PowerShell in the Windows Start Menu and open it as Administrator.
Run:
wsl --install
This installs the Windows Subsystem for Linux and the required Linux environment.
4 Restart Your Computer
Restart Windows after the installation process is complete.
After restarting, open Ubuntu and create your Linux:
Username
Password
You now have a Linux environment running inside your Windows 11 computer.
WINDOWS 11
│
▼
WSL2
│
▼
UBUNTU
│
▼
SERVER SOFTWARE
Step 3 — Install Docker Desktop
5 Install Docker Desktop
Download and install Docker Desktop for Windows. During setup, use the WSL2-based Linux environment when available.
Docker will allow you to run applications such as:
✓ Nginx
✓ Apache
✓ MariaDB
✓ MySQL
✓ WordPress
✓ Nextcloud
✓ Node.js applications
6 Verify Docker Installation
Open PowerShell or Ubuntu and run:
docker --version
If Docker is installed correctly, the command should display the installed Docker version.
Step 4 — Prepare Your Website for Local Hosting
7 Check Your Current Nginx Container
If you already created an Nginx container, first check whether it is currently running.
In Ubuntu or WSL, run:
docker ps
You should see a container named something similar to:
webserver
The existing container is normally serving the default Nginx website files. Before connecting your own website folder, remove that old container.
Stop and Remove the Old Container
Run:
docker stop webserver
docker rm webserver
This stops and removes the old Nginx container so you can create a new container connected to your own website files.
8 Create a Permanent Website Folder
Create a dedicated folder where your website files will be stored.
mkdir -p ~/homelab/websites/mywebsite
This folder will contain your website files, including your main index.html page.
9 Create Your Homepage
Create and open your website homepage:
nano ~/homelab/websites/mywebsite/index.html
Paste the following website code:
<!DOCTYPE html>
<html>
<head>
<title>My Homelab Website</title>
</head>
<body>
<h1>Welcome to My Website!</h1>
<p>This website is hosted from my Windows 11 homelab.</p>
</body>
</html>
Save Nano using:
CTRL + O
ENTER
CTRL + X
YOUR WEBSITE
│
▼
index.html
│
▼
~/homelab/websites/mywebsite
Step 5 — Host and Manage Your Website With Nginx
10 Run Nginx With Your Website Folder
Now run Nginx and connect your permanent website folder to the Nginx web server.
docker run -d \
--name webserver \
-p 80:80 \
-v ~/homelab/websites/mywebsite:/usr/share/nginx/html:ro \
nginx
This command tells Docker to use:
~/homelab/websites/mywebsite
as the source for your website files instead of using the default Nginx website.
WEBSITE FOLDER
~/homelab/websites/mywebsite
│
▼
DOCKER MOUNT
│
▼
/usr/share/nginx/html
│
▼
NGINX
│
▼
YOUR WEBSITE
11 Open and Manage Your Website
On Windows, open your browser and visit:
http://localhost
You should see:
Your website is now being hosted locally from your permanent Ubuntu or WSL website folder.
Edit Your Website
Whenever you want to edit your website, run:
nano ~/homelab/websites/mywebsite/index.html
Edit your HTML code and save using:
CTRL + O
ENTER
CTRL + X
Then refresh:
http://localhost
Your changes should appear immediately.
Delete Old Website Code
Inside Nano, you can remove selected code by:
✓ Press Ctrl + Shift + 6 to start selecting text.
✓ Use the arrow keys to select the old code.
✓ Press Ctrl + K to cut and delete it.
If you want to completely clear the file, run:
> ~/homelab/websites/mywebsite/index.html
Then open the file again:
nano ~/homelab/websites/mywebsite/index.html
Paste your new HTML code and save:
Ctrl + O → Enter → Ctrl + X
> command permanently clears the contents of the file, so use
it only when you want to delete all existing website code.
Step 6 — Access the Server From Your Home Network
Your server can also be accessed from other devices connected to the same local network.
12 Find Your PC's Local IP Address
Open Command Prompt and run:
ipconfig
Look for your IPv4 address. It may look similar to:
192.168.1.100
13 Open the Server From Another Device
From another computer or phone connected to the same network, open:
http://192.168.1.100
Replace the example address with your actual local IP address.
Your phone, laptop or another device connected to the same Wi-Fi network can access your web server through the PC's local IP address.
The Complete Homelab Architecture
INTERNET
│
▼
ROUTER
│
▼
WINDOWS 11 PC
│
▼
WSL2
│
▼
UBUNTU
│
▼
DOCKER
│
┌─────────────┼─────────────┐
│ │ │
▼ ▼ ▼
NGINX DATABASE APPS
WEBSITES MariaDB SERVICES
│ │ │
└─────────────┼─────────────┘
│
▼
USERS
Why Build a Homelab?
| Advantage | Explanation |
|---|---|
| Learning | You can learn Linux, Docker, networking and server administration. |
| Website Hosting | You can host your own websites and applications. |
| Data Control | You have direct control over your files and services. |
| Experimentation | You can safely test different applications and server technologies. |
| Multiple Services | Docker allows multiple applications to run on the same computer. |
Making Your Server Available on the Internet
Initially, your homelab server should be tested inside your local network. After everything is working correctly, you can consider making selected services available remotely.
REMOTE USER
│
▼
INTERNET
│
▼
SECURE TUNNEL / REVERSE PROXY
│
▼
YOUR HOME SERVER
│
▼
WEBSITE OR APPLICATION
For a safer setup, many homelab users use a secure tunnel or properly configured reverse proxy instead of directly exposing multiple ports on their home network.
What You Can Add Next
Your basic homelab server is only the beginning. You can gradually add more services as you learn.
๐ Nginx Proxy Manager
๐ Multiple websites
๐ PHP applications
๐ WordPress
๐ Nextcloud personal cloud
๐ File server
๐ Media server
๐ Home dashboard
๐ Monitoring tools
๐ Automated backups
๐ Secure remote access
Useful Homelab Services
As your server becomes more advanced, you can run several different services using Docker containers.
HOMELAB SERVER
│
┌───────────┬───────┼────────┬───────────┐
│ │ │ │ │
▼ ▼ ▼ ▼ ▼
WEBSITE CLOUD DATABASE FILES MEDIA
Nginx Storage MariaDB Server Server
For example, one container can host a website while another container stores database information. This separation makes it easier to manage individual services.
Important Security Considerations
A homelab connected to your network can become a security risk if it is not configured properly. Security should be considered from the beginning.
- Use strong passwords for all services.
- Keep Windows, Ubuntu and Docker updated.
- Do not expose unnecessary ports to the Internet.
- Do not directly expose databases unless necessary.
- Use a firewall.
- Create backups of important website and database data.
- Run only the services you actually need.
- Use secure authentication for remote access.
- Regularly check which Docker containers are running.
Video Tutorial
Watch the video tutorial below for a visual demonstration of How to Turn Your Windows 11 PC into a Homelab Server.
Frequently Asked Questions
Can I use an old Windows PC as a homelab server?
Yes. An older computer can be used as a homelab server if it has enough RAM, storage and processing power for the services you want to run.
Is 8 GB RAM enough for a homelab server?
Yes. Eight GB of RAM is enough for a small beginner homelab running lightweight services such as a web server, database and a few Docker containers.
Can I host a website from my Windows PC?
Yes. You can store your website files inside Ubuntu or WSL and mount that website folder inside an Nginx Docker container.
How do I edit my locally hosted website?
Open the website file using Nano, edit the HTML code, save the file and refresh your browser to see the changes.
How do I delete old website code?
You can select and delete old code inside Nano or completely clear the contents of the website file before adding new HTML code.
Can other devices access my homelab server?
Yes. Devices connected to the same local network can access services using your computer's local IP address and the correct port configuration.
Can I access my homelab from anywhere?
Yes, but remote access requires additional network and security configuration. A secure tunnel, VPN or properly configured reverse proxy can be used depending on your requirements.
Should I install Linux directly instead of using Windows?
A dedicated Linux server can provide more resources for server applications, but using Windows 11 with WSL2 and Docker is an easier way to start if Windows is already installed on your PC.
Conclusion
Turning your Windows 11 PC into a homelab server is an excellent way to host websites, store data and learn real-world server technologies without immediately paying for a cloud server.
With WSL2, Ubuntu and Docker, you can create a flexible Linux-based server environment while continuing to use Windows as your main operating system.
You can host your own website by creating a permanent website folder, adding your index.html file and mounting that folder inside an Nginx Docker container.
Your 8 GB RAM PC is enough to begin with lightweight services such as an Nginx web server, websites and a MariaDB database.
Next step: After setting up your first website, you can create additional website folders and install Nginx Proxy Manager to manage multiple websites, domains and services from your homelab server.
Note: Server software, Windows features and Docker configurations can change over time. Always check the relevant official documentation before exposing your homelab services to the public Internet.