How to Install Collabora Online Development Edition on nixOS Latest

Collabora Online Development Edition is a powerful and open-source office productivity suite based on LibreOffice. In this tutorial, we will walk you through the steps required to install Collabora Online Development Edition on nixOS Latest.

Prerequisites

Before you start, make sure you have the following:

Step 1: Enable the NixOS unstable repository

Collabora Online Development Edition depends on some libraries that are only available in the unstable repository. To enable the unstable repository, you need to edit the /etc/nixos/configuration.nix file as follows:

sudo nano /etc/nixos/configuration.nix

In the configuration.nix file, add the following lines:

nixpkgs.config.allowUnfree = true;
nixpkgs.config.packageOverrides = pkgs: {
  unstable = import <nixpkgs> {
    overlays = [
      (self: super: {
        collabora-online = super.collabora-online.override {
          enablePreBuiltLibreOffice = true;
          extraPackages = epkgs: with epkgs; [
            dconf
            gir1.2-freedesktop
            gir1.2-glib-2.0
            gir1.2-gtk-3.0
            gir1.2-pango-1.0
            libcairo2
            libegl1-mesa
            libgbm1
            libgles2-mesa
            libglib2.0-0
            libgstreamer-plugins-base1.0-0
            libgstreamer-plugins-good1.0-0
            libgtk-3-0
            libldap-common
            libldap-2.4-2
            libpam-pkcs11
            libprotobuf10
            libprotobuf-lite10
            libsoup2.4-1
            libssl1.1
            libtool
            libxmpp4r2
            lsof
            procps
          ];
          enableCalc = true;
          enableWriter = true;
          enableImpress = true;
        };
      })
    ];
  };
}

Save and exit the file.

Step 2: Install Collabora Online Development Edition

Now that you have enabled the unstable repository, you can install Collabora Online Development Edition by running the following command:

sudo nix-env -iA unstable.collabora-online

This command will install Collabora Online Development Edition and all the required dependencies.

Step 3: Configure Collabora Online Development Edition

Once the installation is complete, you need to configure Collabora Online Development Edition.

Open the /etc/nixos/configuration.nix file again and add the following lines:

services.collabora-online = {
  enable = true;
  domain = "office.example.com";
  certificateFile = "/etc/ssl/certs/ssl-cert-snakeoil.pem";
  certificateKeyFile = "/etc/ssl/private/ssl-cert-snakeoil.key";
  extraParams = ''
    <host name="localhost">
      <socket>*</socket>
      <socket-ssl>*</socket-ssl>
    </host>
    <host name="office.example.com">
      <socket>*</socket>
      <socket-ssl>*</socket-ssl>
    </host>
  '';
};

Replace office.example.com with your server's hostname.

Save and exit the file.

Step 4: Reload the NixOS configuration

Finally, you need to reload the NixOS configuration for the changes to take effect. Run the following command:

sudo nixos-rebuild switch

This command will rebuild the NixOS configuration and restart all the services.

Step 5: Verify the installation

To verify that Collabora Online Development Edition is installed and working correctly, open a web browser and navigate to the following URL:

https://office.example.com/hosting/discovery

Replace office.example.com with your server's hostname.

You should see an XML file containing information about the Collabora Online Development Edition installation.

Congratulations! You have successfully installed Collabora Online Development Edition on nixOS Latest.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!