7 unstable releases (3 breaking)

new 0.5.7 Feb 19, 2025
0.5.6 Feb 17, 2025
0.4.0 Feb 17, 2025
0.3.0 Feb 13, 2025
0.1.0 Feb 11, 2025

#996 in Network programming

Download history 85/week @ 2025-02-05 736/week @ 2025-02-12

821 downloads per month
Used in pubky-testnet

MIT license

225KB
4.5K SLoC

Pkarr Relay

A server that functions as a pkarr relay.

Usage

Build

cargo build --release

Optionally Copy config file

cp src/config.example.toml config.toml

Run with an optional config file

../target/release/pkarr-relay --config=./config.toml

You can customize logging levels

../target/release/pkarr-relay --config=./config.toml -t=pkarr=debug,tower_http=debug

Using Docker

To build and run the Pkarr relay using Docker, this repository has a Dockerfile in the top level. You could use a small docker-compose.yml such as:

services:
  pkarr:
    container_name: pkarr
    build: .
    volumes: 
      - ./config.toml:/config.toml
      - .pkarr_cache:/cache
    command: pkarr-relay --config=/config.toml

Alternatively, lunch docker correctly attaching the config.toml as a volume in the right location. In the example above .pkarr_cache relative directory is used to permanently store pkarr cached keys.

An example ./config.toml can be copied from ./src/config.example.toml and customized as needed.

This will make the Pkarr relay accessible at http://localhost:6881.

Dependencies

~30–45MB
~792K SLoC