PHP settings: select PHP 7.x or higher if your website requires PHP.
Step 2: Set Up a Shared Folder for Your Website
Go to Control Panel → Shared Folder → Create.
Name the folder (e.g., web or website).
Enable Read/Write permissions for your user account.
This folder will be the root directory for your website files.
Typical web folder path: /volume1/web/yourfolder.
Step 3: Configure Virtual Hosts (Optional)
If you plan to host multiple websites:
Open Web Station → Virtual Host → Create.
Set the Hostname (e.g., mywebsite.local or a domain name you own).
Set the Port (default HTTP is 80, HTTPS is 443).
Set the Document Root to the shared folder created in Step 2.
This allows you to serve multiple websites from a single NAS.
Step 4: Upload Your Website Files
You can use File Station (built-in DSM file manager) or FTP to upload files.
If using FTP:
Install FTP Server from Package Center.
Enable FTP and create a user with access to the web folder.
Use an FTP client (like FileZilla) to upload files to /web/yourfolder.
Ensure your main page is named index.html or index.php.
Step 5: Enable PHP (if needed)
Go to Web Station → PHP Settings.
Make sure your website folder uses the desired PHP version.
Enable required PHP extensions (like MySQL, cURL, GD) for your website functionality.
Step 6: Configure Database (Optional)
If your website requires a database (WordPress, Joomla, etc.):
Install MariaDB or MySQL from Package Center.
Open phpMyAdmin (optional, also from Package Center) to manage databases.
Create a database and user for your website:
Example:
Database: mywebsite_db
User: mywebsite_user
Password: securepassword123
Update your website’s configuration file with database details.
Step 7: Test Your Website Locally
Open a browser and go to:
http://<NAS_IP_ADDRESS>/yourfolder
Example: http://192.168.1.100/mywebsite
If you see your site, local hosting is working.
Step 8: Configure Port Forwarding for External Access
To access your site outside your local network:
Log in to your router.
Forward ports:
HTTP: 80
HTTPS: 443
Point them to your NAS IP (e.g., 192.168.1.100).
Be cautious: opening ports exposes your NAS to the internet. Always keep DSM updated and enable firewall/SSL.
Step 9: Set Up a Domain Name (Optional)
Purchase a domain or use a dynamic DNS service.
In Control Panel → External Access → DDNS, configure your domain.
Map the domain to your external IP.
Add the domain as a Virtual Host in Web Station.
Step 10: Enable HTTPS (Recommended)
Go to Control Panel → Security → Certificate → Add.
Choose Get a certificate from Let’s Encrypt.
Fill in your domain and email.
Once installed, force HTTPS in Web Station.
Step 11: Test External Access
Open a browser outside your home network.
Navigate to your domain or public IP:
http://yourdomain.com
Ensure your website loads correctly.
Step 12: Maintenance Tips
Regular Backups: Backup your web folder and databases regularly.
Security Updates: Keep DSM, Web Station, and your website software up to date.
Monitoring: Use DSM’s Resource Monitor to check server load.
✅ Summary
By following these steps, you can host a personal website on your Synology NAS, with support for PHP, databases, SSL, and even multiple websites via virtual hosts. This setup gives you complete control, avoids monthly hosting fees, and is great for testing or personal projects. How to Self-Host Your Website on a Synology NAS?
How to Self-Host Your Website on a Synology NAS
Self-hosting your website on a Synology NAS allows you to serve web pages directly from your home network, giving you full control over your content and environment. Synology NAS devices run DiskStation Manager (DSM), which includes a built-in web server and support for dynamic websites.
Step 1: Prepare Your NAS
1.1 Update DSM
Log in to DSM using your admin account.
Go to Control Panel → Update & Restore → DSM Update.
Install any available updates to ensure compatibility with web services and security.
1.2 Enable Web Station
Open Package Center.
Search for Web Station and click Install.
Once installed, open Web Station and configure:
Default backend: choose Apache HTTP Server 2.4 or Nginx (Nginx is recommended for better performance).