Docker Day #3: Homer, the landing page for your home server
Today's Docker Day shows you how to setup a static homepage as a landing page for your home server. Read on!
Installing a static homepage on your Synology NAS can be a great way to give your home network a personal touch and make it feel more like your own. If you're looking for a simple, lightweight solution, Homer static homepage is a great choice. On today's Docker Day, I'll show you how to get it up and running on your Synology NAS.
What is Homer?
Homer is a simple, open-source web application that allows you to create a static homepage for your server or personal website. It provides a user-friendly interface for creating and editing the content of your homepage, as well as a variety of tools and features for managing and customizing its appearance and behavior.
Some of the key features of Homer include:
- Easy to use: Homer has a simple and intuitive user interface that makes it easy to create and edit the content of your homepage. It also provides a variety of tools and features for formatting and styling your content, such as text formatting, image alignment, and link insertion.
- Customizable and extensible: Homer allows you to customize the appearance and behavior of your homepage, including using custom themes and plugins, and creating custom pages and menus. It also provides a variety of tools and features for managing your homepage, such as password protection and access control.
- Secure and private: Homer is designed with security and privacy in mind, and it includes features such as encrypted data storage and support for HTTPS.
- Multi-platform support: Homer can be installed on a variety of platforms, including Linux, Windows, and MacOS, and it can be accessed from a wide range of web browsers and devices.
Overall, Homer is a simple and user-friendly platform for creating a static homepage for your server or personal website. Its customizable appearance and extensible features make it a great choice for anyone looking to create a simple and professional-looking homepage.
How to install Homer
There's at least two ways of how you can install Homer as your server's landing page. The easy way, by using Portainer (see Docker Day #1 for how you install Portainer), or the advanced way using the terminal. As usual, I do not recommend using the terminal for beginners.
Using Portainer and docker compose
- Create a folder for Homer named "homer" within our Docker folder environment. This is where all Homer assets will be stored. This includes your config files which will determine your pages content as well as the image assets for any icons you like to add.
- Now, navigate to your Portainer app and in your environment (e.g. "local"), click on "Stacks" and then "Add stack".
- In the Stack window, give the Stack a name and copy & paste the Docker compose file from below into the web editor window.
- Make sure to change the path in the volumes section to the "homer" folder that you've created in the first step. Moreover, substitute the
YOUR-PUID
andYOUR-PGID
foruser
with your own (see my other post on how you can find out your PUID and PGID). You can also change theports
mapping in case they are already in use or you prefer others. Finally, click on "Deploy stack". - Open a web browser and navigate to your new landing page under
http://your-nas-ip:6009
(Note the ports defined in the docker compose file for this example).
Using the terminal
Step 1: Install Docker on your Synology NAS
Before you can install Homer, you'll need to have Docker installed on your Synology NAS. If you don't already have Docker installed, you can follow these steps:
- Open the Package Center on your Synology NAS.
- In the search field, enter "Docker" and press Enter.
- Click on the "Docker" package in the search results and then click the "Install" button.
- Follow the prompts to complete the installation.
Step 2: Pull the Homer Docker image
Now that Docker is installed, you can pull the Homer Docker image from the Docker Hub registry. To do this, follow these steps:
- Open the terminal on your Synology NAS. You can do this by going to Main Menu > Terminal.
- Type the following command and press Enter:
docker pull b4bz/homer:latest
- Wait for the image to be downloaded. This may take a few minutes.
Step 3: Create a folder for the Homer assets
Next, you'll need to create a folder on your Synology NAS to store the Homer assets. This includes your config files which will determine your pages content as well as the image assets for any icons you like to add.
- Open the File Station on your Synology NAS.
- Create a new folder in the location of your choice, and name it "homer".
Step 4: Run the Homer Docker container
Now that you have the Homer Docker image and a folder for the data, you're ready to run the Homer Docker container. To do this, follow these steps:
- Open the terminal on your Synology NAS.
- Type the following command and press Enter:
Replace "/your/local/assets" with the paths to the "homer" folder.
This command will start the Homer Docker container in detached mode, which means it will run in the background. It will also map ports 6009
and 8080
on the host to the same ports on the container, and mount the "homer" to the container.
Step 5: Access the Homer landing page
Now that the Homer Docker container is running, you can access the landing page. You simply need to open a web browser and navigate to http://your-nas-ip:6009
.
That's it, you are done!
You now a sexy new static landing homepage for your personal server!
I hope this helped! Let me know if you have any other questions.