Content Management

Nextcloud Full Text Search: Complete Setup Guide

J
James Eriksson
··13 min read
Learn how Nextcloud full text search indexes document content with Elasticsearch or SQL. Setup guide covers architecture, file types, performance requirements, and troubleshooting.
TL;DR
  • Nextcloud full text search indexes content inside files, not just filenames, allowing you to find text within PDFs, Office documents, and images via OCR.
  • The feature uses a three-part architecture: core framework app + platform app (Elasticsearch or SQL) + provider app (e.g., Full text search - Files).
  • Elasticsearch requires ~4GB RAM minimum and is faster but complex; SQL backend uses your existing database and is simpler but slower on large datasets.
  • Initial indexing can take hours on large instances; OCR adds significant time but unlocks image searchability.
  • Elasticsearch 7 to 8 compatibility break at Nextcloud 26.0.0+ requires infrastructure upgrades; managed hosting providers handle this for you.

Nextcloud full text search (FTS) lets you search inside documents and files, not just their names. A basic filename search finds "budget.pdf," but FTS finds "budget.pdf" because the word "budget" appears on page three of the document.

Full text search indexes the content inside your files and makes it searchable. Without it, Nextcloud can only match words in filenames and folder names. With FTS enabled, you search the actual text within PDFs, Word documents, spreadsheets, images (via OCR), and plain text files.

The use case is practical: you store 500 project files in Nextcloud. Your team lead asks, "Show me every file mentioning the Acme contract." Filename search returns nothing. Full text search returns 27 files with "Acme" inside, ranked by relevance.

Nextcloud's FTS is not built-in. You must install and configure it yourself. The feature is optional because it requires additional infrastructure: either a separate Elasticsearch server or a database-backed index. Self-hosted instances need to handle the setup overhead. Managed Nextcloud hosting providers often handle this complexity on your behalf.

How Does Full Text Search Work: The Three-Part Architecture

Nextcloud full text search has three separate layers. Understanding this saves you from configuration confusion later.

The first layer is the core framework. This is the backbone app named "Full text search." It handles the search interface, query parsing, and indexing workflow. You install this from the Nextcloud App Store.

The second layer is the platform app. This is the backend that actually stores and retrieves indexed content. You choose one: Elasticsearch or SQL. The Elasticsearch platform app is maintained by Maxence Lange and supports Nextcloud up to version 35 (last updated 3 weeks ago). The SQL platform app is maintained by Jan-Philipp Litza and supports Nextcloud up to version 34 (last updated 1 week ago). The SQL option runs on your existing database; Elasticsearch requires a separate Java service.

The third layer is the provider app. This extracts text from specific file types. The most common provider is "Full text search - Files," which extracts text from the Files app. Other providers exist for Mail, Bookmarks, and Notes. A single Nextcloud instance can have multiple provider apps active, indexing content from different apps simultaneously.

You must install all three layers for FTS to work: framework + platform + provider.

FTS indexing depends on what provider apps and text extraction tools you install. Here is what you can index by default:

Plain text and markup:.txt,.md,.rst,.json,.xml,.csv,.log files are fully searchable.

Office documents: Microsoft Word (.docx), Excel (.xlsx), PowerPoint (.pptx), and LibreOffice equivalents (.odt,.ods,.odp) are indexed. Text and spreadsheet cells are searchable.

PDFs: PDF files are searchable if you install pdftotext (a standard Linux utility). The full text of the PDF is extracted and indexed.

Images with OCR: If you install Tesseract OCR, images (.jpg,.png,.gif) can be scanned for text. Tesseract extracts text from photographs and scanned documents. OCR is slow--an image with 500 words might take 10-30 seconds to index--but it works.

Binary files and archives:.zip,.tar,.exe,.bin files are not indexed. Binary formats have no text to extract.

Your FTS speed and comprehensiveness depend on which extraction tools you install. A minimal setup indexes plain text and Office documents. A full setup adds pdftotext, Tesseract, and other extractors, but indexing times increase significantly.

Performance and Resource Requirements

Full text search is not free. Running it demands memory, CPU, and disk space. Knowing the costs upfront prevents deployment surprises.

Elasticsearch backend: Elasticsearch is a separate Java service that requires memory and disk. A modest Elasticsearch instance needs a minimum of 2GB RAM but 4GB is recommended for reliable performance on any reasonably sized Nextcloud instance. A dedicated Elasticsearch server can consume 8GB or more on large deployments. Elasticsearch also stores a copy of all indexed content, so if your Nextcloud holds 100GB of files, your Elasticsearch database will also consume significant disk space.

SQL backend: The SQL platform app indexes directly to your existing Nextcloud database (MariaDB, PostgreSQL, or MySQL). It avoids the overhead of a separate Elasticsearch service. The tradeoff is performance: database indexes are slower than Elasticsearch for large text searches. The SQL backend is suitable for small to medium instances (under 50GB of indexed content) but degrades on larger deployments.

CPU and indexing time: Initial indexing is CPU-intensive. On a typical small instance (1-10GB of files), the first full index takes 30 minutes to a few hours. On larger instances (100GB+), initial indexing can take 24+ hours. Incremental indexing (new files) is much faster, typically seconds to minutes depending on file size and content extraction complexity.

OCR overhead: Tesseract OCR is especially resource-intensive. If you enable OCR on large image collections, indexing time can double or triple. OCR is best run during off-peak hours via a scheduled cron job.

Here is the step-by-step process to activate FTS on a Nextcloud instance running Linux/Debian.

Step 1: Install the core framework app. Log in to Nextcloud as an administrator. Go to Administration > App Store. Search for "Full text search." Click "Download and enable." Wait for the installation to complete.

Step 2: Install the platform app. In the App Store, search for either "Full text search - Elasticsearch" or "Full text search - SQL." Choose one. If you have a separate Elasticsearch server ready, choose Elasticsearch. If you want to keep everything in your database, choose SQL. Download and enable your choice.

Step 3: Install the provider app. Search for "Full text search - Files." Download and enable it. This provider extracts text from the Files app.

Step 4: Configure the platform in Admin Settings. Go to Nextcloud Admin Settings > Full text search. You will see a configuration panel for your chosen platform (Elasticsearch or SQL). For Elasticsearch, you must enter the server address, port, and optionally a username and password. For SQL, there is little to configure; it uses your existing database connection.

Step 5: Initialize collections via command line. Open a terminal on your Nextcloud server and run:

php occ fulltextsearch:index

This command initializes the index and begins crawling your files. It will run synchronously, blocking the console until done. For large instances, run it in the background:

php occ fulltextsearch:index &

Step 6: Verify activation. Go to Nextcloud and search for a word you know exists inside a file. If FTS is working, it will return that file. If nothing appears, check the Nextcloud logs at data/nextcloud.log for errors.

Configuring Your Backend

Your choice of platform (Elasticsearch or SQL) determines what configuration options are available.

Elasticsearch configuration: In Nextcloud Admin Settings, you enter:

  • Elasticsearch server address (e.g., 192.168.1.50 or elasticsearch.example.com)
  • Port (default 9200)
  • Index name (e.g., "nextcloud")
  • Optional username and password if authentication is enabled
  • Optional SSL/TLS settings if you require encrypted connection

Elasticsearch uses analyzers and tokenizers to break text into searchable terms. Nextcloud defaults are sensible for English text. If your instance uses other languages, you may need to configure language-specific analyzers in Elasticsearch.

SQL configuration: SQL backend configuration is minimal. Nextcloud uses your existing database connection. You may optionally configure the number of results returned per query, but this is usually left at the default.

OCR setup: If you installed Tesseract and the OCR provider app, OCR is enabled by default in Nextcloud 27+. You can configure:

  • OCR language packs (download additional languages for Tesseract if needed)
  • OCR processing mode (asynchronous vs. immediate--asynchronous is recommended for large batches)

Scheduled background jobs: For ongoing indexing of new and changed files, configure Nextcloud to use background jobs (Cron). Go to Admin Settings > Basic settings and ensure "Use system cron for background jobs" is selected. Then add a cron entry on your server:

*/5 * * * * /usr/bin/php /path/to/nextcloud/occ fulltextsearch:live-index

This runs the live-index every 5 minutes, updating the search index with any new or modified files.

Generating and Maintaining the Index

The initial index is built once, but maintaining it requires ongoing work.

Initial indexing: Run the command above and let it complete. For large instances, this may take hours. Do not interrupt it. If the process times out, the Nextcloud web interface may show an error, but the indexing continues in the background. Check the system logs to monitor progress.

Incremental indexing: After the initial build, new and modified files are indexed automatically via the live-index cron job. This is fast: a new 5MB document is indexed in a few seconds to a minute, depending on file type and extraction speed.

Reindexing after Nextcloud updates: Major Nextcloud version upgrades sometimes require a full index rebuild. Nextcloud 26 to 27 introduced a breaking change: it required Elasticsearch 7 or later, and it dropped support for Elasticsearch 6. If you upgrade from Nextcloud 25 to 27 with Elasticsearch 6 in place, FTS stops working. You must either upgrade Elasticsearch to version 8 or rebuild the index. To rebuild:

php occ fulltextsearch:reset
php occ fulltextsearch:index

Monitoring index size: Monitor your Elasticsearch or database disk usage over time. The index size typically grows to 30-50% of your actual file storage size. If disk space is low, you may need to delete older indexed content or expand storage.

Common Issues and Troubleshooting

Full text search is powerful but has known gotchas. Here are the most frequent problems and solutions.

Elasticsearch 7 to 8 compatibility break: Nextcloud 26.0.0 and later require Elasticsearch 8 or later and dropped support for Elasticsearch 7. If you upgrade Nextcloud to version 26+ with Elasticsearch 7 still running, the indexing service will fail. Symptoms: FTS returns no results, and logs show "Elasticsearch version too old." Solution: Upgrade Elasticsearch to version 8 on your server, then rebuild the index with:

php occ fulltextsearch:reset
php occ fulltextsearch:index

Slow or stalled indexing: If indexing appears to hang or runs very slowly, check:

  • Elasticsearch service status (systemctl status elasticsearch or docker ps for containers)
  • Available RAM on the Elasticsearch server
  • Disk space on the Elasticsearch storage volume
  • Nextcloud error logs for timeout messages

If timeouts occur, increase the Nextcloud index batch size or the Elasticsearch JVM heap size (if using Elasticsearch).

OCR producing gibberish: If OCR indexes text that does not match the actual image, this usually means Tesseract was trained on a different language or character set. Solution: Install the correct language pack for Tesseract and reconfigure OCR settings in Nextcloud Admin Settings.

Search results returning files from before index reset: After a reset and rebuild, old cached results may appear. Solution: Clear the Nextcloud browser cache and wait for the live-index cron job to run at least once.

SSL or authentication failures to Elasticsearch: If Nextcloud cannot connect to a remote Elasticsearch server, verify:

  • The Elasticsearch server address is correct and reachable from the Nextcloud server
  • If using SSL, ensure the certificate is trusted
  • If using authentication, verify username and password in the admin configuration
  • Check Nextcloud logs and Elasticsearch logs for connection errors

What Nextcloud Hosting Takes Off Your Plate

Full text search adds layers of operational complexity: Elasticsearch memory tuning, version compatibility between Nextcloud and Elasticsearch, OCR performance tuning, index rebuilds on upgrades, monitoring disk usage. Each piece requires attention.

Managed Nextcloud hosting providers, including Opsily, handle this complexity. They provision appropriately sized Elasticsearch or SQL backends, monitor index health, perform version upgrades without breaking FTS, and configure OCR for your content type. You install the apps; they ensure the infrastructure is correct.

For self-hosted instances, FTS is achievable but requires operator experience. For teams prioritizing stability and search performance over hands-on administration, managed hosting is the practical choice.

Get started with Opsily's managed Nextcloud hosting and let us handle the complexity of search infrastructure.

Frequently Asked Questions

Basic search matches only filenames and folder names. Full text search indexes the content inside documents: every word in a PDF, every cell in a spreadsheet, every line of a text file. You can find a document by searching for words on page 5, not just its filename.

Does full text search work with Nextcloud on iOS?

The Nextcloud iOS app does not expose FTS directly. However, you can search via the web interface on any device. The search results will include indexed content. Mobile apps may not show advanced search options, but the index itself is built and available via web search.

If you disable or uninstall the FTS apps, the index remains in your database or Elasticsearch (depending on your platform). Search reverts to filename-only matching. You can re-enable FTS later and use the existing index without rebuilding it from scratch.

Can I use full text search with encrypted files?

No. Encrypted files cannot be read by the text extraction tools, so they cannot be indexed. The files remain in Nextcloud, but their content is not searchable. Consider using Nextcloud's built-in encryption carefully if you rely on FTS.

Normal live-index (via cron job running every 5 minutes) handles new and changed files automatically. You only need a full reindex if you upgrade Nextcloud to a major version that changes FTS compatibility or if you suspect the index is corrupted. Full rebuilds are rare.

Is full text search enabled by default in Nextcloud?

No. FTS is an optional feature. Most Nextcloud deployments do not have it enabled. You must manually install the three components (core framework + platform + provider) to activate it.

Can I search across multiple Nextcloud instances with one Elasticsearch server?

Yes. A single Elasticsearch service can host indexes from multiple Nextcloud instances. Each instance uses a different index name (e.g., "nextcloud-instance-1" and "nextcloud-instance-2"). This is common in larger deployments.

SQL backend uses your existing database and is simpler to deploy but slower on large datasets. Elasticsearch is a separate service requiring more infrastructure but performs much faster for large-scale full text searches. Choose SQL for small instances (under 50GB indexed); choose Elasticsearch for large instances.

The Bottom Line

Nextcloud full text search is a powerful feature that turns your file storage into a searchable knowledge base. It requires installing three separate components and choosing a backend platform (Elasticsearch or SQL), but it works reliably once configured.

The real cost is operational overhead: managing Elasticsearch memory, rebuilding indexes on version upgrades, and monitoring performance. Self-hosting FTS is achievable for teams with infrastructure experience. Teams without that expertise benefit from managed hosting, where the infrastructure is maintained for you.

If you are evaluating Nextcloud for your team, full text search should influence your decision on whether to self-host or use managed hosting. Get started with Opsily's managed Nextcloud hosting and let us handle the complexity of search infrastructure.

Run Nextcloud with search built in
Opsily manages full text search infrastructure so you get indexed content without the operational overhead.
Get Started Free

Ready to self-host your own apps?

One server. Multiple apps. No per-app fees.

Get started →