How to Create your Own Server for Deployment using Your old labtop/pc with a free domain !!  
Tags: web, server, php, deploy
Published: 2020-12-07 16:44:53

---
title: How to Create your Own Server for Deployment using Your old labtop/pc with a free domain !!  
published: True
description: This post will lead You to make your Own server without pay much money For vps or shared shared hosting 
tags: web,server,php,deploy
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/zw4xh4z1id046all8a50.jpg
---
Part One
<h3><strong>This post for whom ? </strong></h3>
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/m9150mq4x062fj3e17bl.png)
if your are a developer and you got tired from spending much money for vps and shared hosting and you need a fast way for previewing your work for clients and even for production then this post made for you!
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/l8t7tiql7e2po9fxf775.jpg)
Before i make this post i used to buy vps & shared hosting for deploying my projects but this was costing me much money
so what can i do for make my own server ?! 
-like any developer you always need a server for deployment your app like laravel , wordpress , Django , Nodjs or even using  it for Deep learning like Tensorflow
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/kzglnefa9awlbmrznsdb.png)
so keep reading for achive that for free !!
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/2wtgi8zdbwm9we6al2t9.png)

</b>
<strong>Requiremnts:</strong>
1- Any laptop or pc you are not using ( Note: you can use your personal laptop)
2- Linux os ( <a href="https://ubuntu.com/">ubuntu </a> or any  Linux distribution you are like)
3- <a href="https://mobaxterm.mobatek.net/">MobaXterm</a>
4- Ability to access to your router admin page

<strong>Step one:</strong>
Install your os on your laptop/pc follow this guid show you how to install it.
I will consider you are using ubuntu os.
visit: <a href="https://itsfoss.com/install-ubuntu/"> How to Install Ubuntu Linux in the Simplest Possible Way  </a>


<strong>Step Two:</strong>
Install Apache or nginx on your machine. 
<a href="https://phoenixnap.com/kb/how-to-install-apache-web-server-on-ubuntu-18-04">How to install Apache </a>

</b>
After This step run your apache server 
now you have a server but this server work localy only.
That means you can't connect to your server from anywhere. 
in next steps we are going to make it available publicly so keep reading 

<strong>Step Three:</strong>
In this Step we will need to open the port for our Server to be able connect it from outside the LAN.
keep your os connected with wifi or Ethernet cable and open your router admin page this can be done by opening browser and visit 192.168.1.1 usually this is router address for most people.
will be someting like that 
 ![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/rqrfimu2rdwr25qo0gii.PNG)
Then go to WAN Setting 
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/978vr9sm41ijwogfyv36.PNG)
Then open Nat Tab 
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/z8uaftgg4uyoybnt4lrs.PNG)
Open Port Forwarding Tab
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/buo0te37rd7zuqmuszqc.PNG)
Then Enter The Port you need to open (port 80 for http protocol)
<strong>Name: </strong>in this field enter any name 
<strong>Protocol: </strong> this filed is TCP by default but you can choose both TCP And UDP 
<strong>WAN Connection:</strong> leave its default
<strong>WAN Host IP Address: </strong>leave its default
<strong>LAN Host: </strong> in this field enter the MAC address of your laptop/pc that you want make it server 
<strong>WAN Port: </strong> Enter the port we need to open for me i opened 80/tcp
<strong> LAN Host Port: </strong> same port we entered in WAN Port
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ja7g2fns33qd1wy3jhus.jpg)
Then save changes.

Now Visit this website to check our port <a href="https://www.yougetsignal.com/tools/open-ports/">visit</a>
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/6t1gjkv3rhhr83wryw96.PNG)
Enter your public IP on browser and press Enter and see the Magic !! <a href="https://www.whatismyip.com/what-is-my-public-ip-address/">find your public IP </a>
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/q2ufqarj3u4abfa5z3xw.PNG)
Congratulation !! now your server is public for the world.
Next part we will learn how to connect our server with a free domain Name and will learn how to auto Deploy any project  like herokuapp in a few seconds!!