Home Explore Blog Models CI



nixpkgs

1st chunk of `nixos/modules/services/web-apps/ocis.md`
bd8a3016d7a62975b0d9de55e8da8e03c703fb9892901a92000000010000080a
# ownCloud Infinite Scale {#module-services-ocis}

[ownCloud Infinite Scale](https://owncloud.dev/ocis/) (oCIS) is an open-source,
modern file-sync and sharing platform. It is a ground-up rewrite of the well-known PHP based ownCloud server.

The server setup can be automated using
[services.ocis](#opt-services.ocis.enable). The desktop client is packaged at
`pkgs.owncloud-client`.

## Basic usage {#module-services-ocis-basic-usage}

oCIS is a golang application and does not require an HTTP server (such as nginx)
in front of it, though you may optionally use one if you will.

oCIS is configured using a combination of yaml and environment variables. It is
recommended to familiarize yourself with upstream's available configuration
options and deployment instructions:

* [Getting Started](https://owncloud.dev/ocis/getting-started/)
* [Configuration](https://owncloud.dev/ocis/config/)
* [Basic Setup](https://owncloud.dev/ocis/deployment/basic-remote-setup/)

A very basic configuration may look like this:
```
{ pkgs, ... }:
{
  services.ocis = {
    enable = true;
    configDir = "/etc/ocis/config";
  };
}
```

This will start the oCIS server and make it available at `https://localhost:9200`

However to make this configuration work you will need generate a configuration.
You can do this with:

```console
$ nix-shell -p ocis_5-bin
$ mkdir scratch/
$ cd scratch/
$ ocis init --config-path . --admin-password "changeme"
```

You may need to pass `--insecure true` or provide the `OCIS_INSECURE = true;` to
[`services.ocis.environment`][mod-envFile], if TLS certificates are generated
and managed externally (e.g. if you are using oCIS behind reverse proxy).

If you want to manage the config file in your nix configuration, then it is
encouraged to use a secrets manager like sops-nix or agenix.

Be careful not to write files containing secrets to the globally readable nix
store.

Please note that current NixOS module for oCIS is configured to run in `fullstack`
mode, which starts all the services for owncloud on single instance. This will

Title: ownCloud Infinite Scale (oCIS) Setup and Configuration
Summary
This document introduces ownCloud Infinite Scale (oCIS), an open-source, modern file-sync and sharing platform rewritten in Golang. It explains how to automate its server setup using `services.ocis` and notes that a desktop client is available at `pkgs.owncloud-client`. oCIS is configured via YAML and environment variables, with links provided to upstream documentation for detailed setup and configuration. A basic NixOS configuration example is given, along with console commands to initialize the oCIS configuration and set an admin password. It also touches on handling TLS certificates, the option for insecure mode, and the importance of using secret managers like sops-nix for sensitive data, warning against writing secrets to the globally readable Nix store. The current NixOS module for oCIS is configured to run in `fullstack` mode, starting all services on a single instance.