Self-hosting
Self-hosting Beta
Machine requirements, ports, host names, TLS certificates and the commands to try O3O Office Online on Docker in a few minutes.
This page describes a beta feature: it works but may still change.
On this page
This page brings O3O Office Online up on a Docker host: machine requirements, ports, host names, certificates and the commands for a first run in a few minutes. Every service and environment variable is described in Compose file and environment variables.
Machine requirements#
| Item | Requirement | Notes |
|---|---|---|
| Docker | Docker Engine on Linux, or Docker Desktop with the Linux engine; Docker Compose v2 (the docker compose command) | Verified on Docker Desktop 29, Linux engine. |
| CPU architecture | x86_64 (amd64) | Other architectures: not tested. |
| CPU and RAM for a test machine | Suggested minimum 4 cores, 8 GB of RAM for Docker | Sizing per number of connections: not measured yet. |
| Disk | Suggested 25 GB free for images and data | Data lives in Docker volumes. |
| Windows | Docker Desktop with WSL2 | WSL2 only uses part of the machine's RAM by default; raise the limit in .wslconfig if containers get killed for lack of memory. |
Ports#
| Port | Service | Published | Notes |
|---|---|---|---|
8080 (O3O_PROXY_PORT) | o3o-proxy | yes | The single entry point, HTTP. |
8081 (O3O_NEXTCLOUD_PORT) | o3o-nextcloud | yes, nextcloud profile only | For trying the Nextcloud integration. |
| 9980 | o3o-online | no | Editing server; only the proxy and the gate talk to it. |
| 8070 | o3o-gate | no | Reached through the proxy at /o3o/. |
| 8060 | o3o-docbuilder | no | Reached through the proxy at /v1/. |
| 3306, 6379 | o3o-nextcloud-db, o3o-nextcloud-redis | no | nextcloud profile only. |
When another service already holds port 8080 or 8081, change O3O_PROXY_PORT or O3O_NEXTCLOUD_PORT, then update O3O_PUBLIC_URL and O3O_ONLINE_SERVER_NAME to match.
First run in a few minutes#
# 1. Get the O3O Office sources (the online/ folder holds the Docker bundle)
git clone <O3O Office repository URL> o3o-office
cd o3o-office
# 2. Build the gate and DocBuilder images; the build context is always online/
docker build -f online/gate/Dockerfile -t o3o/gate:dev online
docker build -f online/docbuilder/Dockerfile -t o3o/docbuilder:dev online
# 3. Create .env for a DEV machine: the script copies .env.example and replaces every CHANGE_ME with a random string (PowerShell: scripts\gen-secrets.ps1 -Dev)
cd online
bash scripts/gen-secrets.sh --dev
# 4. Start
docker compose --env-file .env -f docker/compose.dev.yml up -d
docker compose --env-file .env -f docker/compose.dev.yml ps
# 5. Check
curl -s http://localhost:8080/o3o/healthz
curl -s http://localhost:8080/o3o/status | jq '{edition, dev_image, upstream, connections: .connections.enforcing}'
curl -s http://localhost:8080/v1/status | jq '{version, core, workers}'- The editing server needs roughly 10 to 20 seconds to become ready; until then
/o3o/statusmay reportupstream.coolwsd = "down". - The secret generator is mandatory: the
nextcloudprofile cannot start while.envstill containsCHANGE_ME. --devsetsO3O_DEV_MODE=1andO3O_EMBED_ALLOW_UNSIGNED=1: openhttp://localhost:8080/o3o/demoto try the embedded editor on a sample file. Without--dev,.envkeeps the sample file's safe values (both0); use that on production machines.- Run the script with
bash, notsh: it uses bash syntax.
Adding Nextcloud to try the integration#
cd online
DC="docker compose --env-file .env -f docker/compose.dev.yml --profile nextcloud"
# Start with Nextcloud, MariaDB and Redis
$DC up -d
# Wait until it returns "installed": true
curl -s http://localhost:8081/status.php
# Quick way: the script runs every step below, then creates a test user and sample files
bash scripts/setup-nextcloud.sh
# Or by hand (DEV machine only). Always pass --callback-url: without it activate-config resets wopi_callback_url to empty
$DC exec -u www-data o3o-nextcloud php occ app:install richdocuments
$DC exec -u www-data o3o-nextcloud php occ config:app:set richdocuments wopi_allowlist --value=""
$DC exec -u www-data o3o-nextcloud php occ config:app:set richdocuments disable_certificate_verification --value=yes
$DC exec -u www-data o3o-nextcloud php occ richdocuments:activate-config \
--wopi-url=http://o3o-online:9980 --callback-url=http://o3o-nextcloud
# Must be http://localhost:8080 (richdocuments derives it from discovery; never set it by hand)
$DC exec -u www-data o3o-nextcloud php occ config:app:get richdocuments public_wopi_urlHost names and DNS#
O3O_ONLINE_SERVER_NAMEis the publichost[:port]users type; it decides the editor path in/hosting/discovery.O3O_PUBLIC_URLis the matchingscheme://host[:port], without a trailing/.- The file store (for example Nextcloud) must produce a WOPISrc that the
o3o-onlineCONTAINER can reach.localhostinside a container is the container itself: use the internal service name (http://o3o-nextcloud) orhost.docker.internal. O3O_ONLINE_ALIASGROUP2must contain the exact origin of the WOPISrc. Items after the comma are regular expressions: write dots as\..- An embedding page on another origin: set
O3O_ONLINE_FRAME_ANCESTORS(a single value, no spaces).
TLS certificates#
o3o-proxy only listens on HTTP. Certificates live on the outer proxy (nginx, Traefik or a load balancer) in front of port 8080; the editing server always runs with ssl.enable=false. When users arrive over https, set all three variables:
O3O_PUBLIC_URL=https://office.example.com
O3O_ONLINE_SERVER_NAME=office.example.com
O3O_ONLINE_SSL_TERMINATION=trueOuter proxy samples with WebSocket support: Reverse proxy. Calls between containers (WOPI, internal callbacks) use http inside the Docker network, so they need no certificate of their own.