neko/webpage/docs/configuration/plugins.md
2025-03-22 23:02:57 +01:00

3.1 KiB

description
Configuration related to the Neko plugins.

import { Def, Opt } from '@site/src/components/Anchor';

Plugins Configuration

Neko allows you to extend its functionality by using plugins. Go plugins come with a lot of benefits as well as some limitations. The main advantage is that you can extend the functionality of the application without recompiling the main application. But the main limitation is that you need to use the same Go version and all dependencies with the same version as the main application.

plugins:
  enabled: true
  required: true
  dir: "./bin/plugins"
  • enables the plugin support. If set to false, the plugins are not loaded.
  • makes the plugin loading mandatory, meaning that if a plugin fails to load, the application will not start.
  • refers to the directory where the plugins are stored.

:::danger External plugins are experimental and may not work as expected. They will be replaced with hashicorp/go-plugin in the future. :::

There exist a few pre-loaded internal plugins that are shipped with Neko:

Chat Plugin

The chat plugin is a simple pre-loaded internal plugin that allows you to chat with other users in the same session. The chat messages are sent to the server and then broadcasted to all users in the same session.

chat:
  enabled: true
  • enables the chat support. If set to false, the chat is disabled.

The chat plugin extends user profile and room settings by adding the following fields:

plugins:
  chat.can_send: true
  chat.can_receive: true
  • chat.can_send in the room settings context controls whether the chat messages can be sent by any user in the room, and in the user's profile context controls whether the user can send chat messages.
  • chat.can_receive in the room settings context controls whether the chat messages can be received by any user in the room, and in the user's profile context controls whether the user can receive chat messages.

File Transfer Plugin

The file transfer plugin is a simple pre-loaded internal plugin that allows you to transfer files between the client and the server. The files are uploaded to the server and then downloaded by the client.

filetransfer:
  enabled: true
  dir: "./uploads"
  refresh_interval: 30s
  • enables the file transfer support. If set to false, the file transfer is disabled.
  • refers to the directory where the files are stored.
  • refers to the interval at which the file list is refreshed.

The file transfer plugin extends user profile and room settings by adding the following fields:

plugins:
  filetransfer.enabled: true
  • filetransfer.enabled in the room settings context controls whether the file transfer is enabled for any user in the room, and in the user's profile context controls whether the user can transfer files.