Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 35fddbfcbc | |||
| 15211509a6 |
+2
-3
@@ -32,7 +32,6 @@ FRONTEND_URL=https://cloud.example.com
|
|||||||
MAX_UPLOAD_SIZE_MB=500
|
MAX_UPLOAD_SIZE_MB=500
|
||||||
|
|
||||||
# OnlyOffice Document Server (optional)
|
# OnlyOffice Document Server (optional)
|
||||||
# Oeffentliche HTTPS-URL unter der OnlyOffice im Browser erreichbar ist
|
# Eigene Subdomain mit HTTPS, z.B. https://office.example.com
|
||||||
|
# JWT wird automatisch vom JWT_SECRET_KEY oben verwendet
|
||||||
ONLYOFFICE_URL=
|
ONLYOFFICE_URL=
|
||||||
# Muss mit JWT_SECRET im OnlyOffice-Container uebereinstimmen
|
|
||||||
ONLYOFFICE_JWT_SECRET=
|
|
||||||
|
|||||||
@@ -121,32 +121,22 @@ Let's Encrypt Zertifikat erstellen:
|
|||||||
certbot --nginx -d cloud.example.com
|
certbot --nginx -d cloud.example.com
|
||||||
```
|
```
|
||||||
|
|
||||||
### OnlyOffice Document Server (optional)
|
### OnlyOffice Document Server
|
||||||
|
|
||||||
Fuer die Bearbeitung von Word, Excel und PowerPoint Dateien direkt im Browser.
|
Fuer die Bearbeitung von Word, Excel und PowerPoint Dateien direkt im Browser. OnlyOffice benoetigt eine eigene Subdomain mit HTTPS.
|
||||||
|
|
||||||
**1. docker-compose.yml - OnlyOffice-Service aktivieren:**
|
**1. .env - OnlyOffice URL setzen:**
|
||||||
|
|
||||||
```yaml
|
|
||||||
# In docker-compose.yml auskommentieren:
|
|
||||||
onlyoffice:
|
|
||||||
image: onlyoffice/documentserver:latest
|
|
||||||
environment:
|
|
||||||
- JWT_ENABLED=true
|
|
||||||
- JWT_SECRET=${ONLYOFFICE_JWT_SECRET}
|
|
||||||
volumes:
|
|
||||||
- ./data/onlyoffice/logs:/var/log/onlyoffice
|
|
||||||
- ./data/onlyoffice/data:/var/www/onlyoffice/Data
|
|
||||||
restart: unless-stopped
|
|
||||||
```
|
|
||||||
|
|
||||||
**2. .env - OnlyOffice konfigurieren:**
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
ONLYOFFICE_URL=https://office.example.com
|
ONLYOFFICE_URL=https://office.example.com
|
||||||
ONLYOFFICE_JWT_SECRET=ein-sicheres-secret-hier
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Das JWT-Secret wird automatisch vom `JWT_SECRET_KEY` verwendet - kein extra Secret noetig.
|
||||||
|
|
||||||
|
**2. docker-compose.yml - OnlyOffice-Service aktivieren:**
|
||||||
|
|
||||||
|
Der OnlyOffice-Service ist in der `docker-compose.yml` bereits vorbereitet. Er nutzt den gleichen `JWT_SECRET_KEY` aus der `.env`.
|
||||||
|
|
||||||
**3. Nginx - Eigene Subdomain fuer OnlyOffice:**
|
**3. Nginx - Eigene Subdomain fuer OnlyOffice:**
|
||||||
|
|
||||||
```nginx
|
```nginx
|
||||||
@@ -167,12 +157,14 @@ server {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**4. Starten:**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
certbot --nginx -d office.example.com
|
certbot --nginx -d office.example.com
|
||||||
docker-compose up -d
|
docker-compose up --build -d
|
||||||
```
|
```
|
||||||
|
|
||||||
**Ohne OnlyOffice** werden Office-Dateien in einer einfachen Vorschau angezeigt (nur Lesen). **Mit OnlyOffice** erhaelt man einen vollwertigen Editor (wie Google Docs).
|
**Ohne OnlyOffice** (`ONLYOFFICE_URL` leer) werden Office-Dateien in einer einfachen Vorschau angezeigt. **Mit OnlyOffice** erhaelt man einen vollwertigen Editor (wie Google Docs).
|
||||||
|
|
||||||
## Verwendung
|
## Verwendung
|
||||||
|
|
||||||
|
|||||||
@@ -381,7 +381,7 @@ def onlyoffice_config(file_id):
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Sign with JWT if secret is set
|
# Sign with JWT if secret is set
|
||||||
jwt_secret = os.environ.get('ONLYOFFICE_JWT_SECRET', '')
|
jwt_secret = os.environ.get('JWT_SECRET_KEY', '')
|
||||||
if jwt_secret:
|
if jwt_secret:
|
||||||
import jwt as pyjwt
|
import jwt as pyjwt
|
||||||
config['config']['token'] = pyjwt.encode(config['config'], jwt_secret, algorithm='HS256')
|
config['config']['token'] = pyjwt.encode(config['config'], jwt_secret, algorithm='HS256')
|
||||||
|
|||||||
@@ -155,7 +155,6 @@ def get_settings():
|
|||||||
'system_email_from': AppSettings.get('system_email_from', ''),
|
'system_email_from': AppSettings.get('system_email_from', ''),
|
||||||
'onlyoffice_url': os.environ.get('ONLYOFFICE_URL', ''),
|
'onlyoffice_url': os.environ.get('ONLYOFFICE_URL', ''),
|
||||||
'onlyoffice_configured': bool(os.environ.get('ONLYOFFICE_URL', '')),
|
'onlyoffice_configured': bool(os.environ.get('ONLYOFFICE_URL', '')),
|
||||||
'onlyoffice_jwt_set': bool(os.environ.get('ONLYOFFICE_JWT_SECRET', '')),
|
|
||||||
}), 200
|
}), 200
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -20,7 +20,7 @@ services:
|
|||||||
- "8080:80"
|
- "8080:80"
|
||||||
environment:
|
environment:
|
||||||
- JWT_ENABLED=true
|
- JWT_ENABLED=true
|
||||||
- JWT_SECRET=${ONLYOFFICE_JWT_SECRET}
|
- JWT_SECRET=${JWT_SECRET_KEY}
|
||||||
volumes:
|
volumes:
|
||||||
- ./data/onlyoffice/logs:/var/log/onlyoffice
|
- ./data/onlyoffice/logs:/var/log/onlyoffice
|
||||||
- ./data/onlyoffice/data:/var/www/onlyoffice/Data
|
- ./data/onlyoffice/data:/var/www/onlyoffice/Data
|
||||||
|
|||||||
@@ -95,15 +95,15 @@
|
|||||||
<code>{{ onlyofficeUrl }}</code>
|
<code>{{ onlyofficeUrl }}</code>
|
||||||
</div>
|
</div>
|
||||||
<div class="info-row">
|
<div class="info-row">
|
||||||
<span class="label">JWT Secret:</span>
|
<span class="label">JWT:</span>
|
||||||
<Tag :value="onlyofficeJwtSet ? 'Gesetzt' : 'Fehlt!'" :severity="onlyofficeJwtSet ? 'success' : 'danger'" />
|
<span>Nutzt JWT_SECRET_KEY aus .env</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="restore-instructions" style="margin-top: 1rem">
|
<div class="restore-instructions" style="margin-top: 1rem">
|
||||||
<strong>Konfiguration ueber <code>.env</code>:</strong>
|
<strong>Konfiguration ueber <code>.env</code>:</strong>
|
||||||
<pre style="background: var(--p-surface-100); padding: 0.75rem; border-radius: 4px; font-size: 0.85rem; margin: 0.5rem 0">ONLYOFFICE_URL=https://office.deine-domain.de
|
<pre style="background: var(--p-surface-100); padding: 0.75rem; border-radius: 4px; font-size: 0.85rem; margin: 0.5rem 0">ONLYOFFICE_URL=https://office.deine-domain.de</pre>
|
||||||
ONLYOFFICE_JWT_SECRET=dein-secret-hier</pre>
|
<p class="hint">JWT wird automatisch vom <code>JWT_SECRET_KEY</code> verwendet - kein extra Secret noetig.</p>
|
||||||
<strong>Setup-Schritte:</strong>
|
<strong>Setup-Schritte:</strong>
|
||||||
<ol>
|
<ol>
|
||||||
<li>In <code>docker-compose.yml</code> den <code>onlyoffice</code>-Service aktivieren</li>
|
<li>In <code>docker-compose.yml</code> den <code>onlyoffice</code>-Service aktivieren</li>
|
||||||
@@ -551,7 +551,6 @@ const smtpForm = ref({
|
|||||||
const smtpPasswordSet = ref(false)
|
const smtpPasswordSet = ref(false)
|
||||||
const onlyofficeConfigured = ref(false)
|
const onlyofficeConfigured = ref(false)
|
||||||
const onlyofficeUrl = ref('')
|
const onlyofficeUrl = ref('')
|
||||||
const onlyofficeJwtSet = ref(false)
|
|
||||||
const smtpTesting = ref(false)
|
const smtpTesting = ref(false)
|
||||||
|
|
||||||
// Backup & Restore
|
// Backup & Restore
|
||||||
@@ -661,7 +660,6 @@ async function loadSettings() {
|
|||||||
smtpPasswordSet.value = res.data.system_smtp_password_set
|
smtpPasswordSet.value = res.data.system_smtp_password_set
|
||||||
onlyofficeConfigured.value = res.data.onlyoffice_configured
|
onlyofficeConfigured.value = res.data.onlyoffice_configured
|
||||||
onlyofficeUrl.value = res.data.onlyoffice_url || ''
|
onlyofficeUrl.value = res.data.onlyoffice_url || ''
|
||||||
onlyofficeJwtSet.value = res.data.onlyoffice_jwt_set
|
|
||||||
} catch { /* first load, defaults */ }
|
} catch { /* first load, defaults */ }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user