ONLYOFFICE DocumentServer: Difference between revisions
imported>Onny Add initial page |
m Vuhoanghuynh02 moved page Onlyoffice-Documentserver to ONLYOFFICE DocumentServer: Misspelled title |
||
(7 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
[https://www.onlyoffice.com/ | [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 | 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"; | ||
jwtSecretFile = config.age.secrets.onlyoffice-jwt.path; | |||
}; | }; | ||
</nowiki>}} | </nowiki>}} | ||
Line 16: | Line 17: | ||
=== 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 | 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> | ||
services.nginx.virtualHosts."localhost".listen = [ { addr = "127.0.0.1"; port = 8080; } ]; | services.nginx.virtualHosts."localhost".listen = [ { addr = "127.0.0.1"; port = 8080; } ]; | ||
</nowiki>}} | </nowiki>}} | ||
=== Caddy web server === | |||
{{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, a configuration for [[Caddy]] might look like this | |||
{{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 = { | |||
virtualHosts = { | |||
"office.example.org".extraConfig = '' | |||
reverse_proxy http://127.0.0.1:8000 { | |||
# Required to circumvent bug of Onlyoffice loading mixed non-https content | |||
header_up X-Forwarded-Proto https | |||
} | |||
''; | |||
}; | |||
}; | |||
</nowiki>}} | |||
The reverse_proxy configuration directly forwards all requests to the ONLYOFFICE server, ignoring the default Nginx vhost. | |||
[[Category:Server]] | [[Category:Server]] | ||
[[Category:Web Applications]] | [[Category:Web Applications]] |
Latest revision as of 05:38, 22 August 2024
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 following examples for PHP, Node.js, etc.
Installation
A minimal example to get a ONLYOFFICE DocumentServer running on localhost should look like this
/etc/nixos/configuration.nix
services.onlyoffice = {
enable = true;
hostname = "localhost";
jwtSecretFile = config.age.secrets.onlyoffice-jwt.path;
};
Configuration
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:
/etc/nixos/configuration.nix
services.nginx.virtualHosts."localhost".listen = [ { addr = "127.0.0.1"; port = 8080; } ];
Caddy web server
Instead of using the default Nginx web server, a configuration for Caddy might look like this
/etc/nixos/configuration.nix
services.nginx.enable = lib.mkForce false;
users.users.nginx = {
group = "nginx";
isSystemUser = true;
};
users.groups.nginx = {};
services.caddy = {
virtualHosts = {
"office.example.org".extraConfig = ''
reverse_proxy http://127.0.0.1:8000 {
# Required to circumvent bug of Onlyoffice loading mixed non-https content
header_up X-Forwarded-Proto https
}
'';
};
};
The reverse_proxy configuration directly forwards all requests to the ONLYOFFICE server, ignoring the default Nginx vhost.