Skip to content

Installation - Do I need ocapps? #35

Open

Description

@TheNomad11

I installed ocapps according to the instructions - the easy way, but when opening the app via the app switcher it said: Request failed with status code 404

Then I re-read the Readme, where it said

What works today
Backend (part of ocapps, a single static Go binary, SQLite, no external services):

Does this mean I have to install ocapps, and if so how? Install instructions are not clear, thanks!

Activity

  1. gnacho commented on Nov 12, 2026

    @gnacho
    Owner

    Sorry for the late reply. You are right that the README was not clear, and the 404 you got is exactly what happens when only half of the app is installed.

    Yes, you need ocapps. Notes is two pieces:

    • The web extension (notes-X.Y.Z.zip), which is what ocapps-ext install notes put in /etc/opencloud/web/assets/apps.
    • The backend (ocapps), a single Go binary that serves the Notes API. The extension is only the UI. Without the backend, the app opens and every request it makes fails with Request failed with status code 404.

    ocapps is not a separate app you install inside OpenCloud. It is a service that runs next to OpenCloud on the same server, listening on port 8096, plus a proxy route so that /index.php/apps/notes/ reaches it.

    The shortest path now is the one-command installer in the ocapps repo. Run this on the OpenCloud server, from a shell:

    curl -fsSL https://raw.githubusercontent.com/gnacho/ocapps/main/install.sh | sudo sh -s -- --url https://cloud.example.com

    Replace https://cloud.example.com with your real external URL. It is idempotent: it checks for an existing install, verifies the release checksum, creates the ocapps system user, installs the binary as /usr/local/bin/ocapps, writes /etc/ocapps/env, installs and starts the opencloud-apps unit, then installs the extension folder and the ocapps-ext helper. Use --apps notes if you only want Notes and not the other companion apps. Add --dry-run first if you want to see what it would do without touching the server.

    Two things it still leaves to you, because they depend on your setup:

    1. The reverse proxy. OpenCloud does not forward these paths itself. Add a route so that /index.php/apps/notes/ and /ocs/v2.php/cloud/capabilities go to http://127.0.0.1:8096. The README has nginx, Caddy and Traefik snippets.
    2. WEB_ASSET_APPS_PATH must point to your apps folder (/etc/opencloud/web/assets/apps on a standard install). Without that variable OpenCloud does not see the extension at all.

    To check the backend is alive before blaming the proxy:

    systemctl is-active opencloud-apps
    curl -i http://127.0.0.1:8096/healthz

    Both should be healthy on the server. If they are, the remaining piece is the proxy route.

    I am opening a docs issue to move the backend out of the bottom of the install section and make it unmissable. Thanks for the report.

    Mobile app

    This server also has a native Android client, ocnotes-android (Kotlin + Jetpack Compose, AGPL-3.0). It speaks the same Notes API v1.4, so it works against this backend out of the box: log in with your server URL, your user name and an app token (not your account password). Signed APK in the latest release. The README of ocnotes now documents it.

  2. TheNomad11 commented on Nov 12, 2026

    @TheNomad11
    Author

    Thanks! Better late than never.
    But... Like many (most?) others I have installed Opencloud with docker compose on a server with other apps that also are installed with docker compose, behind a nginx reverse proxy. How would your apps work there? As it is now it looks as a rather complex installation procedure

  3. gnacho commented on Nov 12, 2026

    @gnacho
    Owner

    Docker Compose works, install.sh is what does not apply there: it is systemd only (creates a user, writes a unit, calls systemctl). Skip it and run the backend as one more service, since ocapps is a single static Go binary and the repo has a Dockerfile.

    Add it to the same compose project, next to opencloud, so it can reach the API over the internal network:

    services:
      ocapps:
        build: ./ocapps       # git clone https://github.com/gnacho/ocapps
        restart: always
        environment:
          OCAPPS_OPENCLOUD_URL: http://opencloud:9200
          OCAPPS_NEWS_ENABLED: "false"
          OCAPPS_PHOTOS_ENABLED: "false"
        volumes:
          - ./ocapps-data:/var/lib/ocapps
        ports:
          - "127.0.0.1:8096:8096"
        networks:
          - opencloud-net
    mkdir -p ocapps-data && sudo chown 10001 ocapps-data
    docker compose up -d ocapps

    9200 is the port OpenCloud listens on inside its container, so nothing has to be published for this to work. Photos and News are off here because you only want Notes. Drop OCAPPS_PHOTOS_ENABLED if you want the photo app too.

    The extension needs no installer either. The official compose file already mounts ./config/opencloud/apps at /var/lib/opencloud/web/assets/apps, which is the default WEB_ASSET_APPS_PATH, so the zip goes straight into the host folder:

    curl -fsSLO https://github.com/gnacho/ocnotes/releases/latest/download/notes-0.1.7.zip
    unzip -o notes-0.1.7.zip -d config/opencloud/apps
    
    # add to config/opencloud/apps.yaml
    notes:
      config: {}
    
    docker compose restart opencloud

    The restart is required: OpenCloud reads the list of apps at startup and does not rescan the folder.

    Then two locations in your existing nginx server block:

    location /index.php/apps/notes/ {
        proxy_pass http://127.0.0.1:8096;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
    
    location = /ocs/v2.php/cloud/capabilities {
        proxy_pass http://127.0.0.1:8096;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-Proto $scheme;
    }

    No trailing slash on proxy_pass, or the path arrives rewritten and the backend does not match it.

    Check the backend directly before blaming the proxy:

    docker compose exec ocapps wget -qO- http://127.0.0.1:8096/healthz

    If that answers and the browser still fails, your nginx access log shows the exact URL it asked for.

    You are right about the complexity: three pieces (binary, extension folder, proxy route) and the docs only covered systemd. I opened gnacho/ocapps#31 to add a compose example and a Docker section, including a permissions bug in the image data dir.

  4. gnacho commented on Nov 12, 2026

    @gnacho
    Owner

    The Compose example and the data dir fix are in: gnacho/ocapps#32. The overlay is deploy/docker-compose.example.yml and the step by step is the new Docker section in deploy/README.md, with the same commands I posted above.

    Build the image from git rather than from the v0.1.8 tag: the fix for /var/lib/ocapps is only on main until the next release is cut.

  5. gnacho commented on Nov 12, 2026

    @gnacho
    Owner

    v0.1.9 is out with the fix: https://github.com/gnacho/ocapps/releases/tag/v0.1.9. You can pin the tag in the build now, docker build -t ocapps https://github.com/gnacho/ocapps.git#v0.1.9, instead of following main.

  6. kimllee commented on Nov 24, 2026

    @kimllee

    Hello,

    It's funny to use the same port as Jellyfin 8096 does. Could you create a docker image for the release please ? It will avoids the need to clone the repository into the docker server and building it.
    Thanks a lot.

  7. gnacho commented on Nov 25, 2026

    @gnacho
    Owner

    Thank you for pointing at the port. 8096 is Jellyfin's, and Jellyfin is one of the most common self-hosted services, so the default was a bad choice on our side. It now defaults to 8077 (gnacho/ocapps#81) and the docs no longer send anyone to a port that may already be taken.

    On the Docker image: not planned. The project ships static binaries for linux/amd64 and linux/arm64 attached to every release, with a checksums.txt, and the only system dependency at runtime is ffmpeg, which is where the image stops being trivial. Publishing an image means owning its tags, its base image rebuilds and its CVE surface for every user, and packaging someone else's ffmpeg, which is precisely the part that would make me do it differently depending on the day. The releases exist so nobody has to clone and compile.

    If you want to avoid building the repository, you do not need us to publish an image for that: take the binary from the release into any base image that already has ffmpeg.

    FROM alpine:3.21
    RUN apk add --no-cache ca-certificates tzdata ffmpeg
    ADD https://github.com/gnacho/ocapps/releases/download/v0.1.16/ocapps_0.1.16_linux_amd64.tar.gz /tmp/
    RUN tar xzf /tmp/ocapps_*.tar.gz -C /tmp ocapps && install -m 755 /tmp/ocapps /usr/local/bin/ocapps
    ENV OCAPPS_LISTEN_ADDR=0.0.0.0:8077 OCAPPS_DATA_DIR=/var/lib/ocapps
    VOLUME /var/lib/ocapps
    EXPOSE 8077
    ENTRYPOINT ["/usr/local/bin/ocapps"]

    If you skip ffmpeg and only want Notes, nothing breaks: photo and video posters are the only thing that degrades.

    For changing the port on an install you already have, it is one variable. With systemd, edit OCAPPS_LISTEN_ADDR in /etc/ocapps/env and restart, or pass --listen next time you run the installer. With Docker, the container keeps listening on 8077 and only the host side of the mapping changes, so the port collision disappears without touching anything inside:

    ports:
      - "127.0.0.1:18077:8077"

    In both cases the proxy is the only other thing to update. The routes (/index.php/apps/notes/, /index.php/apps/news/, /ocphotos-api/, /ocs/v2.php/cloud/capabilities) keep their paths and only the upstream port changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions