Service: Nextcloud - EyevinnOSC/community GitHub Wiki

Nextcloud

Nextcloud (serviceId nextcloud-server) is a self-hosted productivity platform with file storage and sharing, calendar, contacts, document editing and team collaboration. In Eyevinn Open Source Cloud (OSC) it is a long-running service instance with up to 50 GiB of storage per instance, backed by a MariaDB database. License: AGPL-3.0. Source: nextcloud/server.

What it can do

  • Store, sync and share files across devices.
  • Manage calendars and contacts.
  • Install apps for extra functionality, such as Nextcloud Office (Collabora), Talk (video calls), Calendar and Contacts.
  • Host multiple users, created by the admin in the Nextcloud settings.

Creating an instance

Create the database first and confirm it is running:

  1. Create a MariaDB instance (serviceId linuxserver-docker-mariadb) with create-service-instance, for example:
    { "name": "nextclouddb", "RootPassword": "{{secrets.mariadbroot}}", "Database": "nextcloud", "User": "nextcloud", "Password": "{{secrets.mariadbpwd}}" }
  2. Use describe-service-instance on it to get its address and port. The connection URL has the form mysql://nextcloud:<password>@<IP>:<PORT>/nextcloud.
  3. Store that URL as a service secret for Nextcloud: create-service-secret with serviceId: "nextcloud-server", name dburl and the URL as value. Create the secrets referenced above for MariaDB (mariadbroot, mariadbpwd) the same way, with serviceId: "linuxserver-docker-mariadb".
  4. Create the Nextcloud instance with create-service-instance, serviceId: "nextcloud-server":
    { "name": "mycloud", "AdminUser": "admin", "AdminPassword": "{{secrets.nextcloudadmin}}", "DatabaseUrl": "{{secrets.dburl}}" }

Verify with wait-for-service-ready or get-instance-status; describe-service-instance gives the instance URL. Open it and log in with AdminUser and AdminPassword.

Options

Option Required Type Meaning
name Yes string Name of the instance. Alphanumeric/underscore only (^\w+$), at most 20 characters.
AdminUser Yes string Username of the first admin account, which has full control over users, apps and system configuration.
AdminPassword Yes string, sensitive Password of the admin account. Use a strong password.
DatabaseUrl No string, sensitive Database connection URL, for example mysql://user:password@host:port/dbname. The catalog associates this option with a MariaDB instance (linuxserver-docker-mariadb, TCP, mysql protocol, credentials included in the URL). Store it as a secret and pass {{secrets.NAME}}.

AdminPassword and DatabaseUrl are sensitive: store them with create-service-secret and reference them as {{secrets.NAME}}, which only works as the entire field value. Overwriting a secret does not restart a running instance.

MariaDB options

Service linuxserver-docker-mariadb (source, GPL-3.0), the database for Nextcloud. See also the MariaDB page if present in the documentation.

Option Required Type Meaning
name Yes string Name of the database server. Alphanumeric/underscore only, at most 20 characters.
RootPassword Yes string, sensitive Root password. Minimum 4 characters; non-alphanumeric characters must be properly escaped. Only applies on first run; changing it later has no effect.
Database No string Name of a database to create on first run. Database, User and Password must all be set together if you use any of them.
User No string User created with superuser access to Database. Do not use root. First run only; must be set together with Database and Password.
Password No string, sensitive Password for User. Minimum 4 characters; escape non-alphanumeric characters. First run only; must be set together with Database and User.

Using the instance

  • Create additional accounts in Settings, Users.
  • Install extensions from Apps.

OSC CLI equivalent of creating the Nextcloud instance:

osc create nextcloud-server mycloud \
  -o AdminUser="admin" \
  -o AdminPassword="<password>" \
  -o DatabaseUrl="mysql://nextcloud:<password>@<IP>:<PORT>/nextcloud"

Limitations

  • Storage is limited to 50 GiB per instance.

Resources

⚠️ **GitHub.com Fallback** ⚠️