Self-host 14/16: Whoogle
In this series, you will learn how to self-host 16 services on your server. To self-host a service, you can either use a server at home or a server in the cloud.
Nginx Proxy Manager
The first thing you need to set up is a reverse proxy, so you can go to a domain or subdomain to access the service.
Install docker-compose
Update your package list
sudo apt-get update
Install dependencies
sudo apt-get install ca-certificates curl gnupg lsb-release
Add Docker’s official GPG key
sudo apt-get install ca-certificates curl gnupg lsb-release
Set up the stable repository
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Update your package list
sudo apt-get update
Install Docker Engine
sudo apt-get install docker-ce docker-ce-cli containerd.io
Verify that Docker Engine is installed correctly
sudo docker run hello-world
Download the current stable release of Docker Compose
sudo curl -L "https://github.com/docker/compose/releases/download/$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep tag_name | cut -d '"' -f 4)/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
Apply executable permissions to the binary
sudo chmod +x /usr/local/bin/docker-compose
Verify the installation
docker-compose --version
Create directory
Create a directory
Change “name-of-the-service” with the actual name of the container
mkdir -p ~/docker-compose/name-of-the-service
Move into the directory
Change “name-of-the-service” with the name you choose above
cd ~/docker-compose/name-of-the-service
Create a docker-compose.yml file
Create a docker-compose.yml file
nano docker-compose.yml
Past this content into the file
version: '3.8'
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports:
- '80:80'
- '81:81'
- '443:443'
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
Press “ctrl + o” to save the file
Press “ctrl + x” to exit the file
Start the docker-compose container
Start the docker-compose container
sudo docker-compose up -d
Access the service
To access the service, open a browser and type in the following content
http://<your-server-ip>:81
Afterwards, you will be presented by a Nginx Proxy Manager website. Login with this credentials
Email: [email protected]
Password: changeme
Whoogle
Create directory
Create a directory
Change “name-of-the-service” with the actual name of the container
mkdir -p ~/docker-compose/name-of-the-service
Move into the directory
Change “name-of-the-service” with the name you choose above
cd ~/docker-compose/name-of-the-service
Create a docker-compose.yml file
Create a docker-compose.yml file
nano docker-compose.yml
Past this content into the file
version: "2.4"
services:
whoogle-search:
image: ${WHOOGLE_IMAGE:-benbusby/whoogle-search}
container_name: whoogle-search
restart: unless-stopped
pids_limit: 50
mem_limit: 256mb
memswap_limit: 256mb
# user debian-tor from tor package
user: whoogle
security_opt:
- no-new-privileges
cap_drop:
- ALL
tmpfs:
- /config/:size=10M,uid=927,gid=927,mode=1700
- /var/lib/tor/:size=15M,uid=927,gid=927,mode=1700
- /run/tor/:size=1M,uid=927,gid=927,mode=1700
#environment: # Uncomment to configure environment variables
# Basic auth configuration, uncomment to enable
#- WHOOGLE_USER=<auth username>
#- WHOOGLE_PASS=<auth password>
# Proxy configuration, uncomment to enable
#- WHOOGLE_PROXY_USER=<proxy username>
#- WHOOGLE_PROXY_PASS=<proxy password>
#- WHOOGLE_PROXY_TYPE=<proxy type (http|https|socks4|socks5)
#- WHOOGLE_PROXY_LOC=<proxy host/ip>
# Site alternative configurations, uncomment to enable
# Note: If not set, the feature will still be available
# with default values.
#- WHOOGLE_ALT_TW=farside.link/nitter
#- WHOOGLE_ALT_YT=farside.link/invidious
#- WHOOGLE_ALT_IG=farside.link/bibliogram/u
#- WHOOGLE_ALT_RD=farside.link/libreddit
#- WHOOGLE_ALT_MD=farside.link/scribe
#- WHOOGLE_ALT_TL=farside.link/lingva
#- WHOOGLE_ALT_IMG=farside.link/rimgo
#- WHOOGLE_ALT_WIKI=farside.link/wikiless
#- WHOOGLE_ALT_IMDB=farside.link/libremdb
#- WHOOGLE_ALT_QUORA=farside.link/quetre
#env_file: # Alternatively, load variables from whoogle.env
#- whoogle.env
ports:
- 20014:5000
Press “ctrl + o” to save the file
Press “ctrl + x” to exit the file
Start the docker-compose container
Start the docker-compose container
sudo docker-compose up -d
Access the service
To access the service, open a browser and type in the following content
http://<your-server-ip>:20014
Afterwards, you will be presented by the website. Now you can create an account and start using it.
Make the service available via a domain
Login into your Nginx Proxy Manager
Add a host
Click on “Proxy Hosts”
Click on “Add Proxy Host”
Fill in the details
Details
Domain Names: Enter your domain name (e.g. servicename.yourdomain.com
)
Scheme: select “http”
Forward Host / IP: Enter the IP address of your server (enter “localhost” or “127.0.0.1” if its on the same machine)
Forward Port: Enter used port in the config
Cache Assets: Optional, check if needed
Block Common Exploits: Optional, check if needed (recommended)
Websockets Support: Check if your service needs Websocket support
Custom locations
Add location: Optional, check if needed
SSL
SSL Certificate: Select “Request a new SSL Certificate”
Force SSL: Optional, highly recommended automatic redirecting to HTTPS
HSTS Enabled: Optional, check if needed
Use a DNS Challenge: Optional, check if needed
HTTP/2 Support: Optional, check if needed
HSTS Subdomains: Optional, check if needed
Email Address for Let’s Encrypt: Enter your Email address
Agree to the Terms of Services
Advanced
Custom Nginx Configuration: Optional, check if needed
Click “Save”
Enjoy!