Skip to content
/ porla Public
forked from porla/porla

A high performance BitTorrent server.

Notifications You must be signed in to change notification settings

vktr/porla

 
 

Repository files navigation

Porla is a high-performance BitTorrent daemon

Porla is a powerful BitTorrent daemon with high performance and low memory usage. It is designed for headless operations on servers and seedboxes and can easily manage tens of thousands of torrents.

Getting started

Download the latest release and put it somewhere safe. Then, run it.

$ ./porla

To show all options available, suffix with --help.

$ ./porla --help

For example, you can run porla with an in-memory SQLite database by passing --db=:memory:.

$ ./porla --db=:memory:

Configuration

You can configure Porla in three ways - environment variables, command line arguments, and a TOML config file.

Command line arguments have the highest priority, then the config file, and lastly the environment variables. The app will, however, run without any applied configuration and use sensible defaults instead.

Environment variables and command line args

  • PORLA_CONFIG_FILE or --config-file - path to a TOML config file with additional configuration.
  • PORLA_DB or --db - path a file (which does not need to exist) that porla will use to store its state.
  • PORLA_HTTP_AUTH_TOKEN or --http-auth-token - set to any random alphanumeric string to enable token authentication for the HTTP server.
  • PORLA_HTTP_HOST or --http-host - set to an IP address which to bind the HTTP server. Defaults to 127.0.0.1.
  • PORLA_HTTP_PORT or --http-port - set to the port to use for the HTTP server. Defaults to 1337.
  • PORLA_LOG_LEVEL or --log-level - the minimum log level to use. Valid values are trace, debug, info, warning, error, fatal. Defaults to info.
  • PORLA_SESSION_SETTINGS_BASE or --session-settings-base - the libtorrent settings base to use for session settings. Valid values are default, min_memory_usage, high_performance_seed. Defaults to default.
  • PORLA_TIMER_DHT_STATS or --timer-dht-stats - the interval in milliseconds to push DHT stats. Defaults to 5000.
  • PORLA_TIMER_SESSION_STATS or --timer-session-stats - the interval in milliseconds to push session stats. Defaults to 5000.
  • PORLA_TIMER_TORRENT_UPDATES or --timer-torrent-updates - the interval in milliseconds to push torrent state updates. Defaults to 1000.

Config file

db = ":memory:"
log_level = "info"

[http]
auth_token = "<random string>"
host = "127.0.0.1"
port = 1337

[session_settings]
base = "min_memory_usage"
extensions = [
   "smart_ban",
   "ut_metadata",
   "ut_pex"
]

[timer]
dht_stats = 5000
session_stats = 5000
torrent_updates = 1000

About

A high performance BitTorrent server.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 97.2%
  • CMake 2.6%
  • Dockerfile 0.2%