Archived
1
0
This repository has been archived on 2023-08-12. You can view files and clone it, but cannot push or open issues or pull requests.
nntpchan/doc/srnd.md

143 lines
4.3 KiB
Markdown
Raw Permalink Normal View History

2016-06-04 23:59:04 +05:00
`srnd.ini`
==========
2015-10-07 23:04:50 +05:00
2016-06-05 13:12:50 +05:00
`srnd.ini` is the configuration file for your NNTPChan node. Some configuration can be done initially through the web-interface (for now hopefully) but there is more that can be done by tweaking your `srnd.ini` file.
Below is the default state of the file. We will explain each section below.
````
[nntp]
instance_name=test.srndv2.tld
bind=127.0.0.1:1199
sync_on_start=1
allow_anon=0
allow_anon_attachments=0
allow_attachments=1
require_tls=1
anon_nntp=0
2016-06-20 20:18:19 +05:00
feeds=/etc/nntpchan/feeds.d
2016-07-04 11:27:56 +05:00
archive=0
2016-06-05 13:12:50 +05:00
[pprof]
enable=0
bind=127.0.0.1:17000
[crypto]
tls-keyname=overchan
tls-hostname=!!put-hostname-or-ip-of-server-here
tls-trust-dir=certs
[articles]
store_dir=articles
incoming_dir=/tmp/articles
attachments_dir=webroot/img
thumbs_dir=webroot/thm
convert_bin=/usr/bin/convert
ffmpegthumbnailer_bin=/usr/bin/ffmpeg
sox_bin=/usr/bin/sox
compression=0
[database]
type=postgres
schema=srnd
host=/var/run/postgresql
2016-06-05 13:12:50 +05:00
[cache]
type=null
2016-06-05 13:12:50 +05:00
[frontend]
enable=1
allow_files=1
regen_on_start=0
regen_threads=1
bind=[::]:18000
name=web.srndv2.test
webroot=webroot
prefix=/
static_files=contrib
templates=contrib/templates/default
translations=contrib/translations
locale=en
domain=localhost
json-api=0
json-api-username=fucking-change-this-value
json-api-password=seriously-fucking-change-this-value
api-secret=RTZP5JZ2XGYCY===
````
2017-04-04 18:01:43 +05:00
## `[nntp]`
2016-06-05 13:12:50 +05:00
All NNTP server-related settings.
2017-04-04 18:01:43 +05:00
#### instance_name
2016-06-05 13:12:50 +05:00
This is the name for your NNTP server. I don't really know what the point of it is, but hey its there (FIXME).
2017-04-04 18:01:43 +05:00
#### bind
2016-06-05 13:12:50 +05:00
This is where you put the address and port that you would like the NNTP server to run on where `x` is the address and `y` is the port in `bind=x:y`.
2017-04-04 18:01:43 +05:00
#### sync_on_start
2016-06-05 13:12:50 +05:00
* When this is set to `1` your NNTP server will sync articles with its peers on startup.
* When this is set to `0` then no syncing will take place on startup.
2016-06-05 13:12:50 +05:00
2017-04-04 18:01:43 +05:00
#### allow_anon
2016-06-05 13:12:50 +05:00
* When this is set to `1`, posts made from anonymizing networks will be synced from peers.
* When this is set to `0`, posts made from anonymizing networks will not be synced from peers.
2016-06-05 13:12:50 +05:00
2017-04-04 18:01:43 +05:00
#### allow_anon_attachments
2016-06-05 13:12:50 +05:00
* When this is set to `1`, attachments posted from anonymizing networks will be syncdd from peers.
* When this is set to `0`, attachments posted from anonymizing networks will not be synced from peers.
Nodes with `allow_anon_attachments` disabled will not receive threads with images posted from anonymizing networks. Likewise, the thread replies will not sync. In the case where an anonymized user posts an image reply and the node has `allow_anon_attachments` disabled, text posts without attachments replying to the non-synced image post will appear to be "ghosted".
2016-06-05 13:12:50 +05:00
2017-04-04 18:01:43 +05:00
#### allow_attachments
2016-06-05 13:12:50 +05:00
2016-06-19 10:12:33 +05:00
* When this is set to `1` posters may attach images to their posts.
2016-06-05 13:12:50 +05:00
* When this is set to `0` posters may not attach images to their posts.
2017-04-04 18:01:43 +05:00
#### require_tls
2016-06-05 13:12:50 +05:00
* When this is set to `1` then any NNTP connection to this server will need to use TLS.
* When this is set to `0` then any NNTP connection to this server will not need to use TLS (but it could? - FIXME)
2017-04-04 18:01:43 +05:00
#### anon_nntp
2016-06-05 13:12:50 +05:00
2016-06-19 10:12:33 +05:00
* When this is set to `1`, the SRNdv2 server will send unauthenticated peers its articles.
* When this is set to `0`, peers will need to be authenticated to sync articles.
2016-06-05 13:12:50 +05:00
2017-04-04 18:01:43 +05:00
#### feeds
2016-06-20 20:21:46 +05:00
* Feeds configurations can optionally be stored in a directory of your choosing (the default is `feeds.d` in the working directory). Any ini files located in this directory will be loaded.
2016-06-20 20:18:19 +05:00
2017-04-04 18:01:43 +05:00
#### archive
* When this is set to `1`, the daemon will never expire posts.
2016-07-04 11:27:56 +05:00
* When this is set to `0`, the daemon will delete old posts. FIXME: under what conditions?
2016-06-20 20:18:19 +05:00
2017-04-04 18:01:43 +05:00
## `[pprof]`
2016-06-05 13:12:50 +05:00
All pprof-related settings.
2017-04-04 18:01:43 +05:00
#### enable
2016-06-05 13:12:50 +05:00
2016-06-19 10:12:33 +05:00
* When this is set to `1` pprof is enabled.
* When this is set to `0` pprof is disabled.
2016-06-05 13:12:50 +05:00
2017-04-04 18:01:43 +05:00
#### bind
2016-06-05 13:12:50 +05:00
2016-06-19 10:12:33 +05:00
* Bind to an address and port for use with `go tool pprof`
2017-04-04 18:01:43 +05:00
## `[frontend]`
2017-04-04 18:01:43 +05:00
##### minimize_html
2016-07-07 22:04:19 +05:00
* `0`: Do not minimize HTML
* `1`: Minimize HTML
2016-06-20 14:59:03 +05:00
2017-04-04 18:01:43 +05:00
## Placing configuration elsewhere
2016-06-20 14:59:03 +05:00
2017-04-04 18:01:43 +05:00
By default, `srnd.ini` must be placed in the working directory (wherever you have the `srndv2` binary). If you want to place the `srnd.ini` config file elsewhere, you can define an environment varialbe in the `~/.profile` for the user that runs `srndv2`.
2016-06-20 14:59:03 +05:00
If you would like to use, for example, `/etc/nntpchan/my_srnd_config.ini`, simply add `export SRND_INI_PATH=/etc/nntpchan/my_srnd_config.ini` to `~/.profile`.