From 74aa0c0c138d708c2925804fcc9e7f52f1059390 Mon Sep 17 00:00:00 2001 From: Clarth Date: Tue, 1 Dec 2026 17:27:25 -0500 Subject: [PATCH] README: language tags and lead-ins for command blocks --- README.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 68007df..d656c02 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,9 @@ No database is needed, and it runs on any PHP 8.1+ setup with nginx or Apache. I 1. **Register an OIDC client in tinyauth.** Add a client to the tinyauth env file. The client ID and secret must match `config.php` in step 2: - ``` + Add these lines to the tinyauth env file: + + ```ini TINYAUTH_OIDC_CLIENTS_TINYAUTHWEB_CLIENTID=tinyauth-web TINYAUTH_OIDC_CLIENTS_TINYAUTHWEB_CLIENTSECRET= TINYAUTH_OIDC_CLIENTS_TINYAUTHWEB_NAME=tinyauth-web @@ -58,9 +60,9 @@ No database is needed, and it runs on any PHP 8.1+ setup with nginx or Apache. I Restart tinyauth afterwards. You can also add the client from the tool's **New OIDC client** form once it's running. -2. **Create `config.php`:** +2. **Create `config.php`** from the template: - ``` + ```bash cp config.example.php config.php ``` @@ -68,9 +70,9 @@ No database is needed, and it runs on any PHP 8.1+ setup with nginx or Apache. I 3. **Point the web server at `public/`.** Use HTTPS. See `examples/nginx/` for complete server blocks. -4. **Install the sudo rule** (as root): +4. **Install the sudo rule** (as root). The second command checks the file for syntax errors: - ``` + ```bash install -m 0440 sudoers/tinyauth-web.sudoers /etc/sudoers.d/tinyauth-web visudo -cf /etc/sudoers.d/tinyauth-web ``` @@ -79,14 +81,14 @@ No database is needed, and it runs on any PHP 8.1+ setup with nginx or Apache. I 5. **Let the web user edit the env file.** Keep the file owned by root, and make it writable by the web group only: - ``` + ```bash chgrp www-data /etc/tinyauth/tinyauth.env chmod 660 /etc/tinyauth/tinyauth.env ``` 6. **Set the directory and file permissions** (as root). PHP runs as `www-data`, so it must be able to read the code and config and write `data/`. Create `data/` yourself, because the checkout is usually owned by your own user: - ``` + ```bash install -d -o www-data -g www-data -m 0750 /path/to/tinyauth-web/data chown root:www-data /path/to/tinyauth-web/config.php chmod 640 /path/to/tinyauth-web/config.php