2023-09-01 15:45:16 +03:00
|
|
|
# Configuring
|
|
|
|
|
|
|
|
txtdot can be configured either with environment variables
|
|
|
|
or with the `.env` file in the working directory which has higher priority.
|
|
|
|
For sample config, see [`.env.example`](https://github.com/TxtDot/txtdot/blob/main/.env.example).
|
|
|
|
|
2024-05-27 12:34:37 +03:00
|
|
|
## Server Settings
|
|
|
|
|
|
|
|
### HOST
|
2023-09-01 15:45:16 +03:00
|
|
|
|
|
|
|
Default: `0.0.0.0`
|
|
|
|
|
|
|
|
Host where HTTP server should listen for connections.
|
|
|
|
Set it to `127.0.0.1` if your txtdot instance is behind reverse proxy,
|
|
|
|
`0.0.0.0` otherwise.
|
|
|
|
|
2024-05-27 12:34:37 +03:00
|
|
|
### PORT
|
2023-09-01 15:45:16 +03:00
|
|
|
|
|
|
|
Default: `8080`
|
|
|
|
|
|
|
|
Port where HTTP server should listen for connections.
|
|
|
|
|
2024-05-27 12:34:37 +03:00
|
|
|
### Timeout
|
|
|
|
|
|
|
|
Default: `0`
|
|
|
|
|
|
|
|
Max response time in milliseconds. If it's reached, the request is aborted. If set to `0`, the timeout is disabled.
|
|
|
|
|
|
|
|
### REVERSE_PROXY
|
2023-09-01 15:45:16 +03:00
|
|
|
|
|
|
|
Default: `false`
|
|
|
|
|
|
|
|
Set it to `true` only if your txtdot instance runs behind reverse proxy.
|
|
|
|
Needed for processing X-Forwarded headers.
|
2023-09-25 12:00:24 +03:00
|
|
|
|
2024-05-27 12:34:37 +03:00
|
|
|
## Proxy
|
|
|
|
|
|
|
|
### PROXY_RES
|
2023-09-25 12:00:24 +03:00
|
|
|
|
|
|
|
Default: `true`
|
|
|
|
|
|
|
|
Whether to allow proxying images, video, audio
|
|
|
|
and everything else through your txtdot instance.
|
|
|
|
|
2024-05-27 12:34:37 +03:00
|
|
|
### IMG_COMPRESS
|
|
|
|
|
|
|
|
Default: `true`
|
|
|
|
|
|
|
|
Whether to compress images through your txtdot instance.
|
|
|
|
|
|
|
|
## Documentation
|
|
|
|
|
|
|
|
### SWAGGER
|
2023-09-25 12:00:24 +03:00
|
|
|
|
|
|
|
Default: `false`
|
|
|
|
|
|
|
|
Whether to add `/doc` route for Swagger API docs.
|
2024-05-27 12:34:37 +03:00
|
|
|
|
|
|
|
## Third-party
|
|
|
|
|
|
|
|
### SEARX_URL
|
|
|
|
|
|
|
|
SearXNG base URL, if set, txtdot will use it for searching and add search form to the page with /search route.
|
|
|
|
|
|
|
|
### WEBDER_URL
|
|
|
|
|
|
|
|
Webder base URL, if set, txtdot will use it for rendering web pages.
|