AI in Nextcloud: what, why and how

Originally published at: https://nextcloud.com/blog/ai-in-nextcloud-what-why-and-how/

Over the last year, AI has become a popular topic. Some is hype, some is substance. Some is good, some is bad. We want to give you the good, not the bad, and ignore the hype!

AI has a ton of opportunity – but also risk. So we put you in control – off by default!

– Frank Karlitschek, CEO of Nextcloud GmbH

In Nextcloud Hub 4 and 5, we’ve focused on providing you the best tools that AI has to offer. Benefits like improving your work productivity and jump starting creativity, AI features can enhance your Nextcloud experience.

To fit everyone’s needs, we offer several types of integrations for AI, from completely self-hosted options to integrations with external services.

If you’re interested in setting up Nextcloud’s AI features on your instance, then keep reading for a breakdown of how to enable and use each one! 💙

Self-hosted vs. integrations from external services

First, let’s understand the difference between self-hosted AI features versus integrations from external services.

All self-hosted AI features are built-in and only run on YOUR server, meaning no data leaves your premises and you’re in full control. Our self-hosted options can be installed from the Nextcloud App Store. Some are built-in and some require some command line commands to be run to download Ai models.

We also offer AI features using remote AI services from companies like DeepL and OpenAI (ChatGPT and DALL·E). These features can be enabled on your server but data from the app is sent to the third party. Note that nothing is ever sent to external services by default unless you explicitly enable those features or install the related apps. However, if you like these services, then they are available to you!

Ethical AI Rating

For some use cases, tools like ChatGPT might be a reasonable solution, while for other data, it is paramount to have a local, on-prem, open solution. To differentiate these, we developed an Ethical AI Rating.

For every AI feature that Nextcloud supports, a rating is established. This shows you the risks you take with your data is when using a feature and it gives you a quick insight into the ethical implications of your choice.

Based on these conditions:

Is the software open source? (Both for inferencing and training)

Is the trained model freely available for self-hosting?

Is the training data available and free to use?

The rating has four levels:

Green 🟢

All conditions are met

Yellow 🟡

2 conditions are met

Orange 🟠

Only 1 condition is met

Red 🔴

No conditions are met

Now, let’s learn about Nextcloud’s AI features, their rating and how to enable and use them!

About LocalAI

LocalAI is an open source API that allows you to set up and use many AI features to run locally on your server. However instead of connecting to the OpenAI API for these, you can also connect to a self-hosted LocalAI instance with the Nextcloud LocalAI integration app.

The AI features LocalAI supports:

  • Image generation
  • Text generation
  • Speech-to-text dictation

1. Image generation

Your cloud is full of photos, but sometimes the image you need isn’t there. Maybe it is somewhere on the web, or maybe you can only visualize it in your head? With AI image generation, you can type in keywords to create the image you’re imagining. Your instant AI generated image can be inserted into a Talk chat, Notes and much more.

3 options to generate images:

  1. Online StableDiffusion based generator via Replicate’s remote API – Orange rating 🟠
  2. Self-hosted StableDiffusion using the OpenAI app- Yellow rating 🟡
  3. Online DALL·E 2 – Red rating 🔴

How to enable:

To use OpenAI’s DALL·E 2 images or the on-premises StableDiffusion based generator, just install the OpenAI integration app. You can find instructions to get the model in the settings!

This feature is very versatile on Nextcloud, being able to insert an AI generated image in a document, Talk chat and more. To use this feature in your Nextcloud, open up the Smart Picker by typing a slash (/) in your document, Talk chat and more!

2. Text generation

How do you craft intelligent, professional text? With the text generating tool in Nextcloud Talk, Office and Mail of course!

On-premises option: Green rating🟢

  • Self-hosted instance of LocalAI that runs language models locally.

External service integration: Red rating 🔴

  • ChatGPT with GPT-3 and GPT-4 models by OpenAI.

How to enable:

For the on-premises option, you also install the OpenAI app to communicate with a self-hosted instance of LocalAI which can run language models to generate text. See instructions.

To use OpenAI’s ChatGPT, install the OpenAI integration app.

3. Speech-to-text dictation

Sometimes, it’s easier to say something out loud. With Nextcloud’s speech-to-text dictation feature, you can formulate text through your voice. Use your spoken words to send a message in a Nextcloud Talk chat, in an email and through many more applications.

On-premises option: Green rating 🟢

  • The on-premises version can be enabled with the OpenAI app. In your Nextcloud settings, configure the OpenAI integration app to use your self-hosted Local AI instance.

External service integration: Yellow rating 🟡

  • The external service integration option utilizes Whisper, as seen below.

4. Speech-to-text transcription

In the speech-to-text transcription feature, your call recordings can be automatically transcribed. This smart feature is great for recording what was said during important meetings for your record keeping.

How to enable: Green rating🟢

If the OpenAI integration is installed and configured (using either OpenAI or LocalAI), Talk will be able to automatically produce speech-to-text transcriptions of call recordings. You will receive a transcription file just like the video recording file right after the recorded call ends.

5. Smart Inbox in Mail

Now let’s talk about our smart feature in Mail. Nextcloud Mail uses Machine Learning (ML) to classify the importance of incoming emails based on your historical data and pattern recognition. This provides you a priority inbox, where your most important messages are at the top. Due to the ML technology, your data never leaves the server.

How to enable: Green rating🟢

Luckily for you, this feature is already integrated by default. However, if you want to disable it at any time, you can do so in the bottom left settings of the Mail app.

Join our upcoming Nextcloud webinar and learn to tap into the power of AI while safeguarding and controlling your data!

Register now

6. Face and object recognition – Green rating 🟢

In your Nextcloud Photos, you can quickly find people, places or objects when using the Recognize app. Recognize goes through your media collection and adds fitting tags which automatically categorize your photos, and even music!

The way Recognize works is through training an artificial neural network that recognizes patterns which yields the results we see. You can learn more about how the app works and facial recognition technology in the blog.

How to enable:

To get face recognition in your Nextcloud, install the Recognize app in the Nextcloud App Store.

“This app is incredible! It works really well. Very easy to set up. It takes a long time for the first recognition, but man, is it worth it! I expected face recognition working well, but I did not expect the tags feature working very well also! It created tags I did not think is possible. Super useful!”

György Kiss, Recognize apps rating

7. Background images and blurring in video calls

Before joining a video call, you have the opportunity to change your background to an image of your choice or add a blur effect. It so happens that this blur “effect” is actually a complex computing contouring that uses Machine Learning (ML). Nextcloud uses the Jitsu library and a model called MediaPipe (both open source) to create this effect.

How to enable: Green rating🟢

This feature is ready to be used once you’ve installed Hub 5.

8. Translation tools

In today’s connected world, you’re bound to be put in a situation where you need to translate a message, word or piece of text in another language. Now you can translate anything with Nextcloud!

Local translation – Green rating 🟢

Nextcloud provides a translation service app that runs locally on your server. Using open source Opus models by University of Helsinki in Finland, you can rest assured no data can leak.

Use local translation in Nextcloud Talk to translate a message in a chat or in a Text document.

Witness how your writing can be instantly translated in Nextcloud Text.

How to enable:

Enable local translation by installing the Translate app! Languages supported are: English, German, French, Spanish and Chinese so far.

LibreTranslate – Green rating 🟢

The LibreTranslate integration provides translations using your own server/api key. This translation tool uses open source OpenNMT models.

DeepL translation – Red rating🔴

You also have the option to use the external service integration DeepL. DeepL is a popular translator based in Germany that provides translations in 29 different languages.

DeepL receives a red rating because they use proprietary models and the app connects to their website. Since DeepL is a separate service, data put into this model on your server will be sent to them. Take care to read about DeepL’s privacy protocols and what they do with your data.

9. Suspicious login detection 🕵️‍♂️

Suspicious login detection detects and warns you about suspicious IPs logging into your Nextcloud.

This feature works through learning your behavior of logins – when and where – so if a suspicious login occurs, you’ll be notified in time to change your password or upgrade your security controls.

How to enable: Green rating🟢

Suspicious login detection was once an app, but now it is integrated right into your instance. Just go to your admin settings and click on security. As always, the feature can be enabled or disabled per your preference.

Join our upcoming Nextcloud webinar and learn to tap into the power of AI while safeguarding and controlling your data!

Register now

4 Likes

This, right here, is exactly the write-up I’ve been wanting to see since the Hub 5 announcement! I know it takes a while to get details hammered out and all the ducks in a row, but I’m very glad it’s all ready now!
In addition to instructions, having a clear and simple rating system (with details linked if you need them) is an absolute win!

As my available time has waxed and waned, I’m no longer a Bug Hunter and haven’t upgraded to Hub 5 yet… but this gives me a strong reason to do so! Can’t wait for the next free weekend… :smiling_face_with_tear:

LocalAI does not seem production ready.
OpenAI is a bit of a can of worms right now, their pricing is anything but straight forward.
I am looking forward to when AI is possible on a local server.