Hosted on my Synology DS418 NAS

Setting up jkoester.com on my own NAS, self hosting …

Part 1: Taming the Beast – Setting Up a Self-Hosted Website on a Synology NAS

Embarking on the journey of self-hosting a website is often filled with a mix of excitement and technical challenges. Our goal was to get jkoester.com live, hosted on a Synology DS418 NAS, and accessible to the world. This seemingly straightforward task involved a deeper dive into domain management, network configuration, and web server setup than initially anticipated.

Laying the Foundation: Domain and Initial NAS Setup

The first crucial step was securing the domain name, jkoester.com, through GoDaddy. Once the domain was in our possession, the focus shifted to the Synology NAS. The NAS, connected to a home network with a dynamic public IP address, required a way to be consistently accessible from the internet. This led us to the use of Synology’s QuickConnect service, providing a stable external address (jfkbluenas.direct.quickconnect.to) as a temporary measure and a fallback.

We also established a crucial element for any website: a web server. Leveraging Synology’s Web Station package, we enabled PHP support, laying the groundwork for dynamic content and applications like WordPress. A basic “Hello World” website, created within the designated web shared folder, served as our initial proof of concept, demonstrating that the NAS could indeed serve web pages under the jkoester.com domain. This involved creating a Web Portal in Web Station, linking the hostname jkoester.com to the web/Hello World folder.

Navigating Network and Security

With the basic website accessible, our attention turned to security and ensuring proper routing. This involved configuring the router to forward external HTTP (port 80) and HTTPS (port 443) traffic to the NAS’s internal IP address. A careful security review led us to initially disable the HTTP port forwarding, focusing solely on secure HTTPS connections. This decision, while enhancing security, later played a role in some unexpected behaviors.

Firewall configuration on the router also proved to be a significant factor. We explored different firewall levels, discovering that a “High” setting inadvertently blocked the NAS’s ability to communicate outbound, affecting services like QuickConnect. This highlighted the delicate balance between robust security and the necessary outbound connections for certain applications. Ultimately, leaving the firewall at a lower setting while relying on the NAS’s own firewall for inbound protection became the working solution.

Installing and Configuring WordPress

The ultimate goal was to run a WordPress website. This involved installing the WordPress package through Synology’s Package Center, along with its dependencies: MariaDB 10 (the database server) and phpMyAdmin (a tool for managing the database).

Connecting WordPress to the jkoester.com domain proved to be the most challenging part. This required creating a new Web Portal in Web Station, linking the jkoester.com hostname to the folder where the WordPress files were installed (which we eventually located). We also encountered issues with phpMyAdmin due to an unknown root password, requiring a complex password reset process via SSH, a deeper dive into MariaDB commands, and manual configuration file editing.

Finally, the “Internal Server Error” we faced after pointing the domain to the WordPress installation was traced to PHP’s open_basedir setting, a security measure that restricts PHP scripts to specific directories. Adjusting this setting to include the necessary WordPress file paths resolved the issue.

The final step involved configuring WordPress itself, setting the WordPress Address (URL) and Site Address (URL) to https://jkoester.com/, completing the process of getting the self-hosted website live and accessible under the desired domain.


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *