Extra functionality such as user log-in and commands, are provided by an external API. For more details, see APIs.
{
"apis": [{
"name": "myapi",
"url": "http://localhost:5000"
}]
}
Privian comes with a default set of bangs (from DuckDuckGo), but you can customize them using the bangs
configuration option.
add
- (object) Custom bangs, see object example belowblacklist
- (string[]) Bangs that should not be availableenable
- (boolean) whether to enable bangswhitelist
- (string[]) Bangs that should be available (use either blacklist or whitelist, not both)Adding a custom bang:
{
"bangs": {
"add": {
"!custom": {
"label": "Custom bang",
"priority": 0,
"url": "https://example.com/search?q=%s"
}
}
}
}
Datasets are SQLite databases containing crawled and indexed data. These datasets contain data such as currency exchange rates, website privacy rating from PrivacySpy.org and world news. We periodically publish new updates to these datasets making sure your local installation stays up-to-date.
dir
- (string) Local directory path where datasets should be storeddisableRemoteSearcher
- (boolean) Whether to disable “remote searcher” functionality provided by storage.privian.io. Disabling this feature will force download of all configured datasets and search will be performed on their local copies.load
- (string[]) An array of URLs of the datasets to load.trustedOrigins
- (string[]) An array of origins which will be labeled as “official” or “trusted”.{
"datasets": {
"dir": null,
"disableRemoteSearcher": false,
"load": [
"https://storage.privian.io/63206a1a00027807f866/datasets/news.db",
"https://storage.privian.io/63206a1a00027807f866/datasets/ecb_rates.db",
"https://storage.privian.io/63206a1a00027807f866/datasets/privacyspy.org.db"
],
"trustedOrigins": ["https://storage.privian.io"]
}
}
Only for the multitenancy mode. Configures the name of the JWT cookie and the shared secret.
{
"jwt": {
"cookieName": "privianJwt",
"secret": "S0me.$ecret"
}
}
multitenancy
- (string | false) Possible values:{
"multitenancy": "lax"
}
Configures search and preview providers.
Supported search and suggestions providers:
Supported preview providers:
Imdb
Mdn
StackOverflow
Wikipedia
The Google provider can be configured to handle 429
status codes (captchas) with puppeteer. If you enable this features by providing the executablePath
, it will open a browser window when Google requests captcha.
executablePath
(string) - The path to the broswer executable (you can find yours using chrome://version/
)Privian caches various data such as suggestions, search results, and previews. By default, the data is stored in-memory using LRU cache. You can enable redis instead by providing the redis connection URL.
cache
:brotli
(boolean) - whether to compress data using BrotlihashKey
(boolean) - whether to hash key using SHA1url
(string) - connection string as redis://127.0.0.1:6379
Privian is intended to be a public-facing server application and as such, it will receve some bot traffic as well. Using these settings, you can catch automated scanners and temporarily ban the from accessing the application. The default settings block common scanners trying to locate wordpress admin pages.
catchUris
(string[]) - An array of URIs (paths) that lead to temporary ban of the client’s IP when accessing it.catchUserAgents
(stting[]) - An array of User Agents (partial strings) that lead to temporary ban of the client’s IP.config.json
{
"bangs": {
"add": null,
"blacklist": null,
"enable": true,
"whitelist": null
},
"providers": {
"load": [
"BingApi",
"Brave",
"Google",
"Calculator",
"Currency"
],
"preview": [
"Imdb",
"Mdn",
"StackOverflow",
"Wikipedia"
],
"search": [
"Google",
"Calculator",
"Currency"
],
"suggestions": [
"Google"
]
},
"puppeteer": {
"executablePath": ""
},
"redis": {
"cache": {
"brotli": true,
"hashKey": true
},
"url": ""
}
}