Testing with the built-in example app¶
Euro-Office ships a Node.js example application that lets you open and edit documents in the browser. It is intended for testing and verification only — do not expose it on a public server.
Step 1 — Start the example service¶
Expected output: active
Step 2 — Configure the example app¶
The example app needs to know its own URL so the document server can fetch and save files correctly. Edit /etc/euro-office/documentserver-example/local.json:
sudo tee /etc/euro-office/documentserver-example/local.json > /dev/null << 'EOF'
{
"server": {
"siteUrl": "/",
"exampleUrl": "http://YOUR_SERVER_IP/example",
"token": {
"enable": true,
"secret": "REPLACE_WITH_YOUR_JWT_SECRET",
"authorizationHeader": "Authorization"
}
}
}
EOF
Replace YOUR_SERVER_IP with the server's IP address or hostname. Do not add a trailing slash.
localhost vs server IP
If you are running the server directly on your local machine (not in a container or VM), you can use http://localhost/example as the exampleUrl. In all other cases — including LXD/LXC containers, VMs, and remote servers — use the actual IP address. Using localhost in those environments causes the document server to generate malformed callback URLs.
Get the JWT secret:
Then restart the example service:
Step 3 — Open the example in your browser¶
You should see a file list. Click Create to open a blank document in the editor.
Running on a non-standard port¶
If nginx is configured to listen on a port other than 80, update two settings:
1. nginx listen port — edit /etc/euro-office/documentserver/nginx/ds.conf:
2. exampleUrl — update /etc/euro-office/documentserver-example/local.json:
Then reload nginx and restart the example: