Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 29 additions & 7 deletions docs/Advanced Configuration/Other Customisations.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
sidebar_position: 13
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Other Customisations

Stirling PDF offers various other customisation options, such as:
Expand All @@ -24,10 +27,29 @@ system:
In configs/Settings.yml

### Using an outgoing HTTP(S) proxy
To make Stirling PDF use an outgoing proxy server (e.g. for checking the license validity), the `JAVA_CUSTOM_OPTS` environment variable need to be used to set some Java properties:
```
-Dhttp.proxyHost=proxyserver -Dhttp.proxyPort=8888
-Dhttp.nonProxyHosts="localhost|127.0.0.1|127.0.1.1|127.0.0.0/8|::1|10.0.0.0/8|.svc|.cluster.local"
-Dhttps.proxyHost=proxyserver -Dhttps.proxyPort=888
-Dhttps.nonProxyHosts="localhost|127.0.0.1|127.0.1.1|127.0.0.0/8|::1|10.0.0.0/8|.svc|.cluster.local"
```
To make Stirling PDF use an outgoing proxy server (e.g. for checking the license validity):

<Tabs groupId="config-methods">
<TabItem value="env" label="Environment Variable">
```bash
JAVA_CUSTOM_OPTS="-Dhttp.proxyHost=proxyserver -Dhttp.proxyPort=8888 -Dhttp.nonProxyHosts='localhost|127.0.0.1|127.0.1.1|127.0.0.0/8|::1|10.0.0.0/8|.svc|.cluster.local' -Dhttps.proxyHost=proxyserver -Dhttps.proxyPort=8888 -Dhttps.nonProxyHosts='localhost|127.0.0.1|127.0.1.1|127.0.0.0/8|::1|10.0.0.0/8|.svc|.cluster.local'"
```
</TabItem>
<TabItem value="docker-run" label="Docker Run">
```bash
docker run -d \
-p 8080:8080 \
-e JAVA_CUSTOM_OPTS="-Dhttp.proxyHost=proxyserver -Dhttp.proxyPort=8888 -Dhttp.nonProxyHosts='localhost|127.0.0.1|127.0.1.1|127.0.0.0/8|::1|10.0.0.0/8|.svc|.cluster.local' -Dhttps.proxyHost=proxyserver -Dhttps.proxyPort=8888 -Dhttps.nonProxyHosts='localhost|127.0.0.1|127.0.1.1|127.0.0.0/8|::1|10.0.0.0/8|.svc|.cluster.local'" \
stirlingtools/stirling-pdf:latest
```
</TabItem>
<TabItem value="docker-compose" label="Docker Compose">
```yaml
services:
stirling-pdf:
image: stirlingtools/stirling-pdf:latest
environment:
JAVA_CUSTOM_OPTS: "-Dhttp.proxyHost=proxyserver -Dhttp.proxyPort=8888 -Dhttp.nonProxyHosts='localhost|127.0.0.1|127.0.1.1|127.0.0.0/8|::1|10.0.0.0/8|.svc|.cluster.local' -Dhttps.proxyHost=proxyserver -Dhttps.proxyPort=8888 -Dhttps.nonProxyHosts='localhost|127.0.0.1|127.0.1.1|127.0.0.0/8|::1|10.0.0.0/8|.svc|.cluster.local'"
```
</TabItem>
</Tabs>
121 changes: 75 additions & 46 deletions docs/Analytics-and-telemetry.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ sidebar_position: 9
title: Analytics and Telemetry
id: analytics-telemetry
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Analytics and Telemetry

Expand Down Expand Up @@ -137,16 +139,27 @@ Analytics are governed by a **global master toggle**, **component toggles**, and

Controls **all** analytics and whether a consent banner appears.

**Environment variable**
```bash
SYSTEM_ENABLEANALYTICS=false # true | false | (unset = null)
```

**settings.yml**
```yaml
system:
enableAnalytics: false # true | false | null (unset)
```
<Tabs groupId="config-methods">
<TabItem value="settings" label="Settings File">
```yaml
system:
enableAnalytics: false # true | false | null (unset)
```
</TabItem>
<TabItem value="env" label="Environment Variable">
```bash
SYSTEM_ENABLEANALYTICS=false # true | false | (unset = null)
```
</TabItem>
<TabItem value="docker-compose" label="Docker Compose">
```yaml
services:
stirling-pdf:
environment:
SYSTEM_ENABLEANALYTICS: false
```
</TabItem>
</Tabs>

**Behavior**
- `false`: Disables **all** analytics (no consent banner; PostHog & Scarf are off).
Expand All @@ -157,23 +170,37 @@ system:

Use these to selectively enable/disable providers **in addition** to the global toggle.

**PostHog**
```bash
SYSTEM_ENABLEPOSTHOG=false
```
```yaml
system:
enablePosthog: false # true | false | null
```

**Scarf tracking pixel**
```bash
SYSTEM_ENABLESCARF=false
```
```yaml
system:
enableScarf: false # true | false | null
```
**PostHog:**

<Tabs groupId="config-methods">
<TabItem value="settings" label="Settings File">
```yaml
system:
enablePosthog: false # true | false | null
```
</TabItem>
<TabItem value="env" label="Environment Variable">
```bash
SYSTEM_ENABLEPOSTHOG=false
```
</TabItem>
</Tabs>

**Scarf tracking pixel:**

<Tabs groupId="config-methods">
<TabItem value="settings" label="Settings File">
```yaml
system:
enableScarf: false # true | false | null
```
</TabItem>
<TabItem value="env" label="Environment Variable">
```bash
SYSTEM_ENABLESCARF=false
```
</TabItem>
</Tabs>

**Interaction**
- If `enableAnalytics` is `false`, everything is off regardless of component toggles.
Expand Down Expand Up @@ -201,25 +228,27 @@ When analytics are allowed globally (`system.enableAnalytics: true` or resolved

If you want to disable **all** analytics and telemetry (and suppress any consent prompts) at once:

**Environment variable**
```bash
SYSTEM_ENABLEANALYTICS=false
```

**settings.yml**
```yaml
system:
enableAnalytics: false
```

**Docker Compose example**
```yaml
services:
stirling-pdf:
environment:
- SYSTEM_ENABLEANALYTICS=false
# ... other configuration
```
<Tabs groupId="config-methods">
<TabItem value="settings" label="Settings File">
```yaml
system:
enableAnalytics: false
```
</TabItem>
<TabItem value="env" label="Environment Variable">
```bash
SYSTEM_ENABLEANALYTICS=false
```
</TabItem>
<TabItem value="docker-compose" label="Docker Compose">
```yaml
services:
stirling-pdf:
environment:
SYSTEM_ENABLEANALYTICS: false
```
</TabItem>
</Tabs>

---

Expand Down
70 changes: 56 additions & 14 deletions docs/Configuration/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ slug: /Configuration
title: Configuration Guide
description: Configure Stirling-PDF using environment variables, settings files, or in-app settings
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Configuration Guide

Expand Down Expand Up @@ -62,20 +64,45 @@ system:
### Authentication

Enable user login:
```bash
SECURITY_ENABLELOGIN=true
SECURITY_INITIALLOGIN_USERNAME=admin
SECURITY_INITIALLOGIN_PASSWORD=changeme123
```

<Tabs groupId="config-methods">
<TabItem value="settings" label="Settings File">
```yaml
security:
enableLogin: true
initialLogin:
username: admin
password: changeme123
```
</TabItem>
<TabItem value="env" label="Environment Variable">
```bash
SECURITY_ENABLELOGIN=true
SECURITY_INITIALLOGIN_USERNAME=admin
SECURITY_INITIALLOGIN_PASSWORD=changeme123
```
</TabItem>
</Tabs>

Default credentials: `admin` / `stirling` (change immediately after first login)

### Language & Localization

```bash
LANGS=en_GB # Available languages
SYSTEM_DEFAULTLOCALE=en-GB # Default language
```
<Tabs groupId="config-methods">
<TabItem value="settings" label="Settings File">
```yaml
langs: en_GB
system:
defaultLocale: en-GB
```
</TabItem>
<TabItem value="env" label="Environment Variable">
```bash
LANGS=en_GB # Available languages
SYSTEM_DEFAULTLOCALE=en-GB # Default language
```
</TabItem>
</Tabs>

**How language selection works:**

Expand Down Expand Up @@ -111,11 +138,26 @@ MODE=BOTH # Options: BOTH, FRONTEND, BACKEND

### File Upload Limits

```bash
SYSTEM_MAXFILESIZE=2000 # MB
SPRING_SERVLET_MULTIPART_MAX_FILE_SIZE=2000MB
SPRING_SERVLET_MULTIPART_MAX_REQUEST_SIZE=2000MB
```
<Tabs groupId="config-methods">
<TabItem value="settings" label="Settings File">
```yaml
system:
maxFileSize: 2000 # MB
spring:
servlet:
multipart:
max-file-size: 2000MB
max-request-size: 2000MB
```
</TabItem>
<TabItem value="env" label="Environment Variable">
```bash
SYSTEM_MAXFILESIZE=2000 # MB
SPRING_SERVLET_MULTIPART_MAX_FILE_SIZE=2000MB
SPRING_SERVLET_MULTIPART_MAX_REQUEST_SIZE=2000MB
```
</TabItem>
</Tabs>

### Memory Management

Expand Down
50 changes: 40 additions & 10 deletions docs/Configuration/Extra-Settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
sidebar_position: 12
title: Custom Settings Configuration
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Custom Settings Configuration

Expand Down Expand Up @@ -48,16 +50,44 @@ server:

Configure HTTPS for secure connections:

```yaml
server:
port: 8443 # Standard HTTPS port
ssl:
enabled: true
key-store: classpath:keystore.p12 # Path to keystore file
key-store-password: your-keystore-password
key-store-type: PKCS12 # Type of keystore
key-alias: tomcat # Alias of the certificate
```
<Tabs groupId="config-methods">
<TabItem value="settings" label="Settings File">
```yaml
server:
port: 8443 # Standard HTTPS port
ssl:
enabled: true
key-store: classpath:keystore.p12 # Path to keystore file
key-store-password: your-keystore-password
key-store-type: PKCS12 # Type of keystore
key-alias: tomcat # Alias of the certificate
```
</TabItem>
<TabItem value="env" label="Environment Variable">
```bash
SERVER_PORT=8443
SERVER_SSL_ENABLED=true
SERVER_SSL_KEY-STORE=classpath:keystore.p12
SERVER_SSL_KEY-STORE-PASSWORD=your-keystore-password
SERVER_SSL_KEY-STORE-TYPE=PKCS12
SERVER_SSL_KEY-ALIAS=tomcat
```
</TabItem>
<TabItem value="docker-compose" label="Docker Compose">
```yaml
services:
stirling-pdf:
image: stirlingtools/stirling-pdf:latest
environment:
SERVER_PORT: 8443
SERVER_SSL_ENABLED: true
SERVER_SSL_KEY-STORE: classpath:keystore.p12
SERVER_SSL_KEY-STORE-PASSWORD: your-keystore-password
SERVER_SSL_KEY-STORE-TYPE: PKCS12
SERVER_SSL_KEY-ALIAS: tomcat
```
</TabItem>
</Tabs>

### Creating a Self-Signed Certificate

Expand Down
32 changes: 26 additions & 6 deletions docs/Configuration/Fail2Ban.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,32 @@ Stirling-PDF logs failed authentication attempts to a log file which Fail2Ban mo
## Prerequisites
- Fail2Ban installed on your system
- Access to Stirling-PDF log directory
- Security settings configured in `/configs/settings.yml`:
```yaml
security:
enableLogin: true # Login must be enabled for Fail2Ban integration
loginAttemptCount: -1 # Set to -1 when using Fail2Ban recommended but not required
```
- Security settings configured:

<Tabs groupId="config-methods">
<TabItem value="settings" label="Settings File">
```yaml
security:
enableLogin: true # Login must be enabled for Fail2Ban integration
loginAttemptCount: -1 # Set to -1 when using Fail2Ban recommended but not required
```
</TabItem>
<TabItem value="env" label="Environment Variable">
```bash
SECURITY_ENABLELOGIN=true
SECURITY_LOGINATTEMPTCOUNT=-1
```
</TabItem>
<TabItem value="docker-compose" label="Docker Compose">
```yaml
services:
stirling-pdf:
environment:
SECURITY_ENABLELOGIN: true
SECURITY_LOGINATTEMPTCOUNT: -1
```
</TabItem>
</Tabs>

### Important Configuration Notes
- The `enableLogin` setting must be set to `true` as Fail2Ban integration requires authentication to be active
Expand Down
Loading