Tutorial

Install YaCy on SnipeOS

One command installs a fully functional peer-to-peer search engine, local or public with HTTPS. This is the same stack that powers SnipeSearch.Asia. Prefer watching? See the install YaCy video.

Video walkthrough

One command, local or domain with HTTPS, then open the search UI.

Terminal
curl -fsSL https://snipebrowser.com/os/install-yacy.sh -o /tmp/install-yacy.sh && sudo bash /tmp/install-yacy.sh

Open on YouTube · Uninstall YaCy · YaCy project

What is YaCy

YaCy (pronounced “ya see”) is a free, open source, peer-to-peer search engine created by Michael Christen in 2003 and maintained by an active community ever since. Unlike Google, Bing, or DuckDuckGo, YaCy has no central server and no company controlling it. Every installation is a peer in a distributed network. Each peer crawls the web independently, builds its own index, and optionally shares that index with other YaCy peers across the world.

Because it is fully decentralised, no single entity can censor results, track your searches, or shut it down. There is no search history stored anywhere, no profiling, and no ranking biased by advertising.

You can run it in three ways:

  • Connected to the global P2P network, sharing an index built by peers worldwide
  • Completely isolated as a private search engine for your own content or intranet
  • As a public search portal for your own domain, with a custom index you define and crawl yourself

YaCy includes a full web crawler with a scheduler, supports FTP and SMB alongside HTTP, can index a local file system and intranet, and exposes an API for other applications. It is written in Java, which is why this installer handles Java as part of the process. Project site: yacy.net.

Open a terminal and run one command

  1. Open the Snipe start menu (bottom-left).
  2. Go to System Tools, or Favourites if you keep QTerminal pinned there.
  3. Open the terminal (QTerminal).
  4. Paste and run:
Terminal
curl -fsSL https://snipebrowser.com/os/install-yacy.sh -o /tmp/install-yacy.sh && sudo bash /tmp/install-yacy.sh

This installer is standalone. You do not need to run the SnipeOS update script or install Java separately first; the script handles everything.

When prompted, enter your user password and press Enter. You will not see characters appear as you type (that is normal Linux behaviour, not a fault).

Local only, or domain with HTTPS

The script asks one question:

  • Local only: reachable at http://127.0.0.1:8090 / http://localhost:8090
  • Domain with HTTPS: sets up nginx as a reverse proxy and runs Let’s Encrypt via certbot

If you choose domain mode, your DNS A record must already point at this machine before you run the script, or certbot will fail.

When finished, open your browser to http://localhost:8090 for local mode, or your chosen address over HTTPS for domain mode.

What the script does

After the mode choice, the script runs eight steps automatically:

  1. Sources integrity check
  2. apt update
  3. apt upgrade
  4. Installation of nginx, certbot, wget, and OpenJDK headless
  5. Download of YaCy from the official release server
  6. Extraction into /home/yacy
  7. Installation and start of the YaCy systemd service
  8. Final SnipeOS patch integrity check

Domain mode also configures the nginx site and SSL certificate.

Need to remove it later? See the Uninstall YaCy guide.

Optional: access YaCy without a port number

By default YaCy runs on port 8090, so local mode needs the port in the address bar. If you want http://localhost without the port, you can redirect port 80 to 8090 with ufw. This is optional and not covered in the video.

Open /etc/ufw/before.rules as root:

Terminal
sudo nano /etc/ufw/before.rules

At the very top of the file, before the *filter section, add these lines:

before.rules (top of file)
*nat
:PREROUTING ACCEPT [0:0]
-A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8090
COMMIT

Save and close the file, then allow port 80 and reload ufw:

Terminal
sudo ufw allow 80/tcp
sudo ufw reload

YaCy will then be reachable at http://localhost as well as http://127.0.0.1:8090. To remove the redirect later, delete those four lines from before.rules and run sudo ufw reload again.

SnipeOS only (do not run elsewhere)

Important: This script is for SnipeOS only. Do not run it on vanilla Ubuntu, standard Lubuntu, or any other distribution.

Running it on a non-SnipeOS install could damage that system.

Not sure what you are running? Open a terminal and run fastfetch (SnipeOS identifies itself there).