How I Hosted A Website On My NAS From Home

Other Computing Devices Sign in to your XDA account Key Takeaways Host a website on a NAS to save money and avoid subscriptions. A NAS can be a powerful web … Read more

Taylor Bell

Taylor Bell

Published on Jul 11, 2024

How I Hosted A Website On My NAS From Home
Other Computing Devices

4

Sign in to your XDA account

Synology NAS XDA website

Key Takeaways

  • Host a website on a NAS to save money and avoid subscriptions.
  • A NAS can be a powerful web server, but consider potential downtime and limitations on affordable enclosures.
  • Synology NAS makes website hosting easy with Web Station, but test your setup before relying on it.

Running a website usually involves subscribing to a hoisting plan with a provider, which then handles all the background processes. To save money, it’s possible to run a website on your network-attached storage (NAS) device. This is precisely what I did using a Synology NAS enclosure though it will work on a custom NAS with an OS such as TrueNAS or Unraid. Depending on what you need the website to do, a NAS can be a powerful web server.

Why you should host a website on a NAS

synoloy-diskstation-ds223j-hero

Website hosting has been around since almost the start of the Internet. Companies offer services to provide storage space and a portion of a server’s resources to various customers on the same machine, allowing software to run on PHP, MySQL, and other technologies. XDA itself is hosted on a web server, but instead of setting one up and managing it yourself, which requires countless hours of learning and troubleshooting, it’s easier to pay someone else to do all that for you.

TerraMaster and Asustor NAS

Related

Best NAS devices in 2024

Expand your PC storage with one of these NAS enclosures

A NAS is very much a server but focuses more on storing data. That’s pretty much all a website is. It’s a server loading data and providing it to you through the browser. This makes it suitable for hosting and running websites, so long as you’re not expecting to receive millions of hits daily on an enclosure with an ARM processor. Using a NAS helps save money by cancelling subscriptions and the same can be applied to website hosting plans. Simply buy a domain name, configure the NAS, and you’re good to go.

It’s not all great news for hosting a website on a NAS, however. There’s the potential for downtime through power outages or unreliable internet. Whether it’s your net or power, any failure could take your website(s) offline. So long as your NAS has adequate performance, running a web server shouldn’t be an issue. But for more affordable enclosures, doing so could limit what else you may perform on the same device. There’s also the issue of your ISP switching your external IP address, though this can be mitigated.

How I used a Synology NAS for my website

Hosting a website on a Synology NAS

Synology makes it easy to run websites from just about any branded enclosure. All that’s required is the device, a drive (or a few), and a LAN or WAN connection. Most NAS operating systems will support the installation of Apache MySQL, and PHP in one form or another. For pre-built enclosures, such as a Synology NAS, this can be as easy as installing a single app. Here’s how to quickly set up Web Station on a Synology NAS and start hosting websites:

  1. Connect to your Synology NAS.
  2. Open Package Center.
  3. Download and install Web Station. (Apache and PHP can also be installed for websites using PHP and a database. Make sure the http group has sufficient permissions on the website root folder.)
    Installing Web Station on Synology DSM 7

  4. Go to Control Panel> Security> Firewall.
  5. Enable the firewall (if not already running).
    Configuring the Synology DSM 7 firewall

  1. Configure firewall rules for ports 80 (HTTP), 443 (HTTPS), and 5000 (DSM web interface).
  2. Go to Control Panel> External Access> Router Configuration and configure port forwarding.
  3. Go to Web Station> Web Portal.
    Synology Web Station portal

  4. Click Create.
  5. Click Web Service Portal.
  6. Choose the Service. (Static web pages versus more advanced scripting.)
    Choose a Synology WebStation service type

  7. Enter a Hostname.
  8. Click Create.

Web Station can be used to host a simple PHP page for linking other services or a slightly more advanced WordPress installation. It’s best to test the waters with what you intend to use the NAS and the website for before deploying and relying on it. Unlike web hosting platforms, there will be no easy way to increase the available system resources without physically installing more RAM or swapping the device altogether, unless it’s a custom build.

Bitwarden with Synology NAS

Related

Partager cet article

Inscrivez-vous à notre newsletter