Skip to main content

Settings

A setting can come from four places. Later ones win:

  1. Defaults built into Threadshift
  2. redlib.toml, created by make setup
  3. Environment variables, such as .env for make local and Docker, or [vars] on Workers
  4. What admins save at /settings/instance, kept in overrides.toml (set its path with REDLIB_OVERRIDES_FILE; on Workers it's in KV)

Files and environment variables​

REDLIB_DEFAULT_THEME = "dark"

[ext.classic]
brand = "My Reddit" # logo text
logo = "" # logo image URL or data: URI ("" = built-in)

[ext.media]
grid = true # default for new browsers

Every key has an environment variable. Extension settings use REDLIB_EXT_<EXTENSION>_<KEY>, such as REDLIB_EXT_CLASSIC_BRAND or REDLIB_EXT_MEDIA_GRID=on. All options are listed in redlib.example.toml, with Redlib's own in .env.example. At startup the server prints every value it picked up.

Settings pages​

Every setting sits in one searchable sidebar at /settings.

GroupWhoWhat's in it
AppearanceEveryoneTheme (Reddit Classic, GitHub, Windows XP, Facebook Retro), mode (Auto, Light, Dark), width, sidebars, grid view
Front page, Posts, Comments, VideoEveryoneDefault feed and sorts, media options, comment display, video playback
Content filters, Subscriptions, SearchEveryoneHidden subreddits and users, NSFW and spoilers, your subscriptions, search suggestions
More, Backup, InfoEveryoneOther extension options; export and import your preferences; details about the instance
Site, Visitor defaults, Browser defaults, Server, Account togglesAdminsSettings for the whole instance (below)

Visitors' choices save as they make them: in their browser, or in their account while they're signed in. /settings/layout adds the layout editor.

Instance settings, Accounts group

Instance settings​

Admins sign in at /auth/login; the first admin comes from the first-run installer. Their groups apply to everyone:

GroupWhat it sets
SiteSite name and logo (REDLIB_EXT_CLASSIC_BRAND, REDLIB_EXT_CLASSIC_LOGO)
Visitor defaultsThe preferences new visitors start with (REDLIB_DEFAULT_*)
Browser defaultsThe extension options new browsers start with (REDLIB_EXT_*)
ServerThe server-wide switches below
Account togglesOptional sign-in; see Accounts
Server settingDefaultWhat it does
REDLIB_SFW_ONLYoffBlocks NSFW content for everyone
REDLIB_ROBOTS_DISABLE_INDEXINGonKeeps search engines out (robots.txt, noindex, and a 403 for known crawlers)
REDLIB_ENABLE_RSSoffAdds RSS feeds for subreddits and users
REDLIB_BANNERemptyA message shown on the front page and /info
REDLIB_FULL_URLemptyThe instance's public URL, used in links such as RSS feeds

Admins also get Users (/auth/users), to create accounts and reset passwords, and Database (/auth/database), which shows the account database and tests its connection.