Servers

Nextcloud

See how much room your Nextcloud has left, which updates are waiting and how many people used it today, without opening its admin pages.

Install in LegatoSet it up by hand ↓

Nextcloud
Free space
6.8GB−83.5%
2040Nov 8Nov 9Nov 11Nov 13Today
Updates
Nextcloud 34.0.6 · Calendar, Notes
Active users
3 in 5 minutes · 11 in 24 hours · 14 in 7 days
Shares
186 · 41 links, 9 with no password
Version
Nextcloud 34.0.5 · PHP 8.5.12
Memory
11.2 GB used of 15.6 GB
Load
1.84 on 8 threads
Users
14 active, 1 disabled
Files
48,213
Updated 12 min ago

What you’ll see

  • Health: in Details, two lines. Nextcloud says its version, or that it’s in maintenance mode (orange, as it is during an upgrade) or has an upgrade waiting to finish outside maintenance mode (red). Storage says how much space is free: orange under 10 GB and red under 2 GB, and grey when Nextcloud’s server info can’t be read. Either one turns the health card orange or red, and Nextcloud goes red once it stops answering.
  • Free space: a week of it, one reading every 3 hours, so a disk filling up shows as a falling line. Nextcloud keeps no history of its own, so Legato records the readings while it runs. The card says it’s collecting them until it has two, up to 3 hours after you add the page.
  • Updates: a newer Nextcloud and the apps with updates, by name ("Nextcloud 34.0.6 · Calendar, Notes"), or None waiting. A waiting update never counts as a problem.
  • Active users: how many people used Nextcloud in the last 5 minutes, 24 hours and 7 days.
  • Shares, with how many are public links and how many of those have no password; Version, Nextcloud’s and PHP’s; Users, how many accounts have signed in at least once and how many are disabled; and Files.
  • Memory and Load: how much memory is in use on the machine Nextcloud runs on, and its load average over the last minute beside its number of CPU threads. In a container they’re usually the host’s.

Status

  • Shows whether Nextcloud is answering and how much space is left.
  • Orange under 10 GB free or in maintenance mode, as during an upgrade.
  • Red under 2 GB free, when an upgrade is left waiting outside maintenance mode, or once Nextcloud stops answering.
  • Grey when Nextcloud’s server info can’t be read.
  • An update waiting never counts as a problem.
  • Notifies you when it turns orange or red.

How it connects

The page reads Nextcloud’s Monitoring app (serverinfo, which comes with Nextcloud) with its monitoring token, sent as NC-Token. That token can read this summary and nothing else.

Requests it makes on its own 2

  • GET/status.php

    Nextcloud’s version, and whether it’s in maintenance mode or waiting to finish an upgrade. It needs no token.

    Every 5 minutes

  • GET/ocs/v2.php/apps/serverinfo/api/v1/info?format=json&skipApps=false&skipUpdate=false

    Free space, updates waiting, active users, shares, users, memory, load and files. About 3 KB.

    Every 5 minutes

That’s 24 requests an hour while your Mac is awake. In maintenance mode Nextcloud turns the second request away. The chart and facts then keep their last answer, and after three missed reads, 15 minutes, Storage turns grey and says it can’t read Nextcloud’s server info. A refused token does the same. The Monitoring app’s own page covers the request.

Updates are as of Nextcloud’s own daily check. The file count is refreshed by a background job, so it reads 0 on a new server until that job has run. Free space is for the disk that holds Nextcloud’s data folder. Nextcloud doesn’t report that disk’s size, which is why the page warns at an amount rather than a percentage. If your data is on object storage, Nextcloud can’t measure it, and Storage says so.

Sources and buttons explains each part of a page.

Set it up

  1. Make a monitoring token. In Nextcloud, open Administration settings → System and find External monitoring tool. Nextcloud 35 generates a token there; on older versions, make up a long random one. Store it by running the occ command shown there on your server.
  2. Save it in Legato. In Settings → Secrets, save the token under nextcloud, bound to your Nextcloud’s address. You can also link a 1Password reference.
  3. Add the page. Paste the prompt into your agent, or download the page and run /Applications/Legato.app/Contents/Helpers/legato set nextcloud nextcloud.json.
  4. Point it at Nextcloud. Change https://nextcloud.example.com to your Nextcloud’s address on both sources. Use the address you open Nextcloud at: Nextcloud answers only the names in its trusted_domains, and turns the others away. If Nextcloud sits at a path, such as https://example.com/nextcloud, set each source’s url to https://example.com and add "base": "/nextcloud".

The cards fill within a minute. A mistyped token is the usual reason they don’t: the page then notes that Nextcloud refused it. Nextcloud counts each refused token as a failed sign-in from your Mac, and after many it may slow sign-ins from your Mac’s address. Fix the token, and an admin can clear the count with occ security:bruteforce:reset <your Mac’s address>.

To warn at other amounts, change the numbers of bytes in the Storage card’s rules: 10737418240 (10 GB) appears twice, in state and detail, and 2147483648 (2 GB) once, in state.

Prompt for your agent

prompt
Add a Legato page for Nextcloud, starting from https://legatobar.com/examples/nextcloud.json.

Add the page as it is and change https://nextcloud.example.com on both sources to my Nextcloud’s address. I’ll save my monitoring token as nextcloud in Settings → Secrets myself.

Use the local Legato MCP tools or /Applications/Legato.app/Contents/Helpers/legato.
Use list_pages first and choose an unused page ID. Do not overwrite an existing page. If I explicitly ask to update one, read its full body with get_page, preserve unrelated cards and settings, and use if_match with that version. On version_mismatch, read again before merging.
Ask me only for non-secret setup details that are missing. Never ask me to paste a password, token or API key into chat, page JSON or command arguments. Tell me to save it in Settings → Secrets for the service host, or link it from 1Password there.
Use the downloadable page, not the illustration’s sample data. Never invent readings. Fix any invalid_page paths and verify that the page loads. Do not press buttons that change the service or real devices to test it.

Download the page

Download nextcloud.json

Show the page’s JSON 597 lines
json
{
  "$schema": "./.schemas/page.schema.json",
  "title": "Nextcloud",
  "icon": "cloud",
  "sources": {
    "server": {
      "url": "https://nextcloud.example.com",
      "every": "5m",
      "requests": {
        "status": "/status.php"
      }
    },
    "info": {
      "url": "https://nextcloud.example.com",
      "secret": "nextcloud",
      "auth": {
        "type": "header",
        "name": "NC-Token"
      },
      "every": "5m",
      "requests": {
        "info": "/ocs/v2.php/apps/serverinfo/api/v1/info?format=json&skipApps=false&skipUpdate=false"
      },
      "derive": [
        {
          "name": "free",
          "value": {
            "path": "info.ocs.data.nextcloud.system.freespace"
          }
        },
        {
          "name": "free_gb",
          "value": {
            "path": "info.ocs.data.nextcloud.system.freespace",
            "scale": 9.313225746154785e-10,
            "round": 1
          }
        },
        {
          "name": "core",
          "value": {
            "path": "info.ocs.data.nextcloud.system.update.available"
          }
        },
        {
          "name": "core_version",
          "value": {
            "path": "info.ocs.data.nextcloud.system.update.available_version",
            "match": "^([0-9]+\\.[0-9]+\\.[0-9]+)"
          }
        },
        {
          "name": "core_words",
          "value": {
            "if": {
              "path": "core_version",
              "exists": true
            },
            "then": {
              "template": "Nextcloud {core_version}"
            },
            "else": {
              "template": "Nextcloud"
            }
          }
        },
        {
          "name": "apps",
          "value": {
            "each": "info.ocs.data.nextcloud.system.apps.app_updates",
            "entries": true,
            "sort": "key",
            "fields": {
              "name": {
                "path": "key",
                "values": {
                  "calendar": "Calendar",
                  "contacts": "Contacts",
                  "mail": "Mail",
                  "spreed": "Talk",
                  "deck": "Deck",
                  "notes": "Notes",
                  "tasks": "Tasks",
                  "richdocuments": "Nextcloud Office",
                  "richdocumentscode": "Collabora Online",
                  "onlyoffice": "ONLYOFFICE",
                  "photos": "Photos",
                  "memories": "Memories",
                  "recognize": "Recognize",
                  "forms": "Forms",
                  "polls": "Polls",
                  "groupfolders": "Team folders",
                  "files_pdfviewer": "PDF viewer",
                  "text": "Text",
                  "whiteboard": "Whiteboard",
                  "news": "News",
                  "bookmarks": "Bookmarks",
                  "cookbook": "Cookbook",
                  "music": "Music",
                  "maps": "Maps",
                  "twofactor_totp": "Two-Factor TOTP",
                  "twofactor_webauthn": "Two-Factor WebAuthn",
                  "user_ldap": "LDAP user and group backend",
                  "user_oidc": "OpenID Connect user backend",
                  "integration_openai": "OpenAI integration",
                  "assistant": "Assistant",
                  "collectives": "Collectives",
                  "tables": "Tables",
                  "end_to_end_encryption": "End-to-end encryption",
                  "suspicious_login": "Suspicious login",
                  "previewgenerator": "Preview Generator",
                  "files_retention": "Retention",
                  "app_api": "AppAPI",
                  "serverinfo": "Monitoring",
                  "activity": "Activity",
                  "notifications": "Notifications"
                },
                "default": {
                  "template": "{key|title}"
                }
              }
            }
          }
        },
        {
          "name": "app_count",
          "value": {
            "count": "apps",
            "default": 0
          }
        },
        {
          "name": "first_apps",
          "value": {
            "each": "apps",
            "limit": 2,
            "fields": {
              "name": "name"
            }
          }
        },
        {
          "name": "app_words",
          "value": {
            "join": "name",
            "of": "first_apps",
            "separator": ", "
          }
        },
        {
          "name": "apps_more",
          "value": {
            "subtract": [
              "app_count",
              2
            ]
          }
        },
        {
          "name": "app_text",
          "value": {
            "if": {
              "path": "app_count",
              "gt": 2
            },
            "then": {
              "template": "{app_words} and {apps_more} more"
            },
            "else": {
              "template": "{app_words}"
            }
          }
        },
        {
          "name": "users",
          "value": {
            "path": "info.ocs.data.nextcloud.storage.num_users"
          }
        },
        {
          "name": "disabled",
          "value": {
            "path": "info.ocs.data.nextcloud.storage.num_disabled_users",
            "default": 0
          }
        },
        {
          "name": "shares",
          "value": {
            "path": "info.ocs.data.nextcloud.shares.num_shares",
            "default": 0
          }
        },
        {
          "name": "links",
          "value": {
            "path": "info.ocs.data.nextcloud.shares.num_shares_link",
            "default": 0
          }
        },
        {
          "name": "open_links",
          "value": {
            "path": "info.ocs.data.nextcloud.shares.num_shares_link_no_password",
            "default": 0
          }
        },
        {
          "name": "version",
          "value": {
            "path": "info.ocs.data.nextcloud.system.version",
            "match": "^([0-9]+\\.[0-9]+\\.[0-9]+)"
          }
        },
        {
          "name": "mem_total",
          "value": {
            "path": "info.ocs.data.nextcloud.system.mem_total",
            "scale": 1024
          }
        },
        {
          "name": "mem_used",
          "value": {
            "subtract": [
              "info.ocs.data.nextcloud.system.mem_total",
              "info.ocs.data.nextcloud.system.mem_free"
            ],
            "scale": 1024
          }
        },
        {
          "name": "load",
          "value": {
            "path": "info.ocs.data.nextcloud.system.cpuload[0]",
            "round": 2
          }
        },
        {
          "name": "cores",
          "value": {
            "path": "info.ocs.data.nextcloud.system.cpunum"
          }
        }
      ]
    }
  },
  "cards": [
    {
      "id": "server",
      "type": "status",
      "placement": "page_info",
      "label": "Nextcloud",
      "state": "unknown",
      "width": "full",
      "source": {
        "ref": "server",
        "map": {
          "state": {
            "if": {
              "path": "status.maintenance",
              "equals": true
            },
            "then": {
              "template": "warning"
            },
            "else": {
              "if": {
                "path": "status.needsDbUpgrade",
                "equals": true
              },
              "then": {
                "template": "critical"
              },
              "else": {
                "template": "ok"
              }
            }
          },
          "detail": {
            "if": {
              "path": "status.maintenance",
              "equals": true
            },
            "then": {
              "template": "In maintenance mode"
            },
            "else": {
              "if": {
                "path": "status.needsDbUpgrade",
                "equals": true
              },
              "then": {
                "template": "An upgrade is waiting to finish"
              },
              "else": {
                "template": "Nextcloud {status.versionstring} · No problems"
              }
            }
          }
        },
        "failed": {
          "state": "critical",
          "detail": "The server isn't answering",
          "after": 3
        }
      }
    },
    {
      "id": "storage",
      "type": "status",
      "placement": "page_info",
      "label": "Storage",
      "state": "unknown",
      "width": "full",
      "source": {
        "ref": "info",
        "map": {
          "state": {
            "if": {
              "path": "free",
              "exists": false
            },
            "then": {
              "template": "off"
            },
            "else": {
              "if": {
                "path": "free",
                "lt": 2147483648
              },
              "then": {
                "template": "critical"
              },
              "else": {
                "if": {
                  "path": "free",
                  "lt": 10737418240
                },
                "then": {
                  "template": "warning"
                },
                "else": {
                  "template": "ok"
                }
              }
            }
          },
          "detail": {
            "if": {
              "path": "free",
              "exists": false
            },
            "then": {
              "template": "Nextcloud doesn't report free space for this storage"
            },
            "else": {
              "if": {
                "path": "free",
                "lt": 10737418240
              },
              "then": {
                "template": "Only {free|bytes} free"
              },
              "else": {
                "template": "{free|bytes} free"
              }
            }
          }
        },
        "failed": {
          "state": "unknown",
          "detail": "Can't read Nextcloud's server info",
          "after": 3
        }
      }
    },
    {
      "id": "free",
      "type": "sparkline",
      "label": "Free space",
      "unit": "GB",
      "points": [],
      "source": {
        "ref": "info",
        "map": {
          "points": {
            "history": "free_gb",
            "every": "3h",
            "keep": 56
          }
        }
      }
    },
    {
      "id": "facts",
      "type": "facts",
      "items": [
        {
          "key": "Updates",
          "value": "—"
        },
        {
          "key": "Active users",
          "value": "—"
        },
        {
          "key": "Shares",
          "value": "—"
        },
        {
          "key": "Version",
          "value": "—"
        },
        {
          "key": "Memory",
          "value": "—"
        },
        {
          "key": "Load",
          "value": "—"
        },
        {
          "key": "Users",
          "value": "—"
        },
        {
          "key": "Files",
          "value": "—"
        }
      ],
      "source": {
        "ref": "info",
        "map": {
          "items[0].value": {
            "if": {
              "path": "core",
              "equals": true
            },
            "then": {
              "if": {
                "path": "app_count",
                "gt": 0
              },
              "then": {
                "template": "{core_words} · {app_text}"
              },
              "else": {
                "template": "{core_words}"
              }
            },
            "else": {
              "if": {
                "path": "app_count",
                "gt": 0
              },
              "then": {
                "template": "{app_text}"
              },
              "else": {
                "if": {
                  "path": "core",
                  "exists": true
                },
                "then": {
                  "template": "None waiting"
                },
                "else": {
                  "template": "Not reported"
                }
              }
            }
          },
          "items[1].value": {
            "template": "{info.ocs.data.activeUsers.last5minutes} in 5 minutes · {info.ocs.data.activeUsers.last24hours} in 24 hours · {info.ocs.data.activeUsers.last7days} in 7 days"
          },
          "items[2].value": {
            "if": {
              "path": "links",
              "gt": 0
            },
            "then": {
              "if": {
                "path": "open_links",
                "gt": 0
              },
              "then": {
                "if": {
                  "path": "links",
                  "equals": 1
                },
                "then": {
                  "template": "{shares} · 1 link, with no password"
                },
                "else": {
                  "template": "{shares} · {links} links, {open_links} with no password"
                }
              },
              "else": {
                "if": {
                  "path": "links",
                  "equals": 1
                },
                "then": {
                  "template": "{shares} · 1 link"
                },
                "else": {
                  "template": "{shares} · {links} links"
                }
              }
            },
            "else": {
              "template": "{shares}"
            }
          },
          "items[3].value": {
            "if": {
              "path": "info.ocs.data.server.php.version",
              "exists": true
            },
            "then": {
              "template": "Nextcloud {version} · PHP {info.ocs.data.server.php.version}"
            },
            "else": {
              "template": "Nextcloud {version}"
            }
          },
          "items[4].value": {
            "if": {
              "all": [
                {
                  "path": "info.ocs.data.nextcloud.system.mem_total",
                  "gt": 0
                },
                {
                  "path": "info.ocs.data.nextcloud.system.mem_free",
                  "gte": 0
                }
              ]
            },
            "then": {
              "template": "{mem_used|bytes} used of {mem_total|bytes}"
            },
            "else": {
              "template": "Not reported"
            }
          },
          "items[5].value": {
            "if": {
              "path": "load",
              "gte": 0
            },
            "then": {
              "if": {
                "path": "cores",
                "gt": 0
              },
              "then": {
                "if": {
                  "path": "cores",
                  "equals": 1
                },
                "then": {
                  "template": "{load} on 1 thread"
                },
                "else": {
                  "template": "{load} on {cores} threads"
                }
              },
              "else": {
                "template": "{load}"
              }
            },
            "else": {
              "template": "Not reported"
            }
          },
          "items[6].value": {
            "if": {
              "path": "disabled",
              "gt": 0
            },
            "then": {
              "template": "{users} active, {disabled} disabled"
            },
            "else": {
              "template": "{users} active"
            }
          },
          "items[7].value": {
            "template": "{info.ocs.data.nextcloud.storage.num_files}"
          }
        }
      }
    }
  ]
}

Questions

Why does Storage say "Only 6.8 GB free" when the disk is huge?

The warning is an amount, not a share of the disk, because Nextcloud doesn’t report the disk’s size. Change the amounts as above if 10 GB is too much or too little for your disk.

Why do some apps show by their id?

Nextcloud reports apps with updates by their id. The page names the common ones (Talk, Nextcloud Office, Calendar and so on) and shows any other by its id with a capital letter.

Why doesn’t an update count as a problem?

Most people install updates when it suits them, and a page that stays orange for days gets ignored. The Updates row says what’s waiting.

Can it show my files or activity?

No. The monitoring token reaches only the server summary. Showing files or activity would take an admin’s app password, which can do everything an admin can.

The page was checked on 14 Nov 2026 against two Nextcloud servers with made-up users, files and shares: Nextcloud 35.0.3 with nothing waiting, and Nextcloud 34.0.5 with Nextcloud 34.0.6 and two app updates waiting and its data disk 93% full. Maintenance mode, a refused token and an address Nextcloud doesn’t trust were tried on them with direct requests, and a refused token through Legato’s install check. Illustrations use made-up numbers. See the service index for other examples.

Legato is independent and isn’t affiliated with or endorsed by Nextcloud.