How to Install Whoogle on Docker with Docker Compose
In an era where privacy is increasingly threatened, many users are seeking alternatives to mainstream search engines. Whoogle is one such alternative, offering a privacy-focused, ad-free search engine that mimics the familiar interface of Google. It does not track your data or generate user profiles, making it a preferred choice for privacy-conscious users. This article will guide you through the steps to install Whoogle on Docker using Docker Compose, ensuring a secure and efficient setup.
Understanding Whoogle and Docker
Before diving into the installation process, it is important to understand what Whoogle and Docker are. Whoogle is an open-source, self-hosted search engine designed to provide Google search results without tracking or ads. It is built using Python and Flask, which allows for easy customization and deployment.
Docker, on the other hand, is a platform that enables developers to create, deploy, and run applications in containers. Containers are lightweight, standalone, and executable software packages that include everything needed to run an application, including the code, runtime, system tools, libraries, and settings. Docker Compose is a tool for defining and running multi-container Docker applications. It uses a YAML file to configure the application’s services, making it easy to manage multiple containers.
Step 1: Setting Up the Project Directory
The first step in installing Whoogle on Docker is to set up a project directory. This directory will house the Docker Compose file and any other configuration files required for the installation.
- Open your terminal.
- Navigate to the directory where you want to create the project.
- Create a new directory for Whoogle:
mkdir whoogle-docker
4. Navigate into the newly created directory:
cd whoogle-docker
Step 2: Creating the Docker Compose File
The Docker Compose file is essential for defining the Whoogle service and its configuration. This file will tell Docker how to set up and run the Whoogle container.
- Inside your project directory, create a new file named
docker-compose.yml
:
touch docker-compose.yml
2. Open the docker-compose.yml
file in your preferred text editor.
3. Add the following configuration to the file:
version: '3.9'
services:
whoogle-search:
image: benbusby/whoogle-search
restart: always
security_opt:
- no-new-privileges
environment:
- WHOOGLE_PASS=password123
- WHOOGLE_USER=linuxcodelab.eu
ports:
- '5202:5000'
container_name: whoogle
The volumes
section at the bottom defines a named volume for data persistence.
Step 3: Running the Docker Compose File
Now that the Docker Compose file is ready, you can proceed to run it and start the Whoogle service.
- In the terminal, ensure you are in the
whoogle-docker
directory. - Run the following command to start the Whoogle container:
docker-compose up -d
The -d
flag runs the container in detached mode, allowing it to run in the background.
- After running the command, Docker will download the Whoogle image (if not already available) and start the container. You can check if the container is running by using:
docker ps
This command lists all running containers, and you should see Whoogle listed there.
Step 4: Accessing Whoogle
Once the container is up and running, you can access Whoogle from your web browser.
- Open a web browser.
- Navigate to
http://SERVER_IP:5000
.
You should see the Whoogle search page. You can start using it just like any other search engine, but with the assurance that your privacy is protected.
Step 5: Managing the Whoogle Container
After the initial setup, you might need to manage the Whoogle container, such as stopping, restarting, or removing it.
- To stop the Whoogle container, use the command:
docker-compose down
This command will stop and remove the container, but it will keep the data intact in the volume.
- To restart the container, simply run:
docker-compose up -d
- If you need to update Whoogle to a newer version, you can pull the latest image and recreate the container:
docker-compose pull
docker-compose up -d --force-recreate
This ensures you are using the latest version of Whoogle with all the latest features and security updates.
Conclusion
Installing Whoogle on Docker using Docker Compose is a straightforward process that ensures a secure and privacy-focused search engine experience. By following the steps outlined in this article, you can easily set up and manage your own Whoogle instance. This setup allows you to take control of your online search privacy while still benefiting from the power of Google’s search results.
With Docker and Docker Compose, you have a flexible and scalable way to deploy Whoogle, making it accessible on any device or platform that supports Docker. Whether you are a privacy advocate or simply curious about alternative search engines, this guide provides everything you need to get started with Whoogle.
Thank you for reading the article! If you found the information useful, you can donate using the buttons below:
Donate ☕️ with PayPalDonate 💳 with Revolut