Skip to content

bookorbit ​

A self-hosted library and reading platform

Example ​

nix
{config, ...}: {
  nps.stacks.bookorbit = {
    enable = true;
    libraryPath = "/mnt/hdd/media/books";
    jwtSecretFile = config.sops.secrets."bookorbit/jwt_secret".path;
    podcastEncryptionKeyFile = config.sops.secrets."bookorbit/podcast_encryption_key".path;
    setupBootstrapTokenFile = config.sops.secrets."bookorbit/setup_bootstrap_token".path;
    db.passwordFile = config.sops.secrets."bookorbit/db_password".path;
    oidc = {
      registerClient = true;
      clientSecretHash = "$pbkdf2-sha512$...";
      userGroup = "bookorbit_user";
      adminGroup = "bookorbit_admin";
    };
    tts.enable = true;
  };
}

Stack Options ​

nps.stacks.bookorbit.db.passwordFile ​

Path to the file containing the database password for BookOrbit. Can be generated with openssl rand -hex 24.

Type
plaintext
absolute path
Declaration

nps.stacks.bookorbit.db.username ​

Database user name for BookOrbit.

Type
plaintext
string
Default
nix
"bookorbit"
Declaration

nps.stacks.bookorbit.enable ​

Whether to enable bookorbit.

Type
plaintext
boolean
Default
nix
false
Example
nix
true
Declaration

nps.stacks.bookorbit.extraEnv ​

Extra environment variables to set for the container. Variables can be either set directly or sourced from a file (e.g. for secrets).

See https://bookorbit.app/installation/#environment-variables

Type
plaintext
attribute set of (null or boolean or signed integer or string or absolute path or (submodule))
Default
nix
{ }
Declaration

nps.stacks.bookorbit.jwtSecretFile ​

Path to the file containing the secret that signs the login tokens. Can be generated with openssl rand -hex 32.

Type
plaintext
absolute path
Declaration

nps.stacks.bookorbit.libraryPath ​

Host directory where the book files are stored.

Type
plaintext
string
Default
nix
"${config.nps.storageBaseDir}/bookorbit/books"
Declaration

nps.stacks.bookorbit.oidc.adminGroup ​

Users of this group will be assigned admin rights.

In order to take effect, you will have to enter the value groups in the Group Claim form field in the BookOrbit UI.

Type
plaintext
string
Default
nix
"bookorbit_admin"
Declaration

nps.stacks.bookorbit.oidc.clientSecretHash ​

The client secret hash. For examples on how to generate a client secret, see

https://www.authelia.com/integration/openid-connect/frequently-asked-questions/#client-secret

The value can be passed in multiple ways:

  1. As a literal string
  2. As an absolute path to a file containing the hash (toFile)
  3. As an absolute oath to a file containing the client_secret, in which case the hash will be automatically computed (toHash)
Type
plaintext
string or (submodule)
Example
nix
# Literal String:
"$pbkdf2-sha512$310000$cbOAIWbfz3vCVXIPIp6d2A$J0klwULa6TvPRCU1HAfuKua/dMKTl8gbTYJz2N73ejGUu0LUGz/y3kwmJLuKuAYGg3WQOT0q9ZzVHHUvpKpgvQ"

# Client secret hash stored in a file
{ fromFile = config.sops.secrets."immich/client_secret_hash".path; }

# Client secret stored in a file: Hash will be computed dynamically
{ toHash = config.sops.secrets."immich/client_secret".path; }
Declaration

nps.stacks.bookorbit.oidc.registerClient ​

Whether to register a BookOrbit OIDC client in Authelia. If enabled you need to provide a hashed secret in the clientSecretHash option.

To enable OIDC Login for BookOrbit, you will have to enable it in the Web UI.

For details, see:

Type
plaintext
boolean
Default
nix
false
Declaration

nps.stacks.bookorbit.oidc.userGroup ​

Users of this group will be able to log in.

In order to take effect, you will have to enter the value groups in the Group Claim form field in the BookOrbit UI.

Type
plaintext
string
Default
nix
"bookorbit_user"
Declaration

nps.stacks.bookorbit.podcastEncryptionKeyFile ​

Path to the file containing the key that encrypts the podcast URLs.

Generate an independent key with openssl rand -hex 32 and keep it stable, otherwise previously issued podcast URLs become invalid.

Type
plaintext
null or absolute path
Default
nix
null
Declaration

nps.stacks.bookorbit.setupBootstrapTokenFile ​

Path to the file containing the token for the initial setup wizard. Can be generated with openssl rand -hex 16.

Type
plaintext
absolute path
Declaration

nps.stacks.bookorbit.tts.enable ​

Whether to enable Kokoro text-to-speech.

Type
plaintext
boolean
Default
nix
false
Example
nix
true
Declaration

Container Aliases ​

nps.stacks.bookorbit.containers.bookorbit ​

Alias of {option}services.podman.containers.bookorbit.

Type
plaintext
submodule
Declaration

nps.stacks.bookorbit.containers.bookorbit-db ​

Alias of {option}services.podman.containers.bookorbit-db.

Type
plaintext
submodule
Declaration

nps.stacks.bookorbit.containers.bookorbit-kokoro ​

Alias of {option}services.podman.containers.bookorbit-kokoro.

Type
plaintext
submodule
Declaration