Making a Linux Home-Server

Tagged: , ,

This topic was published by and viewed 1783 times since "". The last page revision was "".

Viewing 1 post (of 1 total)
  • Author

  • Hooman Aminvand
    • Topics - 11
    • @hooman

    You can create a home-server after reading this article.

    Do you need a home server? Yes, of course! With a home-server you can share files! May be you are listening to music with your friend and he likes your music. You can then easily share with him using your system.

    Many web-server programs need GNU/Linux, PHP, SQL, and a Content Management System. If you buy a hosting service, the company installs and configures the software in the server for you, so you can easily use it. You might ask, "I have GNU/Linux, so why can't I create a server?".

    Now, we can go make a home-server. In this article, I just learned how to install and configure a server. In a future article, I will explain how to install PHP and MySQL. Here we go!

    1 - Open a Terminal

    Open a terminal and type sudo apt-get install lighttpd. This server-daemon is called "Lighttpd" (pronounced "lighty") because it is lightweight and easy to use.

    Next, open the settings file - sudo nano /etc/lighttpd/lighttpd.conf

    Find server.document-root = "/var/www" and change it to server.document-root = "/home/USERNAME/var/www". Create a folder for /var/www in the user's home directory.

    With the command sudo service lighttpd restart, Lighttpd can be reset. Don't auto-start the server. Instead, each time you need it to run, use the handy command sudo service lighttpd start

    2 - Get a free Sub-Domain

    Now, go to and find/click subdomains in the left side and create a sub-domain of your choice.

    In "Destination", enter your IP address. To see your IP, run curl

    However, after each time the modem is turned off and on, some people may get a new IP. Thus, you must enter a new IP address, but we have another way in Click on "dynamic DNS". You must use Direct URL (face to face), then after each time modem resets, click on this and it will auto-config for you.

    3 - Open Port 80 on the Modem

    Now, we need to open port 80 on the modem, so you must find the modem's server or virtual server settings. If "port filter" settings are found that may work instead.

    NOTE: If you can't find "virtual server" in the modem settings, search on the web about "finding virtual server on modem".

    After modem configuration, go to the Linux server's network settings - Advanced Setup > NAT > Virtual Circuit: PVCX > Virtual Server

    The "X" in "PVCX" is a single number from your Internet services. For example, my VPI is "0" and my VCI is "35", so I must choose "PVC2". The easy way to get the correct number is to try them from PVC1 to PVC10.

    In the "Virtual Server" selection, look around "Application" for a menu and then choose "HTTP_server". You must enter the local IP address that the modem gave the home-server. To see the IP address (if using Ethernet), type ifconfig eth0. Otherwise, if using WiFi, try ifconfig wlan0.

    In the terminal, you will see the IP address on the line beginning with inet addr.

    Finally, we are done!

    Further Reading

Viewing 1 post (of 1 total)