selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

GitHub
librex logo

Self-host librex

Privacy-respecting metasearch engine without JavaScript

BetaOpen SourceAGPL-3.0
Updated2 years ago
LanguagePHP
Setup difficultyModerate
ThemeDark mode
Stars
843
Port
8080 (HTTP web interface)
Docker
librex/librex
Install with Docker
LibreX search interface showing the main search pageLibreX search results page

What is librex?

LibreX is a PHP-based metasearch tool that prioritizes privacy by aggregating results from multiple sources including Google, Qwant, Ahmia, and torrent indexes. It removes tracking parameters from links and swaps mainstream platforms for privacy-respecting alternatives such as Invidious for YouTube and Nitter for Twitter. The interface works without any JavaScript, and the engine can be reached over Tor and I2P. A JSON API is available for programmatic access. Deployment options include Docker, Docker Compose, or a classic nginx and PHP-FPM setup on Linux and BSD. There are no user accounts, no logging, and no caching. Extra capabilities include bang commands, instant answers for things like currency conversion, several color schemes, and OpenSearch integration. The codebase is deliberately free of external libraries and frameworks.

Should you self-host librex?

librex scores 50/100 on selfhost.directory (how scoring works) and ranks #27 of 41 in Search Engines. It has 843 GitHub stars.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is AGPL-3.0-licensed and written mostly in PHP.

Its closest alternative on selfhost.directory is SearXNG (86/100, 38 953 stars). It scores higher overall, so compare the two before you pick. See librex vs SearXNG side by side.

Features

  • Ad-free search
  • Bang search
  • I2P support
  • JavaScript-free interface
  • JSON API
  • No logging or caching
  • No Third Party Libraries
  • OpenSearch support
  • Privacy-friendly frontends
  • Special queries
  • Tor hidden service results
  • Torrent Search
  • Tracking parameter removal

librex README

How to install librex

Install librex with Docker

Environment variables
TZ, CONFIG_GOOGLE_DOMAIN, CONFIG_GOOGLE_LANGUAGE, CONFIG_WIKIPEDIA_LANGUAGE, CONFIG_INVIDIOUS_INSTANCE, CONFIG_HIDDEN_SERVICE_SEARCH, CONFIG_DISABLE_BITTORRENT_SEARCH, CONFIG_BITTORRENT_TRACKERS, and many more (see Docker Hub page)

docker run -d --name librex -e TZ="America/New_York" -e CONFIG_GOOGLE_DOMAIN="com" -e CONFIG_GOOGLE_LANGUAGE="en" -p 8080:8080 librex/librex:latest

Run a single container from Docker Hub

How to configure librex

  • APP_ANONYMOUS_OVERFLOWIntegration with external self-hosted Anonymous Overflow instance

    Integration with external self-hosted Anonymous Overflow instance

    values: Instance URL

  • APP_BREEZEWIKIIntegration with external self-hosted Breezewiki instance

    Integration with external self-hosted Breezewiki instance

    values: Instance URL

  • APP_GOTHUBIntegration with external self-hosted Gothub instance

    Integration with external self-hosted Gothub instance

    values: Instance URL

  • APP_INVIDIOUSIntegration with external self-hosted Invidious instance

    Integration with external self-hosted Invidious instance

    values: Instance URL

  • APP_LIBRARIANIntegration with external self-hosted Librarian instance

    Integration with external self-hosted Librarian instance

    values: Instance URL

  • APP_LIBREMDBIntegration with external self-hosted Libremdb instance

    Integration with external self-hosted Libremdb instance

    values: Instance URL

  • APP_LIBREREDDITIntegration with external self-hosted Libreddit instance

    Integration with external self-hosted Libreddit instance

    values: Instance URL

  • APP_NITTERIntegration with external self-hosted Nitter instance

    Integration with external self-hosted Nitter instance

    values: Instance URL

  • APP_PROXITOKIntegration with external self-hosted ProxiTok instance

    Integration with external self-hosted ProxiTok instance

    values: Instance URL

  • APP_QUETREIntegration with external self-hosted Quetre instance

    Integration with external self-hosted Quetre instance

    values: Instance URL

  • APP_RIMGOIntegration with external self-hosted Rimgo instance

    Integration with external self-hosted Rimgo instance

    values: Instance URL

  • APP_SCRIBEIntegration with external self-hosted Scribe instance

    Integration with external self-hosted Scribe instance

    values: Instance URL

  • APP_WIKILESSIntegration with external self-hosted Wikiless instance

    Integration with external self-hosted Wikiless instance

    values: Instance URL

  • CONFIG_BITTORRENT_TRACKERShttp://nyaa.tracker.wf:7777/announceBittorrent trackers

    Bittorrent trackers

    values: Tracker announce URLs

  • CONFIG_DISABLE_BITTORRENT_SEARCHfalseDefines whether bittorrent support will be enabled or disabled

    Defines whether bittorrent support will be enabled or disabled

    values: true, false

  • CONFIG_GOOGLE_DOMAINcomDefines which Google domain the search will be done

    Defines which Google domain the search will be done

    values: com, com.br, com.es, etc.

  • CONFIG_GOOGLE_LANGUAGEenDefines the language in which searches will be done

    Defines the language in which searches will be done

    values: pt, es, ru, etc.

  • CONFIG_HIDDEN_SERVICE_SEARCHfalseDefines whether hidden service search will be enabled or disabled

    Defines whether hidden service search will be enabled or disabled

    values: true, false

  • CONFIG_INVIDIOUS_INSTANCEhttps://invidious.namazso.euDefines the host that will be used to do video searches using invidious

    Defines the host that will be used to do video searches using invidious

    values: Any Invidious instance URL

  • CONFIG_WIKIPEDIA_LANGUAGEenAdds language support for Wikipedia results

    Adds language support for Wikipedia results

    values: pt, es, hu, etc.

  • CURLOPT_CUSTOMREQUESTGETHTTP method for curl

    HTTP method for curl

    values: GET, HEAD, OPTIONS

  • CURLOPT_ENCODINGEncoding for curl

    Encoding for curl

    values: string

  • CURLOPT_MAXREDIRS5Maximum redirects for curl

    Maximum redirects for curl

    values: number

  • CURLOPT_PROXYProxy IP and port

    Proxy IP and port

    values: 127.0.0.1:8080

  • CURLOPT_PROXY_ENABLEDfalseEnable proxy for curl requests

    Enable proxy for curl requests

    values: true, false

  • CURLOPT_RETURNTRANSFERtrueCurl return transfer option

    Curl return transfer option

    values: true, false

  • CURLOPT_TIMEOUT18Maximum time curl will wait for a response

    Maximum time curl will wait for a response

    values: number (seconds)

  • CURLOPT_USERAGENTMozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36User-Agent string for curl requests

    User-Agent string for curl requests

    values: string

  • CURLOPT_VERBOSEfalseEnable verbose curl output

    Enable verbose curl output

    values: true, false

  • OPEN_SEARCH_DESCRIPTIONFramework and javascript free privacy respecting meta search engineOpenSearch XML description

    OpenSearch XML description

    values: string

  • OPEN_SEARCH_ENCODINGUTF-8OpenSearch XML encoding

    OpenSearch XML encoding

    values: UTF-8

  • OPEN_SEARCH_HOSThttp://localhost:8080Host used to identify Librex on the network

    Host used to identify Librex on the network

    values: string

  • OPEN_SEARCH_LONG_NAMELibrex SearchOpenSearch XML long name

    OpenSearch XML long name

    values: string

  • OPEN_SEARCH_TITLELibreXOpenSearch XML title

    OpenSearch XML title

    values: string

  • PGID1000Group ID for file permissions

    Group ID for file permissions

    values: numeric GID

  • PUID1000User ID for file permissions

    User ID for file permissions

    values: numeric UID

  • TZAmerica/New_YorkTimezone for the container

    Timezone for the container

    values: Any valid TZ database timezone

  • VERSIONdockerVersion identifier

    Version identifier

    values: string

More in Search Engines

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…