Skip to content
xaweho

Knowledge base · advanced

OCC commands — how we handle them

What Nextcloud's CLI tool OCC can do, which tasks we run for you via ticket — and why there's no SSH access with us.

advanced ·

99% of all Nextcloud tasks can be handled through the web GUI — we designed it so that you as a customer never need shell access. For very rare edge cases, OCC (Nextcloud’s CLI tool) is still the right tool. Here’s how we handle that.

The ground rule

At xaweho:

We look after the server foundation. You, as the Nextcloud admin, work in the GUI. There is no SSH access to the server — OCC tasks we take over via ticket.

Meaning:

  • Updates, backups, performance tuning, OS patches: we do
  • App management, user management, sharing: you do, in the GUI
  • OCC tasks: on request via support ticket — we execute

That’s deliberate. It means:

  • You can’t accidentally wreck the setup
  • We can maintain the setup predictably
  • Backup mechanisms aren’t broken by unknown manual interventions

OCC — what it is

occ (officially: the occ command, short for “ownCloud Console” — a historical name) is Nextcloud’s command-line tool. It handles tasks the GUI doesn’t offer:

  • Change the full configuration in config.php
  • Force a file scan / re-indexing
  • User actions without the GUI (mass imports, etc.)
  • Trigger cron jobs manually
  • Repair commands (occ maintenance:repair)
  • Re-index the full-text search
  • Theming reset
  • Manage encryption keys

Functionally very powerful — dangerous when used wrong.

When OCC makes sense

Typical cases where we run OCC commands via ticket:

Database index problems

Symptom: poor performance despite new hardware. Cause: missing database indexes after an app update.

Fix: occ db:add-missing-indices. We run it.

File scan after storage manipulation

If files landed on the storage manually (very rare — e.g. a migration), Nextcloud doesn’t know about them. Fix: occ files:scan --all. Takes hours on large setups.

App management broken in the GUI

Sometimes app management hangs after a failed update. Fix: occ app:disable <appname> + reinstall.

LDAP/SAML configuration

Complex identity-provider setups sometimes need CLI configuration.

Retraining the Recognize model

occ recognize:reanalyze — after misdetections or newly added people.

Repair after an aborted update

occ maintenance:repair — for the very rare cases where an update was interrupted mid-run (power loss, etc.).

How you request OCC commands from us

Via support ticket: write what you want to achieve (ideally with an example or the error message). We check, execute, report back.

Example ticket:

Hi, we installed a larger Nextcloud app yesterday (Recognize), and the gallery has been very slow since. Could you run occ db:add-missing-indices? Thanks!

We typically do this within 1 business day, faster in urgent cases.

SSH access — is that possible?

No. Your Nextcloud runs fully managed — shell access to the system would make our maintenance, updates and backups incalculable. Everything that works via OCC, we run for you via ticket (see above); logs are visible in the admin GUI under Administration settings → Logging. If you have a use case that seemingly requires a shell: describe the problem in a ticket — in almost all cases there’s a way without one.

Which OCC commands are worth knowing anyway

As a Nextcloud admin (even without shell access) it’s still useful to understand the commands — in case we mention them in mails/tickets:

CommandWhat it does
occ statusVersion info, maintenance mode
occ db:add-missing-indicesAdd missing database indexes, performance
occ files:scan --allFull re-scan of all files
occ app:listAll apps with their status
occ app:enable <app>Enable an app
occ app:disable <app>Disable an app
occ user:listUser list
occ user:resetpassword <user>Password reset for a user
occ maintenance:mode --on/--offEnable/disable maintenance mode
occ config:list systemShow the system config

More in the official Nextcloud documentation.

What experience has taught us

From our setups:

  • 90% of all “I need SSH” requests are actually GUI tasks the customer doesn’t know about. We help with a GUI walk-through first.
  • 8% are genuine OCC cases — we handle those via ticket.
  • 2% are special cases (custom migrations, very particular setup wishes) — we solve those together via ticket, with a plan instead of a shell.

Which means: describe the problem, not the kind of access you’d like — there’s usually a more elegant solution.

Backup restore

If something has genuinely gone wrong (through your own action or ours):

  • We keep seven daily backups, managed by us and accessible exclusively to us; longer retention or shorter intervals we set up on request
  • The backups are mirrored across sites — a site outage never hits all copies at once
  • A restore takes time (large setup: 1–4 hours) but works reliably
  • Open a ticket: “please restore from

More in the plan details on the Nextcloud page.

Frequently asked questions

Can I run occ in the web GUI? There’s a small admin web OCC app, but we don’t enable it by default — the risk of someone turning on maintenance mode and never turning it off again is too high.

How long does a typical OCC command take with you? Fast commands (status, app:enable): under 1 minute once the ticket is picked up. Long commands (files:scan on 1 TB of storage): several hours, we send progress updates.

What does an OCC command cost? On the standard plan: included in the support flat rate. For frequent or complex requests, extra costs may apply — we tell you beforehand.

Viewing logs — how? In the admin GUI: Administration settings → Logging. Shows the most recent log entries, with filtering. For deeper log diving (apache_access.log, php-fpm.log): open a ticket, we deliver the relevant excerpts.

Triggering cron jobs manually? The GUI usually has no option for that. Via ticket we can trigger cron immediately (e.g. after a Recognize update).

What happens with the OCC commands you run — is there an audit log? We keep internal logs of what we execute — traceable per ticket.

App update via OCC vs the GUI? Both do the same. The GUI update is the usual way. OCC only when the GUI hangs or for multi-batch updates.

What’s next

Tags
nextcloud ssh occ support advanced

Did this article help?

If not, open a ticket. If it did, we're happy about a referral — both sides get €25 credit on their customer account.