Skip to main content

Configuration

This guide details all available configuration options for Ygégé.

config.json File

The main configuration file is config.json. It should be placed at the project root (manual installation) or mounted via a Docker volume.

Complete Structure

{
"bind_ip": "0.0.0.0",
"bind_port": 8715,
"log_level": "info",
"tmdb_token": null,
"use_tor": false,
"tor_proxy": "127.0.0.1:9050"
}

Available Options

Network Configuration

ParameterTypeDefaultDescription
bind_ipstring0.0.0.0Listening IP address
bind_portnumber8715Server listening port
Custom Port

To avoid port conflicts (e.g., on Windows), simply change BIND_PORT:

environment:
BIND_PORT: "3000" # Use port 3000 instead of 8715
ports:
- "3000:3000"

The healthcheck automatically adapts using $${BIND_PORT:-8715}.

Logging

ParameterTypeDefaultDescription
log_levelstringinfoLog verbosity level

Available levels:

  • trace: Maximum details (development)
  • debug: Debug information
  • info: General information
  • warn: Warnings only
  • error: Errors only

TMDB/IMDB Metadata

ParameterTypeDefaultDescription
tmdb_tokenstringnullTMDB API key (optional)
info

When tmdb_token is configured, both TMDB and IMDB resolvers are automatically enabled.

Tor Support

ParameterTypeDefaultDescription
use_torbooleanfalseRoute relay connections through Tor
tor_proxystring127.0.0.1:9050SOCKS5 Tor proxy address
info

When use_tor is enabled, all Nostr relay connections are routed through the Tor proxy. Tor must be installed and running on your machine.

Environment Variables

All options can also be set via environment variables:

Variableconfig.json equivalent
BIND_IPbind_ip
BIND_PORTbind_port
LOG_LEVELlog_level
TMDB_TOKENtmdb_token
USE_TORuse_tor
TOR_PROXYtor_proxy
Priority

Environment variables have priority over config.json file.

Complete Configuration Example

For Docker Compose

services:
ygege:
image: uwucode/ygege:latest
container_name: ygege
restart: unless-stopped
ports:
- "8715:8715"
environment:
LOG_LEVEL: "info"
TMDB_TOKEN: "your_tmdb_token" # Optional
# USE_TOR: "true" # Optional: enable Tor
# TOR_PROXY: "127.0.0.1:9050" # Optional: alternative Tor proxy

For config.json File

{
"bind_ip": "0.0.0.0",
"bind_port": 8715,
"log_level": "info",
"tmdb_token": "your_tmdb_token",
"use_tor": false,
"tor_proxy": "127.0.0.1:9050"
}

Configuration Validation

To verify your configuration is correct, check the logs at startup:

docker logs ygege

You should see:

INFO Ygégé v0.x.x (commit: ..., branch: ..., built: ...)
INFO Tor routing disabled — connecting to relays directly
INFO Ranking Nostr relays by latency...
INFO Relay order: 1. wss://relay.ygg.gratis
INFO Categories initialized: 9 top-level categories

Next Steps