bibliogram-docs/docs/Configuring.md -rw-r--r-- 2.9 KiB
f75e1092xnaas add bib.actionsack.com instance a month ago

#Configuring Bibliogram

#Quick start

The only mandatory setting is website_origin. Read the Files section of this guide to learn how to set it.

After you've set that, you can either walk away happily, or you can continue on through the rest of this page to learn about some interesting options.

#Command-line arguments

There is currently only one command-line option, --enable-repl, which enables Bibliogram's REPL. The REPL is also enabled if standard input is a terminal (detected with process.stdin.isTTY).


constants.js holds all the default settings and constants that Bibliogram needs to work. config.js starts out empty, and you can add your own key/value pairs to override data from constants.js. Since the config file is actually javascript code, key/value pairs are comma separated.

All of your settings must go inside the braces of module.exports = {}.

For example, to set the URL of your instance, you can make your file look like this:

module.exports = {
    website_origin: "https://bibliogram.example.com"

For nested settings, like Tor, the file should be formatted like this:

module.exports = {
    tor: {
        enabled: true

If there are multiple settings on the same level, you must insert a comma between them. Note the placement of the commas in this sample:

module.exports = {
    port: 10407,
    feeds: {
        enabled: false
    allow_user_from_reel: "prefer"

You should not modify constants.js itself, since your changes will block git pull. Hopefully, config.js will never be changed upstream, so you can get updates in peace.

#Fixing syntax errors

The file is run as JavaScript code and you can write any valid JavaScript. If you're stuck, try these tips:

  • Keys and values are separated by a colon :.
  • Different pairs are separated by a comma ,. The comma , is optional before a closing curly brace }.
  • Keys may contain any characters from [a-zA-Z0-9_]. To use a character not in this list, you must put double quotes " around the key.
  • All pairs must be inside the curly braces of module.exports = {}.

#Available settings

Open constants.js to see what settings are available and comments describing what they do. Hopefully, everything should be self-documenting.

Some entries in constants.js are for internal use in code and should never be changed by an instance owner. It should hopefully be obvious which ones these are.

If anything is unclear, please report an issue on the issue tracker.

#See also