Skip to content
Merged
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
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ whitelabel-check: install ## Build with example overrides and grep for brand le
BRAND_COMPANY='Acme Inc.' \
BRAND_CLI=acme \
BRAND_PRODUCT_SLUG=acme \
BRAND_PACKAGE_PATH_NAME=acme \
BRAND_IMAGE=acme/documentserver \
BRAND_URL=https://acme.example \
BRAND_REPO=https://github.com/acme \
Expand Down
7 changes: 6 additions & 1 deletion brand.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
# 1. Edit the values below, OR
# 2. Set the matching BRAND_* environment variables at build time:
# BRAND_NAME, BRAND_SHORT_NAME, BRAND_TAGLINE, BRAND_COMPANY,
# BRAND_PRODUCT_SLUG, BRAND_CLI, BRAND_URL, BRAND_REPO, BRAND_DOCS_URL
# BRAND_PRODUCT_SLUG, BRAND_PACKAGE_PATH_NAME, BRAND_CLI, BRAND_URL,
# BRAND_REPO, BRAND_DOCS_URL
# 3. Replace docs/assets/logo.svg and docs/assets/favicon.svg with your own.
# 4. Override theme colors via BRAND_PRIMARY_COLOR / BRAND_ACCENT_COLOR
# (any Material palette name: indigo, deep purple, teal, blue, etc.).
Expand All @@ -18,6 +19,10 @@ brand:
tagline: Your sovereign office
company: Euro-Office
product_slug: eurooffice
# On-disk/package namespace used in install paths (/etc, /var/log, /var/www,
# /var/lib), the package/artifact name, and example container names.
# Branded builds differ here, e.g. nextcloud-office.
package_path_name: euro-office
cli: eurooffice
image: ghcr.io/euro-office/documentserver
url: https://euro-office.com
Expand Down
70 changes: 70 additions & 0 deletions docs/configuration/commands.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Command-line Tools

Euro-Office Document Server ships a set of `documentserver-*` helper scripts for
administration. On a package install they are on the `PATH` (in `/usr/bin`) and
run as root:

```bash
sudo documentserver-jwt-status.sh
```

In Docker, run them inside the container:

```bash
docker exec {{ brand.package_path_name }} documentserver-jwt-status.sh
```

## Available commands

| Command | Purpose |
|---|---|
| `documentserver-configure.sh` | Configure the database, message broker, Redis, JWT, and port. Package install only |
| `documentserver-jwt-status.sh` | Print the current JWT enabled state, secret, and header |
| `documentserver-generate-allfonts.sh` | Regenerate the font cache. See [Custom fonts](fonts.md) |
| `documentserver-pluginsmanager.sh` | Install and update editor plugins. See [Installing plugins](plugins.md) |
| `documentserver-flush-cache.sh` | Bump the cache tag so browsers reload editor assets |
| `documentserver-update-securelink.sh` | Set or rotate the nginx secure-link secret |
| `documentserver-static-gzip.sh` | Pre-compress static assets and enable nginx `gzip_static` |
| `documentserver-prepare4shutdown.sh` | Drain the server before a graceful shutdown or restart |
| `documentserver-letsencrypt.sh` | Obtain and configure a Let's Encrypt certificate |

## Common tasks

**Check JWT configuration** — confirm whether token validation is on and which secret is in use:

```bash
sudo documentserver-jwt-status.sh
```

**Configure connections** (package install) — point the server at external services:

```bash
sudo documentserver-configure.sh \
--databasetype postgres \
--databasehost db.internal \
--databasename eurooffice \
--databaseuser eurooffice \
--databasepassword your-password \
--jwtsecret at-least-32-chars-long-for-hs256
```

Run `documentserver-configure.sh --help` to see all options. The package
supports `postgres`, `mariadb`, and `mysql`.

**Issue a TLS certificate** — pass the contact email and domain:

```bash
sudo documentserver-letsencrypt.sh admin@example.com docs.example.com
```

**Rotate the secure-link secret** — omit the value to generate a random one:

```bash
sudo documentserver-update-securelink.sh --secure_link_secret a-random-secret-for-nginx-secure-link
```

**Drain before maintenance** — stop accepting new editing sessions before restarting:

```bash
sudo documentserver-prepare4shutdown.sh
```
42 changes: 42 additions & 0 deletions docs/configuration/fonts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Installing Custom Fonts

Euro-Office Document Server ships with a built-in font set. To make additional fonts available in the editors, add them to the server and regenerate the font cache.

Supported formats: TrueType (`.ttf`, `.tte`), OpenType (`.otf`, `.otc`, `.ttc`), and Web Open Font Format (`.woff`, `.woff2`).

## Bare-metal (deb/rpm)

1. Copy your font files to `/usr/share/fonts/`:

```bash
sudo cp myfont.ttf /usr/share/fonts/
```

2. Regenerate the font cache:

```bash
sudo documentserver-generate-allfonts.sh
```

The new fonts appear in the editor font list. No restart is required.

## Docker

Mount a host directory with your fonts into the container and let it regenerate the cache on startup:

```bash
docker run -d \
--name {{ brand.package_path_name }} \
--restart=unless-stopped \
-p 80:80 \
-e JWT_ENABLED=true \
-e JWT_SECRET=at-least-32-chars-long-for-hs256 \
-v /path/on/your/host/fonts:/usr/share/fonts/custom \
ghcr.io/euro-office/documentserver:latest
```

Fonts are picked up automatically because `GENERATE_FONTS` is enabled by default. To add fonts to a running container, drop the files into the host directory and restart it:

```bash
docker restart {{ brand.package_path_name }}
```
79 changes: 79 additions & 0 deletions docs/configuration/logging.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Logging

Euro-Office Document Server uses [log4js](https://log4js-node.github.io/log4js-node/)
for its server-side logs. You control how much is logged with the log level, and
read the output from per-service log files.

## Log level

The level is set in the log4js config:

```
/etc/{{ brand.package_path_name }}/documentserver/log4js/production.json
```

Change `categories.default.level` (default `WARN`) to one of the log4js levels,
from least to most verbose:

```
OFF · FATAL · ERROR · WARN · INFO · DEBUG · TRACE
```

```json
{
"categories": {
"default": { "appenders": ["default"], "level": "DEBUG" }
}
}
```

### Package install (deb/rpm)

Edit `production.json`, then restart the services to apply:

```bash
sudo systemctl restart ds-docservice ds-converter ds-metrics
```

### Docker

Do not edit the file by hand. Set the log level with an environment variable and
recreate the container; the entrypoint writes it into `production.json`:

```bash
docker run -d \
--name {{ brand.package_path_name }} \
--restart=unless-stopped \
-p 80:80 \
-e DS_LOG_LEVEL=DEBUG \
ghcr.io/euro-office/documentserver:latest
```

!!! warning
`DEBUG` and `TRACE` are verbose. Use them to diagnose a problem, then set the
level back to `WARN` for normal operation.

## Log files

Logs are written per service under `/var/log/{{ brand.package_path_name }}/documentserver/`:

| File | Component |
|---|---|
| `docservice/out.log`, `docservice/err.log` | DocService (collaboration server) |
| `converter/out.log` | FileConverter (document conversion) |
| `metrics/out.log` | Metrics |
| `adminpanel/out.log` | Admin panel |
| `nginx.access.log` | nginx access log |

### Viewing logs in Docker

The application logs are written to the files above inside the container, not to
`docker logs`. Tail them directly:

```bash
docker exec {{ brand.package_path_name }} tail -f /var/log/{{ brand.package_path_name }}/documentserver/docservice/out.log
```

To keep logs on the host, mount the log directory as a volume
(`-v /path/to/logs:/var/log/{{ brand.package_path_name }}/documentserver`) as shown in the
[Docker installation guide](../installation/docker.md#persistent-data).
115 changes: 115 additions & 0 deletions docs/configuration/plugins.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# Installing Plugins

Plugins extend the editors with extra panels and tools. Once installed on the
server, a plugin is available to all users of that document server. This guide
applies to self-hosted Euro-Office installations.

Plugins live in the `sdkjs-plugins` directory of the document server:

```
/var/www/{{ brand.package_path_name }}/documentserver/sdkjs-plugins/
```

## Finding plugins

!!! note "No app directory yet"

Euro-Office does not yet have an in-product app directory for browsing and
installing plugins. Until then, install plugins manually as described below.
For a curated list of plugins known to work with Euro-Office, see
[Plugins](../integration/plugins.md).

Because Euro-Office is a fork of ONLYOFFICE, plugins built for the ONLYOFFICE
editors are generally compatible. Each plugin is a folder containing a
`config.json` manifest and its assets. The upstream plugins are maintained
together in one repository, with each plugin under
[`sdkjs-plugins/content`](https://github.com/ONLYOFFICE/onlyoffice.github.io/tree/master/sdkjs-plugins/content)
(`wordscounter`, `thesaurus`, `translator`, and others). Before installing,
check that the plugin supports your editor version.

## Package install (deb/rpm)

1. Get the plugin folder you want. Since the upstream plugins live in a single
repository, clone it and copy the individual plugin into the plugins
directory:

```bash
git clone --depth 1 https://github.com/ONLYOFFICE/onlyoffice.github.io
sudo cp -r onlyoffice.github.io/sdkjs-plugins/content/wordscounter \
/var/www/{{ brand.package_path_name }}/documentserver/sdkjs-plugins/
```

For a plugin distributed in its own repository, clone it directly into a
folder under `sdkjs-plugins/` instead.

2. Register it and reload the editors:

```bash
sudo documentserver-pluginsmanager.sh
```

This fixes file ownership, restarts the document service, and flushes the
editor cache so the plugin appears.

## Docker

Mount the plugin from the host so it survives container recreation. Clone the
plugin folder to a directory on the host and bind-mount it into the document
server's `sdkjs-plugins` directory:

```bash
git clone --depth 1 https://github.com/ONLYOFFICE/onlyoffice.github.io
cp -r onlyoffice.github.io/sdkjs-plugins/content/wordscounter \
/path/on/your/host/plugins/wordscounter
```

```bash
docker run -d \
--name {{ brand.package_path_name }} \
--restart=unless-stopped \
-p 80:80 \
-e JWT_ENABLED=true \
-e JWT_SECRET=at-least-32-chars-long-for-hs256 \
-v /path/on/your/host/plugins/wordscounter:/var/www/{{ brand.package_path_name }}/documentserver/sdkjs-plugins/wordscounter \
ghcr.io/euro-office/documentserver:latest
```

Mount each plugin into its own subdirectory under `sdkjs-plugins/` rather than
mounting over the whole directory, which would hide the built-in plugins. After
starting the container, register the plugin so the editors pick it up:

```bash
docker exec {{ brand.package_path_name }} documentserver-pluginsmanager.sh
```

!!! tip
Mounting keeps the plugin on the host, so it persists when the container is
recreated. You only need to re-run the register command after recreating the
container.

## Per-user plugins from the editor

The above installs a plugin server-wide for every user. The editors also include
a built-in **Plugins** tab with a plugin manager, where individual users can add
plugins for their own session without server access. This is useful for testing
a plugin before deploying it for everyone.

## Removing a plugin

Remove the plugin's folder and re-register so the editors stop loading it.

=== "Package install"

```bash
sudo rm -rf /var/www/{{ brand.package_path_name }}/documentserver/sdkjs-plugins/wordscounter
sudo documentserver-pluginsmanager.sh
```

=== "Docker"

Remove the `-v` mount for the plugin and recreate the container, then delete
the plugin folder from the host:

```bash
rm -rf /path/on/your/host/plugins/wordscounter
```
Loading
Loading