# Copyright (c) 2021 Changkun Ou . All Rights Reserved. # Unauthorized using, copying, modifying and distributing, via any # medium is strictly prohibited. # Copy this file to .env and fill it in. The server needs everything # below; the CLI needs only the Telegram pair and the AUTH_* block. # ── Server ─────────────────────────────────────────────────────────── # Address to listen on. VOID_PORT=:8088 # Public origin. The login callback defaults to /void/.auth/callback. VOID_HOST=https://changkun.de # The metadata store. void has its own database and its own role on the # PostgreSQL instance changkun/proxy runs; redir's role must not be able # to read it, because the rows hold file decryption keys. Create both # once on the instance: # # CREATE ROLE void LOGIN PASSWORD '...'; # CREATE DATABASE void OWNER void; # # The schema is applied at start up, so the database and the role are all # that must exist beforehand. VOID_DB=postgres://void:void@postgres:5432/void?sslmode=disable # ── Blob store ─────────────────────────────────────────────────────── # The Telegram bot and chat file content is stored in. Needed by both the # server and the CLI: the CLI pushes content itself, so the bytes never # pass through the server. VOID_TG_BOTTOKEN= VOID_TG_CHATID= # ── Login ──────────────────────────────────────────────────────────── # Base URL of the auth service. AUTH_URL=https://auth.latere.ai # The OAuth client registered for this deployment. void registers its own # rather than reusing redir's: the session cookie carries the "__Host-" # prefix and is scoped to an origin, so a shared client would hand one # service's session to the other. # # The client needs: # - redirect_uris containing /void/.auth/callback # - allowed_origins containing # - the device authorization grant enabled, which is what `void login` # uses. Both are registration properties, not configuration. AUTH_CLIENT_ID= # Optional. A confidential client sends a secret; a public client relies # on PKCE and leaves this empty. AUTH_CLIENT_SECRET= # Required for a public client: the key the session cookie is encrypted # with. Generate one with `openssl rand -hex 32`. Without it the server # refuses to enable login rather than encrypt sessions under a known key. AUTH_COOKIE_KEY= # Optional. Defaults to /void/.auth/callback, which is correct # unless the service is reached under a different public name. Set it # when developing locally, e.g. http://localhost:8088/void/.auth/callback. AUTH_REDIRECT_URL= # Optional. Defaults to __Host-void-session. The "__Host-" prefix scopes # a cookie to an origin rather than to a path, and changkun.de serves # redir under /s/ as well, so each service needs a name of its own. Set # this only if a third service on the same origin claims that one too. AUTH_COOKIE_NAME= # Optional. Drops the Secure flag so sessions survive a local plain HTTP # run. Never set this on a deployment. AUTH_INSECURE_COOKIES= # Who may use this deployment, comma separated. Entries are matched case # insensitively against the token's email or principal id. A valid token # only proves who is calling; this list decides whether they may store # and read files. Leaving it empty rejects every login. VOID_ALLOWED_PRINCIPALS= # ── CLI ────────────────────────────────────────────────────────────── # Optional. The server the CLI talks to. A production build defaults to # https://changkun.de/void. VOID_ENDPOINT=