ONLYOFFICE DocumentServer: Difference between revisions

imported>SuperSandro2000
Add warning when using caddy
Raboof (talk | contribs)
Installation: document you want secrets management
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[https://www.onlyoffice.com/ Onlyoffice Documentserver] is a full-featured backend for editing different office documents like Open Document, Word, Excel, etc. online in your browser. The software is open source and can be easily deployed and integrated into existing server software. Available frontends are [[Nextcloud]] or the Onlyoffice CommunityServer. It can be also used in own software, see [https://github.com/ONLYOFFICE/document-server-integration following examples] for PHP, Nodejs, etc.
[https://www.onlyoffice.com/ ONLYOFFICE DocumentServer] is a full-featured backend for editing different office documents like Open Document, Word, Excel, etc. online in your browser. The software is open source and can be easily deployed and integrated into existing server software. Available frontends are [[Nextcloud]] or the ONLYOFFICE CommunityServer. It can also be used in own software, see [https://github.com/ONLYOFFICE/document-server-integration following examples] for PHP, Node.js, etc.


== Installation ==
== Installation ==


A minimal example to get a Onlyoffice Documentserver running on localhost should look like this
A minimal example to get a ONLYOFFICE DocumentServer running on localhost should look like this


{{file|/etc/nixos/configuration.nix|nix|<nowiki>
{{file|/etc/nixos/configuration.nix|nix|<nowiki>
Line 9: Line 9:
   enable = true;
   enable = true;
   hostname = "localhost";
   hostname = "localhost";
  securityNonceFile = "${pkgs.writeText "nixos-test-onlyoffice-nonce.conf" ''
    set $secure_link_secret "nixostest";
  ''}";
};
};
</nowiki>}}
</nowiki>}}Note the example above leaks the secret into your nix store - you should review a [[Comparison of secret managing schemes|secrets management approach]] and make sure you pick a unique secret. 


== Configuration ==
== Configuration ==
Line 16: Line 19:
=== Change default listening port ===
=== Change default listening port ===


In case port 80 is already used by a different application or you're using a different web server than [[Nginx]], which is used by the Onlyoffice module, you can change the listening port with the following option:  
In case port 80 is already used by a different application, or you're using a different web server than [[Nginx]], which is used by the ONLYOFFICE module, you can change the listening port with the following option:  


{{file|/etc/nixos/configuration.nix|nix|<nowiki>
{{file|/etc/nixos/configuration.nix|nix|<nowiki>
Line 26: Line 29:
{{warning|Onlyoffice is very particular about it headers and if there are some missing or different than what upstream expects, a seemingly completely unrelated portion of the software like font rendering can break. The module maintainer can only fully support nginx as this is the only webserver upstream supplies config files for in their docker image}}
{{warning|Onlyoffice is very particular about it headers and if there are some missing or different than what upstream expects, a seemingly completely unrelated portion of the software like font rendering can break. The module maintainer can only fully support nginx as this is the only webserver upstream supplies config files for in their docker image}}


Instead of using the default [[Nginx]] web server, an configuration for [[Caddy]] might look like this
Instead of using the default [[Nginx]] web server, a configuration for [[Caddy]] might look like this


{{file|/etc/nixos/configuration.nix|nix|<nowiki>
{{file|/etc/nixos/configuration.nix|nix|<nowiki>
services.nginx.enable = lib.mkForce false;
users.users.nginx = {
  group = "nginx";
  isSystemUser = true;
};
users.groups.nginx = {};
services.caddy = {
services.caddy = {
   virtualHosts = {
   virtualHosts = {
Line 41: Line 51:
</nowiki>}}
</nowiki>}}


The reverse_proxy configuration directly forwards all requests to the Onlyoffice server, ignoring the default Nginx vhost.
The reverse_proxy configuration directly forwards all requests to the ONLYOFFICE server, ignoring the default Nginx vhost.
 
== Troubleshooting ==
When using the documentserver from Nextcloud, saving the settings on the Nextcloud UI ("Administration Settings" -> Administration -> ONLYOFFICE)" triggers a round-trip test.


There are two services: onlyoffice-docservice.service and onlyoffice-converter.service. These need to be started after each other: onlyoffice-docservice.service (currently) generates configuration files in /run/onlyoffice, which can take a while. onlyoffice-converter.service then picks these up and uses them.
[[Category:Server]]
[[Category:Server]]
[[Category:Applications]]
[[Category:Web Applications]]
[[Category:Web Applications]]