Hasty Paste II
  • Support The Project
  • 02 - Configuration

    Configuration of the app is done through environment variables. See the below options:

    TIP A secret can be generated using: openssl rand -base64 32

    KeyDescriptionDefault
    BIND__HOSTWhat interface to listen on127.0.0.1
    BIND__PORTWhat port to listen on8080
    OIDC__ENABLEDWhether OpenID/OAuth2 Is Enabledfalse
    OIDC__NAMEThe provider name (used for UI)-
    OIDC__ISSUER_URLThe OIDC issuer url-
    OIDC__CLIENT_IDThe client id-
    OIDC__CLIENT_SECRETThe client secret-
    PUBLIC_URLPublic URL where service can be accessed-
    BEHIND_PROXYWhether app is behind a reverse proxyfalse
    DB_URIURI for database connection-
    ATTACHMENTS_PATHwhere paste attachments will be stored-
    AUTH_TOKEN_SECRETbase64 encoded secret-
    AUTH_TOKEN_EXPIRYseconds until a token expires604800
    SESSION_SECRETbase64 encoded secret-
    SIGNUP_ENABLEDWhether to allow new accounts to be createdtrue
    INTERNAL_AUTH_ENABLEDWhether to allow login for internal accountstrue

    OIDC

    Single-Sign-On is handled via OpenID Connect and OAuth2. To use SSO you must have a compatible provider that supports the following features:

    • OpenID Connect (OIDC) Discovery - RFC5785
    • Claims
      • sub: the users id
      • name: a users full name
      • preferred_username: the users username, not the email
    • Scopes
      • openid
      • profile

    Depending on your SSO provider the issuer URL may be different, see below for examples:

    Authentik:

    https://{example.com}/application/o/{hasty-paste}/
    

    Database URI

    Database URIs have to be set in a specific format, see below examples:

    SQLite:

    sqlite://path/to/db.sqlite