Integrating Uptime Kuma v2 with Nextcloud Talk (Nextcloud AIO)

Integrating Uptime Kuma v2 with Nextcloud Talk (Nextcloud AIO)

This guide explains how to integrate Uptime Kuma v2 with Nextcloud 32 (Nextcloud AIO) and Nextcloud Talk, allowing monitoring alerts to be automatically sent into a Talk conversation.

Once configured, when a monitored service goes down, a notification will automatically appear in the Talk room.

Example of a message in Talk when a service fails:

[Audiobookshelf] πŸ”΄ Down Request failed with status code 502

And when the service recovers:

[Audiobookshelf] βœ… Up 200 - OK


Prerequisites

Before starting, ensure the following environment is available:

  • Nextcloud 32.x

  • Nextcloud Talk app installed

  • Nextcloud AIO (All-in-One)

  • Uptime Kuma v2

You will also need:

  • administrative access to the Nextcloud server

  • terminal access (SSH)

  • access to the Uptime Kuma web interface


Integration Architecture

The communication between the systems works as follows:

Uptime Kuma
     β”‚
     β”‚ notification
     β–Ό
Nextcloud Talk Bot
     β”‚
     β–Ό
Talk conversation

Uptime Kuma sends notifications directly to the Talk conversation using a Talk bot.


1. Create a conversation in Nextcloud Talk

First, create a conversation (room) where monitoring alerts will be sent.

Steps:

  1. Log in to the Nextcloud web interface

  2. Open the Talk application

  3. Click New conversation

  4. Enter a name, for example:

infra-alerts

  1. Create the conversation

This room will serve as a channel for infrastructure alerts.


2. Obtain the Conversation Token

After opening the conversation, the browser URL will look similar to this:

https://cloud.example.com/call/abcd1234

The part after /call/ is the Conversation Token:

abcd1234

This token will be required when configuring notifications.


3. Create a Talk bot

Nextcloud Talk allows creating bots using an OCC command.

With Nextcloud AIO, the command must be executed inside the Nextcloud container.

Run:

sudo docker exec -it nextcloud-aio-nextcloud php occ talk:bot:create "Uptime Kuma Bot"

After running the command, Nextcloud will:

  • create a new Talk bot

  • automatically generate a secure secret token

Example output:

Bot created successfully
Bot ID: 16
Secret: 3cfa8b8c5e4e1f7b7d2c2a0c0a9c0e4f7c8a3b9e2d1c6f5a4b3c2d1e0f9a8b7

Save the following values:

Bot ID
Bot Secret

They will be needed in later steps.


4. Add the bot to the conversation

The bot must be added to the Talk room so it can send messages.

Run the following command:

sudo docker exec -it nextcloud-aio-nextcloud php occ talk:bot:setup BOT_ID CONVERSATION_TOKEN

Example:

sudo docker exec -it nextcloud-aio-nextcloud php occ talk:bot:setup 16 abcd1234

If the configuration is correct, you will see:

Successfully set up for conversation abcd1234

The bot is now connected to the conversation and can send messages to it.


5. Verify the bot configuration

To list all configured Talk bots, run:

sudo docker exec -it nextcloud-aio-nextcloud php occ talk:bot:list

Example output:

ID | Name            | features
16 | Uptime Kuma Bot | response

This command is useful if multiple bots exist on the system.


6. Configure the notification in Uptime Kuma

Open the Uptime Kuma web interface.

Navigate to:

Settings
β†’ Notifications
β†’ Add New Notification
β†’ Nextcloud Talk

Fill in the following values.

Friendly Name

Nextcloud Talk Alerts

Nextcloud host

https://cloud.example.com

Conversation token

abcd1234

Bot secret

Use the secret token generated when the bot was created.

Example:

3cfa8b8c5e4e1f7b7d2c2a0c0a9c0e4f7c8a3b9e2d1c6f5a4b3c2d1e0f9a8b7

Save the configuration.


7. Test the notification

Click the Test button.

If everything is configured correctly, a message will appear in the Talk room:

My Nextcloud Talk Alert Testing

This confirms that the integration between Uptime Kuma and Nextcloud Talk is working.


8. Assign the notification to monitors

To receive alerts, the notifier must be assigned to specific monitors.

Steps:

  1. Open a monitor in Uptime Kuma

  2. Click Edit

  3. Go to the Notifications section

  4. Select:

Nextcloud Talk Alerts

After saving, Uptime Kuma will send notifications whenever the monitor status changes.


Resulting alerts in Talk

When a service goes down:

[Audiobookshelf] πŸ”΄ Down Request failed with status code 502

When the service recovers:

[Audiobookshelf] βœ… Up 200 - OK


Recommendations for clearer alerts

It is good practice to use clear monitor names.

Example:

πŸ–₯ Proxmox
🎬 Plex
πŸ“š Audiobookshelf
πŸ’Ύ PBS Backup

Alerts in Talk will then appear like:

[🎬 Plex] πŸ”΄ Down Request failed with status code 502

This makes it easier to immediately identify the affected service.

1 Like

Uninstalling the Nextcloud Talk Bot

If the integration is no longer needed, the Talk bot can be safely uninstall from the system.

This operation does not affect existing Talk conversations or messages.
It only uninstall the bot entry from Nextcloud.

The procedure consists of two steps:

  1. identifying the bot ID

  2. uninstalling the bot


1. Listing existing Talk bots

First, list all configured Talk bots to determine the Bot ID.

Run:

sudo docker exec -it nextcloud-aio-nextcloud php occ talk:bot:list

Example output:

+----+------------------+-------------------+
| id | name             | features          |
+----+------------------+-------------------+
| 16 | Uptime Kuma Bot  | response          |
+----+------------------+-------------------+

In this example, the Bot ID is:

16


2. Uninstalling the Talk bot

To uninstall the bot, run the following command:

sudo docker exec -it nextcloud-aio-nextcloud php occ talk:bot:uninstall BOT_ID

Example:

sudo docker exec -it nextcloud-aio-nextcloud php occ talk:bot:uninstall 16

If the command succeeds, the bot will be uninstalled from the system.


3. Verifying the uninstalling

To confirm that the bot has been uninstalled, list the bots again:

sudo docker exec -it nextcloud-aio-nextcloud php occ talk:bot:list

The uninstalled bot should no longer appear in the list.


Notes

Uninstalling the bot:

  • does not delete Talk conversations

  • does not remove previously sent messages

  • does not affect Uptime Kuma configuration

However, once the bot is removed, Uptime Kuma will no longer be able to send notifications to Nextcloud Talk.

If needed, the bot can be created again by following the steps described earlier in this guide.

2 Likes

Cool documentation @vawaver!
Just two small things: The webhook capability is not needed, no webhooks are received by uptime kuma. Also since webhook url is invalid, so wouldn’t work either.
In later version to create the bot you can also use Occ commands - Nextcloud Talk API documentation (talk:bot:create). It will even generate a random secret for you, if you don’t provide one.

Glad for the pointer to the documentation. I went through it, tested everything again and updated the guide accordingly.

While revisiting the commands I also clarified the difference between talk:bot:remove and talk:bot:uninstall, which helped clean up that part of the instructions.

If you have a moment, take another look at the guide and let me know if there is anything else that should be corrected, simplified, or expanded.