Hello. I am trying to use libreoffice to convert a docx to pdf inside my self-hosted n8n instance. I am running it in Docker compose, on Hostingers servers.
I am experiencing an issue:
I cannot seem to install libreoffice into my docker image.
I am trying to build the image from the image “docker.n8n.io/n8nio/n8n:2.2.4”.
I have tried installing libreoffice in the Dockerfile via apk (because the id in the machine says that its alpine based) and when that didnt work I tried apt. When using either of these options, the program cannot find neither apk, nor apt. I have tried asking both chatgpt and the n8n docs for help, but they couldnt find a case like this…
If anyone has any ideas, I would be very thankful.
Describe the problem/error/question
What is the error message (if any)?
Please share your workflow
Share the output returned by the last node
{
“errorMessage”: “Command failed: sh -c ‘libreoffice --headless --convert-to pdf --outdir /files /files/document1.docx’\n\nsh: libreoffice: not found\n”,
“errorDetails”: {},
“n8nDetails”: {
“nodeName”: “Use libreoffice to convert docx to pdf”,
“nodeType”: “n8n-nodes-base.executeCommand”,
“nodeVersion”: 1,
“itemIndex”: 0,
“time”: “1/8/2026, 4:20:49 PM”,
“n8nVersion”: “2.2.4 (Self Hosted)”,
“binaryDataMode”: “filesystem”,
“stackTrace”: [
“NodeOperationError: Command failed: sh -c ‘libreoffice --headless --convert-to pdf --outdir /files /files/document1.docx’”,
“”,
“sh: libreoffice: not found”,
“”,
" at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@[email protected]_asn1.js@5_8da18263ca0574b0db58d4fefd8173ce/node_modules/n8n-nodes-base/nodes/ExecuteCommand/ExecuteCommand.node.ts:102:12)“,
" at WorkflowExecute.executeNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_ec37920eb95917b28efaa783206b20f3/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1045:8)”,
" at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_ec37920eb95917b28efaa783206b20f3/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1226:11)“,
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_ec37920eb95917b28efaa783206b20f3/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1662:27”,
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_ec37920eb95917b28efaa783206b20f3/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2297:11"
]
}
}
Information on your n8n setup
- n8n version: 2.2.4
- Database (default: SQLite): default
- n8n EXECUTIONS_PROCESS setting (default: own, main): default
- Running n8n via (Docker, npm, n8n cloud, desktop app): Docker or Hostinger
- Operating system: Linux