Nextcloud: Difference between revisions
m Added config.dbtype to minimal example. New minimal example conforms to 25.05+ standard configuration. |
→App specific configuration: Memories Hardware Acceleration |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 15: | Line 15: | ||
config.dbtype = "sqlite"; | config.dbtype = "sqlite"; | ||
}; | }; | ||
</nowiki>|name=|lang=}} | </nowiki>|name=/etc/nixos/configuration.nix|lang=nix}} | ||
After that you will be able to login into your Nextcloud instance at <code><nowiki>http://localhost</nowiki></code> with user <code>root</code> and password <code>PWD</code> as configured above. | After that you will be able to login into your Nextcloud instance at <code><nowiki>http://localhost</nowiki></code> with user <code>root</code> and password <code>PWD</code> as configured above. | ||
| Line 490: | Line 490: | ||
=== Whiteboard === | === Whiteboard === | ||
The [https://github.com/nextcloud/whiteboard Whiteboard app] requires a running backend server which is also packaged in NixOS.<syntaxhighlight lang="nix"> | The [https://github.com/nextcloud/whiteboard Whiteboard app] requires a running backend server which is also packaged in NixOS.<syntaxhighlight lang="nix">environment.etc."nextcloud-whiteboard-secret".text = '' | ||
environment.etc."nextcloud-whiteboard-secret".text = '' | |||
JWT_SECRET_KEY=test123 | JWT_SECRET_KEY=test123 | ||
''; | ''; | ||
| Line 500: | Line 499: | ||
secrets = [ /etc/nextcloud-whiteboard-secret ]; | secrets = [ /etc/nextcloud-whiteboard-secret ]; | ||
}; | }; | ||
</syntaxhighlight>After applying the configuration configure the Nextcloud app to use it<syntaxhighlight lang="bash"> | |||
nextcloud-occ config:app:set whiteboard collabBackendUrl --value="http://localhost:3002" | # Expose whiteboard server in case you don’t operate your Nextcloud on localhost | ||
nextcloud-occ config:app:set whiteboard jwt_secret_key --value="test123" | services.nginx.virtualHosts.${config.services.nextcloud.hostName}.locations."/whiteboard/" = { | ||
</syntaxhighlight> | proxyPass = "http://localhost:3002/"; | ||
proxyWebsockets = true; | |||
};</syntaxhighlight>After applying the configuration configure the Nextcloud app to use it<syntaxhighlight lang="bash"> | |||
nextcloud-occ config:app:set whiteboard collabBackendUrl --value="http://localhost:3002" # localhost only | |||
nextcloud-occ config:app:set whiteboard collabBackendUrl --value="http://cloud.example.com/whiteboard" # Public (The domain is your Nextcloud hostname) | |||
nextcloud-occ config:app:set whiteboard jwt_secret_key --value="test123"</syntaxhighlight> | |||
=== NextCloud Office === | === NextCloud Office === | ||
| Line 542: | Line 546: | ||
For easy deployment, there's the [https://apps.nextcloud.com/apps/richdocumentscode richdocumentscode app] which bundles the CODE server. While being less performant than a standalone deployment of the CODE server, this solution does not require an additional service to be deployed and managed externally from NextCloud. Unfortunately the richdocumentscode app bundles the CODE server as an AppImage and therefore does not work out of the box on NixOS. Follow https://github.com/NixOS/nixpkgs/issues/339798 if you want to get informed about packaging progress. Also CODE standalone is currently not packaged in nixpkgs (https://github.com/NixOS/nixpkgs/issues/218878). | For easy deployment, there's the [https://apps.nextcloud.com/apps/richdocumentscode richdocumentscode app] which bundles the CODE server. While being less performant than a standalone deployment of the CODE server, this solution does not require an additional service to be deployed and managed externally from NextCloud. Unfortunately the richdocumentscode app bundles the CODE server as an AppImage and therefore does not work out of the box on NixOS. Follow https://github.com/NixOS/nixpkgs/issues/339798 if you want to get informed about packaging progress. Also CODE standalone is currently not packaged in nixpkgs (https://github.com/NixOS/nixpkgs/issues/218878). | ||
=== Memories === | |||
To enable hardware acceleration, nextcloud will need access to the graphics card with e.g:<syntaxhighlight lang="nix"> | |||
users.users.nextcloud.extraGroups = [ "video" ]; | |||
systemd.services.phpfpm-nextcloud.serviceConfig = { | |||
DeviceAllow = "/dev/dri/renderD128 rw"; | |||
PrivateDevices = lib.mkForce false; | |||
}; | |||
</syntaxhighlight>You will still need to enable the relevant app configuration through "Administration Settings > Memories > HW Acceleration". | |||
[[Category:Server]] | [[Category:Server]] | ||
[[Category:Applications]] | [[Category:Applications]] | ||
[[Category:Web Applications]] | [[Category:Web Applications]] | ||
[[Category:NixOS Manual]] | [[Category:NixOS Manual]] | ||