pi-hole:setup_pi-hole_running_in_a_container_on_qnap_container_station
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
pi-hole:setup_pi-hole_running_in_a_container_on_qnap_container_station [2021/04/21 21:06] – peter | pi-hole:setup_pi-hole_running_in_a_container_on_qnap_container_station [2021/04/21 22:00] (current) – peter | ||
---|---|---|---|
Line 9: | Line 9: | ||
* There are several types of Docker and LXC containers listed. | * There are several types of Docker and LXC containers listed. | ||
* Choose the **LXC** Ubuntu 18.04 container. | * Choose the **LXC** Ubuntu 18.04 container. | ||
- | * Name the container, such as " | + | * Name the container, such as " |
+ | * The memory can be set higher if needed. | ||
{{: | {{: | ||
<WRAP info> | <WRAP info> | ||
- | **NOTE: | + | **NOTE: |
- | A Docker implementation will run perfectly until you either shutdown the container or restart the QNAP NAS. Upon restart of the container, the console will indicate that there is no DNS Resolver available. | + | LXC containers are not just an application instance. |
- | One powerful feature of Docker containers is that you can export them and import them easily on another Docker | + | * An LXC Container runs an OS instance, such as Ubuntu, on which you can install one or more applications. |
+ | * The LXC container uses a minimal amount of system | ||
+ | * The OS the container runs can easily | ||
+ | * The applications running | ||
+ | * To update | ||
- | LXC containers | + | Docker |
- | Since LXC provides | + | * A Docker Container is based upon a package image, and are therefore not as easy to modify. |
- | + | * To update Pi-Hole, you would have to create a new container | |
- | In order to provide an easier installation for pihole without the issues mentioned here, we will use an LXC container. | + | |
</ | </ | ||
- | |||
- | Then click on **Advanced Settings**. | + | ---- |
+ | |||
+ | Click on **Advanced Settings**. | ||
* Change the network mode to **Bridge**. | * Change the network mode to **Bridge**. | ||
- | * Select **Use Static IP** and change the IP address to a unique address on your LAN. In this example, 192.168.1.25 is used. | + | * Select **Use Static IP** and change the IP address to a unique address on your LAN. |
+ | * In this example, 192.168.1.25 is used. | ||
{{: | {{: | ||
- | Go back to the **Overview** section in Container Station and after a few minutes you should see your container listed. | + | ---- |
+ | |||
+ | Return | ||
- | Click on the name of the container | + | Click on the name of the container, which will enter the console. |
Type **passwd** to change the password. | Type **passwd** to change the password. | ||
Line 50: | Line 58: | ||
===== Update and Configure the Ubuntu LXC Container ===== | ===== Update and Configure the Ubuntu LXC Container ===== | ||
- | Before we can install Pi-hole, we need to update this very lightweight LXC container to add some features. | + | Update Ubuntu: |
- | + | ||
- | First run updates: | + | |
<code bash> | <code bash> | ||
Line 58: | Line 64: | ||
</ | </ | ||
- | Next install | + | Install |
<code bash> | <code bash> | ||
Line 64: | Line 70: | ||
</ | </ | ||
- | Now add a username other than the default. | + | Add a username other than the default. |
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | </ | ||
<code bash> | <code bash> | ||
Line 70: | Line 80: | ||
</ | </ | ||
- | Now grant the new user privilege: | + | Grant the new user root privileges: |
<code bash> | <code bash> | ||
Line 80: | Line 90: | ||
===== SSH into the Ubuntu LXC Container ===== | ===== SSH into the Ubuntu LXC Container ===== | ||
- | Open a terminal back on your desktop computer and " | + | " |
<code bash> | <code bash> | ||
Line 98: | Line 108: | ||
</ | </ | ||
- | Now you can install | + | Install |
<code bash> | <code bash> | ||
Line 127: | Line 137: | ||
+ | Select the defaults until the DNS screen and then choose Cloudflare as the DNS. | ||
+ | * Accept all the rest of the defaults. | ||
+ | * The installation will continue for a while. | ||
+ | * When the installation completes, a message will be shown telling you to set up the DHCP settings on your router to make the address of your Pi-Hole the primary DNS for your network. | ||
+ | * So log into your router and point the DNS settings to the IP address of this container. | ||
- | |||
- | |||
- | |||
- | Select the defaults until the DNS screen and then choose Cloudflare as your DNS. | ||
- | |||
- | * Accept all the rest of the defaults and be careful not to change them. This will assure that you get the admin web interface and that statistics are logged. | ||
- | * The installation will continue for a few minutes after you answer the prompts. | ||
- | * After your installation completes, you will receive a message telling you to set up the DHCP settings on your router to make the address of your Pi-Hole the primary DNS for your network. | ||
- | * That will insert the Pi-Hole as the " | ||
When you return to the prompt in the " | When you return to the prompt in the " | ||
Line 145: | Line 151: | ||
</ | </ | ||
- | You can now close the " | + | <WRAP info> |
+ | **NOTE: | ||
+ | </ | ||
---- | ---- | ||
- | ===== Go to your Pi-Hole Website ===== | + | ===== Access the Pi-Hole Website ===== |
- | Go to your web browser | + | Within a web browser, enter the IP address of your Pi-Hole followed by /admin: |
<code bash> | <code bash> | ||
Line 157: | Line 166: | ||
</ | </ | ||
- | Select the login and you should be able to log in with the password you just set. | + | Click **login** and you should be able to log in with the password you just set. |
<WRAP info> | <WRAP info> | ||
- | **NOTE: | + | **NOTE: |
- | + | ||
- | This LXC container is very lean and uses a minimal amount of system resources. | + | |
</ | </ | ||
<WRAP important> | <WRAP important> | ||
- | **IMPORTANT: | + | **IMPORTANT: |
A good practice is to make the Pi-Hole DNS 1 and then Cloudflare 1.1.1.1 as DNS 2. | A good practice is to make the Pi-Hole DNS 1 and then Cloudflare 1.1.1.1 as DNS 2. |
pi-hole/setup_pi-hole_running_in_a_container_on_qnap_container_station.1619035616.txt.gz · Last modified: 2021/04/21 21:06 by peter