Skip to content

Commit bab12bf

Browse files
committed
docs: update installation for PUID/PGID and add troubleshooting section
- Update Docker Compose files to default PUID/PGID to 1000 - Add note about SECURE_COOKIES for non-SSL access in README and project site - Create dedicated Troubleshooting page in documentation site - Synchronize permissions documentation across all platforms
1 parent eac630e commit bab12bf

File tree

9 files changed

+94
-3
lines changed

9 files changed

+94
-3
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ internal/web/dist
6464

6565
# Development files
6666
prompt.txt
67-
.agent/
67+
# .agent/
6868
agent-bak/
6969
tmp/
7070
# *.svg

README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,11 @@ JWT_SECRET=your-super-secret-key-change-this
189189

190190
For a containerized setup, you can use Docker. We provide two configurations: one for standard CPU usage and one optimized for NVIDIA GPUs (CUDA).
191191

192+
> [!IMPORTANT]
193+
> **Permissions:** Ensure you set the `PUID` and `PGID` environment variables to your host user's UID and GID (typically `1000` on Linux) to avoid permission issues with the SQLite database. You can find your UID/GID by running `id` on your host.
194+
>
195+
> **HTTP vs HTTPS:** By default, Scriberr enables **Secure Cookies** in production. If you are accessing the app via plain HTTP (not HTTPS), you MUST set `SECURE_COOKIES=false` in your environment variables, otherwise you will encounter "Unable to load audio stream" errors.
196+
192197
#### Standard Deployment (CPU)
193198

194199
Use this configuration for running Scriberr on any machine without a dedicated NVIDIA GPU.
@@ -205,6 +210,8 @@ services:
205210
- scriberr_data:/app/data # volume for data
206211
- env_data:/app/whisperx-env # volume for models and python envs
207212
environment:
213+
- PUID=${PUID:-1000}
214+
- PGID=${PGID:-1000}
208215
- APP_ENV=production # DO NOT CHANGE THIS
209216
# CORS: comma-separated list of allowed origins for production
210217
# - ALLOWED_ORIGINS=https://your-domain.com
@@ -250,6 +257,8 @@ services:
250257
environment:
251258
- NVIDIA_VISIBLE_DEVICES=all
252259
- NVIDIA_DRIVER_CAPABILITIES=compute,utility
260+
- PUID=${PUID:-1000}
261+
- PGID=${PGID:-1000}
253262
- APP_ENV=production # DO NOT CHANGE THIS
254263
# CORS: comma-separated list of allowed origins for production
255264
# - ALLOWED_ORIGINS=https://your-domain.com
@@ -279,6 +288,39 @@ The application needs to:
279288

280289
You will know the application is ready when you see the line: `msg="Scriberr is ready" url=http://0.0.0.0:8080`.
281290

291+
### Troubleshooting
292+
293+
#### 1. SQLite OOM Error (out of memory)
294+
295+
If you see an "out of memory (14)" error from SQLite (specifically `SQLITE_CANTOPEN`), it usually means a permissions issue. The database engine cannot create temporary files in the data directory.
296+
297+
You can fix this by setting the `PUID` and `PGID` in your `docker-compose.yml` to match your host user's UID and GID, or by manually changing the ownership of the mapped folders on your host:
298+
299+
```bash
300+
# If you used a named volume (e.g., 'scriberr_scriberr_data'):
301+
sudo chown -R 1000:1000 /var/lib/docker/volumes/scriberr_scriberr_data/_data
302+
303+
# If you mapped a specific host folder (e.g., ./scriberr_data):
304+
sudo chown -R 1000:1000 ./scriberr_data
305+
sudo chown -R 1000:1000 ./env_data
306+
```
307+
308+
Replace `1000` with the value you set for `PUID`/`PGID` (default is `1000`).
309+
310+
#### 2. "Unable to load audio stream"
311+
312+
If the application loads but you cannot play or see the audio waveform (receiving "Unable to load audio stream"), this is often due to the **Secure Cookies** security flag.
313+
314+
By default, when `APP_ENV=production`, Scriberr enables `SECURE_COOKIES=true`. This prevents cookies from being sent over insecure (HTTP) connections.
315+
316+
**Solutions:**
317+
- **Recommended:** Deploy Scriberr behind a Reverse Proxy (like Nginx, Caddy, or Traefik) and use SSL/TLS (HTTPS).
318+
- **Alternative:** If you must access over plain HTTP, set the following environment variable in your `docker-compose.yml`:
319+
```yaml
320+
environment:
321+
- SECURE_COOKIES=false
322+
```
323+
282324
## Post installation
283325
284326
Once you have Scriberr up and running:

docker-compose.build.cuda.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ services:
2525
# - PORT=8080
2626
# - DATABASE_PATH=/app/data/scriberr.db
2727
# - UPLOAD_DIR=/app/data/uploads
28-
- PUID=${PUID:-10001}
29-
- PGID=${PGID:-10001}
28+
- PUID=${PUID:-1000}
29+
- PGID=${PGID:-1000}
3030
# Security: already set in container, but can be overridden
3131
- APP_ENV=production
3232
# CORS: comma-separated list of allowed origins for production

docker-compose.cuda.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ services:
1919
environment:
2020
- NVIDIA_VISIBLE_DEVICES=all
2121
- NVIDIA_DRIVER_CAPABILITIES=compute,utility
22+
- PUID=${PUID:-1000}
23+
- PGID=${PGID:-1000}
2224
# Security: already set in container, but can be overridden
2325
- APP_ENV=production
2426
# CORS: comma-separated list of allowed origins for production

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ services:
77
- scriberr_data:/app/data
88
- env_data:/app/whisperx-env
99
environment:
10+
- PUID=${PUID:-1000}
11+
- PGID=${PGID:-1000}
1012
# Security: already set in container, but can be overridden
1113
- APP_ENV=production
1214
# CORS: comma-separated list of allowed origins for production

web/project-site/src/App.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import Features from './docs/Features.mdx';
77
import Usage from './docs/Usage.mdx';
88
import Diarization from './docs/Diarization.mdx';
99
import Installation from './docs/Installation.mdx';
10+
import Troubleshooting from './docs/Troubleshooting.mdx';
1011
import ApiPage from './pages/ApiPage';
1112

1213
function App() {
@@ -23,6 +24,7 @@ function App() {
2324
<Route path="usage" element={<Usage />} />
2425
<Route path="diarization" element={<Diarization />} />
2526
<Route path="installation" element={<Installation />} />
27+
<Route path="troubleshooting" element={<Troubleshooting />} />
2628
<Route path="*" element={<Introduction />} />
2729
</Routes>
2830
</DocsLayout>

web/project-site/src/docs/Installation.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ JWT_SECRET=your-super-secret-key-change-this
7777

7878
For a containerized setup, you can use Docker. We provide two configurations: one for standard CPU usage and one optimized for NVIDIA GPUs (CUDA).
7979

80+
> **Permissions:** Ensure you set the `PUID` and `PGID` environment variables to your host user's UID and GID (typically `1000` on Linux) to avoid permission issues with the SQLite database. You can find your UID/GID by running `id` on your host.
81+
>
82+
> **HTTP vs HTTPS:** By default, Scriberr enables **Secure Cookies** in production. If you are accessing the app via plain HTTP (not HTTPS), you MUST set `SECURE_COOKIES=false` in your environment variables, otherwise you will encounter "Unable to load audio stream" errors.
83+
8084
### Standard Deployment (CPU)
8185

8286
Use this configuration for running Scriberr on any machine without a dedicated NVIDIA GPU.
@@ -93,6 +97,8 @@ services:
9397
- scriberr_data:/app/data # volume for data
9498
- env_data:/app/whisperx-env # volume for models and python envs
9599
environment:
100+
- PUID=${PUID:-1000}
101+
- PGID=${PGID:-1000}
96102
- APP_ENV=production # DO NOT CHANGE THIS
97103
# CORS: comma-separated list of allowed origins for production
98104
# - ALLOWED_ORIGINS=https://your-domain.com
@@ -138,6 +144,8 @@ services:
138144
environment:
139145
- NVIDIA_VISIBLE_DEVICES=all
140146
- NVIDIA_DRIVER_CAPABILITIES=compute,utility
147+
- PUID=${PUID:-1000}
148+
- PGID=${PGID:-1000}
141149
- APP_ENV=production # DO NOT CHANGE THIS
142150
# CORS: comma-separated list of allowed origins for production
143151
# - ALLOWED_ORIGINS=https://your-domain.com
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Troubleshooting
2+
3+
Common issues and their solutions when setting up or running Scriberr.
4+
5+
## 1. SQLite OOM Error (out of memory)
6+
7+
If you see an "out of memory (14)" error from SQLite (specifically `SQLITE_CANTOPEN`), it usually means a permissions issue. The database engine cannot create temporary files in the data directory.
8+
9+
You can fix this by setting the `PUID` and `PGID` in your `docker-compose.yml` to match your host user's UID and GID, or by manually changing the ownership of the mapped folders on your host:
10+
11+
```bash
12+
# If you used a named volume (e.g., 'scriberr_scriberr_data'):
13+
sudo chown -R 1000:1000 /var/lib/docker/volumes/scriberr_scriberr_data/_data
14+
15+
# If you mapped a specific host folder (e.g., ./scriberr_data):
16+
sudo chown -R 1000:1000 ./scriberr_data
17+
sudo chown -R 1000:1000 ./env_data
18+
```
19+
20+
Replace `10001` with the value you set for `PUID`/`PGID` (default is `1000`).
21+
22+
## 2. "Unable to load audio stream"
23+
24+
If the application loads but you cannot play or see the audio waveform (receiving "Unable to load audio stream"), this is often due to the **Secure Cookies** security flag.
25+
26+
By default, when `APP_ENV=production`, Scriberr enables `SECURE_COOKIES=true`. This prevents cookies from being sent over insecure (HTTP) connections.
27+
28+
### Solutions:
29+
- **Recommended:** Deploy Scriberr behind a Reverse Proxy (like Nginx, Caddy, or Traefik) and use SSL/TLS (HTTPS).
30+
- **Alternative:** If you must access over plain HTTP, set the following environment variable in your `docker-compose.yml`:
31+
```yaml
32+
environment:
33+
- SECURE_COOKIES=false
34+
```

web/project-site/src/layouts/DocsLayout.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export function DocsLayout({ children }: DocsLayoutProps) {
2020
{ path: '/docs/installation', label: 'Installation' },
2121
{ path: '/docs/diarization', label: 'Diarization' },
2222
{ path: '/docs/usage', label: 'Usage Guide' },
23+
{ path: '/docs/troubleshooting', label: 'Troubleshooting' },
2324
];
2425

2526
return (

0 commit comments

Comments
 (0)