OCIS setup, missing config.json

Steps to reproduce

  1. Follow steps given for the binary setup on here (Getting Started | ownCloud)
  2. Even creating a config.json file in the same dir and specifying it using WEB_UI_CONFIG_FILE
  3. Get an error saying config.json is missing

Expected behaviour

OCIS should load

Actual behaviour

I get an error sayng it is missing even when manually created.

A couple of questions, why isn’t config.json created during init? Also it woould be more helpful if the error was a bit more descriptive as to where config.json should live.

Many thanks

1 Like

No-one has any help? I’m cant be the only one running into this

When I’ve been trying out OCIS just to see whether I’d like to invest more time to prepare a proper setup and followed that guide I got it without issues. That being said I don’t know whether I followed the guide to the letter.

First of all - I’d grab latest version of OCIS from the repo.

Then follow the guide to run the init command in the container so the ocis.yaml file will get created.

Then run OCIS in the container with docker command making sure you’re binding the config file to the correct filepath inside container.

Or create a compose.yaml file and run the container with docker compose.
On my end compose.yaml looked like this:

services:
  ocis:
    image: owncloud/ocis:latest
    ports:
      - 9200:9200
    environment:
      # INSECURE: needed if oCIS / Traefik is using self generated certificates
      OCIS_INSECURE: "true"

      # OCIS_URL: the external domain / ip address of oCIS (with protocol, must always be https)
      OCIS_URL: "https://localhost:9200"

      # OCIS_LOG_LEVEL: error / info / ... / debug
      OCIS_LOG_LEVEL: info
    volumes:
      - "./ocis.yaml:/etc/ocis/ocis.yaml"
      - "ocis-simple:/var/lib/ocis"
volumes:
  ocis-simple:

Thanks for reporting this! It does sound confusing. If config.json is required, it would definitely help if ocis init created it by default or if the error clearly stated the expected location. Hopefully this gets addressed soon — clearer guidance would make setup much smoother.

but ocis init does craete config.YAML file if one does not exist :slight_smile: . To quote the docs:

In general, the ocis init command initializes ocis for the first run and creates an ocis.yaml configuration file. 

So I don’t know what’s confusing about it :slight_smile: . I might be missing some context here though - I’m quite new to OCIS :smiley: . Let me know how this setup went - as on my end it was pretty much pain free I’ll try to help.

Just done a fresh install using the instructions for the bare metal install.
Still getting the same error - config.json missing. Can we get comment from someone at OwnCloud on this one? Very perplexing.

Thanks for this - I will attempt it, however its not ideal for the setup im going for as I want to set this up in an LXC, and its non-ideal to use docker within an LXC.

I’d recommend to use docker first to check it works for you. After that, you can try to replicate the container setup outside if you don’t want to use docker.

There are 2 big reasons to use docker (or a container solution):

  • It provides an isolated environment. oCIS uses a lot of services requiring ports. Although the ports used are unconventional (9200-9399 range I think), they might be used by other apps in the system, which can cause problems.
  • It provides an easy deployment. You don’t need to take care of installing libraries, check version incompatibilities, or configure the environment in a specific way. The container takes care of all of that.

I don’t think the delays caused by the additional networking will be a problem. The few extra milliseconds that could be caused by the networking could also be caused by CPU or FS overload, internet congestion (which could happen with or without docker), or bugs in oCIS. It would be difficult to proof that docker is causing noticeable delays.
Could it be faster without docker? Yes. Does it matter? I don’t think so. The benefits outweighs a minor inconvenience.