Skip to main content
Version: Next

Documents — Setup

This page describes what administrators set up for the Documents app and its tools draw.io, Mind Mapping and EuroOffice.

Mind Mapping needs no setup. draw.io works without setup, but should use a self-hosted draw.io in production. EuroOffice needs a Document Server.

Environment Variables​

The variables are set for the EP user interface (ep_ui): in .env.local for a development server, or in the environment of the container. Restart the dev server or the container afterwards — the content security policy (which external editors the browser may load) is built from DRAWIO_URL and EUROOFFICE_DS_URL when ep_ui starts.

draw.io​

VariableMeaning
DRAWIO_URLAddress of a self-hosted draw.io as the browser reaches it, for example a container based on the image jgraph/drawio. Empty: the editor is loaded from https://embed.diagrams.net.
Set DRAWIO_URL in customer installations

Without DRAWIO_URL, the diagram data stays in the browser, but the editor code is loaded from an external server. This is meant for development only.

EuroOffice​

VariableMeaning
OFFICE_PROVIDERMain switch: eurooffice or onlyoffice. Empty: Office is switched off — the EuroOffice tool shows The office integration is not configured in this instance (OFFICE_PROVIDER)., and Edit in Office is not offered.
EUROOFFICE_DS_URLAddress of the Document Server as the browser reaches it, for example http://localhost:8085. If EP runs on HTTPS, this must be HTTPS as well.
EUROOFFICE_DS_INTERNAL_URLOptional. Address of the Document Server as the ep_ui server reaches it (used for the autosave command). Default: EUROOFFICE_DS_URL.
EUROOFFICE_JWT_SECRETThe same secret as JWT_SECRET of the Document Server, at least 32 characters.
OFFICE_HOST_INTERNAL_URLAddress of ep_ui as the Document Server reaches it — for downloading the file and for the save callback. For example http://ep-frontend:3000; with ep_ui running directly on the host during development http://host.docker.internal:3000 (or the IP of the WSL host). Default: NEXTAUTH_URL.
OFFICE_SESSION_SECRETOptional. Signs the Office session tokens. Default: NEXTAUTH_SECRET.
"Download failed" in the editor

This usually means that EUROOFFICE_DS_URL and OFFICE_HOST_INTERNAL_URL were mixed up: the first is the way from the browser to the Document Server, the second the way from the Document Server back to ep_ui.

EuroOffice Document Server in Docker​

Image: ghcr.io/euro-office/documentserver:latest. The server listens on port 80 inside the container; choose any free host port, for example 8085:80.

Environment variableValue
JWT_ENABLEDtrue
JWT_SECRETthe same value as EUROOFFICE_JWT_SECRET
JWT_HEADERAuthorization
ALLOW_PRIVATE_IP_ADDRESStrue — development only: needed if ep_ui runs under a private IP address. Do not set it in production.
DS_LOG_LEVELWARN
EXAMPLE_ENABLEDfalse

Volumes:

  • /var/lib/euro-office/documentserver
  • /var/www/euro-office/Data
  • /var/log/euro-office/documentserver

Further notes:

  • Health check: GET /healthcheck returns true.
  • First start: takes 1–2 minutes (fonts are prepared). Plan at least 4 GB of RAM.
  • Production: run the Document Server behind a reverse proxy with HTTPS, without ALLOW_PRIVATE_IP_ADDRESS.

Data Model​

The tools work with the entity type Document (document):

ElementMeaning
doc_numDocument number — required, unique, the key of the document.
doc_nameName of the document.
file_extensionFile extension without a leading dot, for example drawio.svg, mind-elixir.json or docx. It decides which tool opens the document. Optional string.
Relationship doc_has_files → fileThe files of the document (0..n). The relationship property is_primary_file marks the file that the tools open and save; is_preview marks the preview image.

There are no subtypes per tool — one type Document for all tools. A tool finds its documents by file_extension or, if that is empty, by the file name of the linked file.

Setting Up an Installation​

The bruno collection contains the requests:

  • Data model: "DM - Create Document" creates the type including file_extension. For existing installations, "DM - Delta Add file_extension to document" adds the property. Documents created before need a type upgrade; until then the tools cannot set the file extension on them — they still find them by the file name.
  • Menu: "Create Menu.yml" creates the sidebar group Documents with its four entries (All Documents, draw.io, Mind Mapping, EuroOffice). In existing installations, create them in the Menu Builder.
  • Example data: folder 300-Apps/306-Documents/03-Beispiele — one example document per tool (DOC-ARCH-0001, DOC-MM-0001, DOC-WORD-0001, DOC-XLSX-0001, DOC-PPTX-0001).

Office Templates​

New Office documents start from the templates in public/office-templates/<language>/new.docx, new.xlsx and new.pptx of ep_ui, with one folder per language (de-DE, en-US, it-IT, zh-CN). The template matches the language of the user interface (page format, fonts).

You can replace them with your own templates of the same name, for example in your corporate design.

Known Limitations​

  • Several ep_ui instances: ep_ui keeps track of open Office sessions in memory. With several ep_ui instances behind a load balancer without sticky sessions, opening a document on another instance can start a second editing session. The same happens after a restart of ep_ui, until the old session is closed.
  • Delay in other views: other places, for example a download from the Files tab, only see Office changes after the next autosave or after the editor was closed.