https://github.com/mattermost-community/mattermost-app-nextcloud
Nextcloud App for Mattermost
https://github.com/mattermost-community/mattermost-app-nextcloud
mattermost mattermost-app
Last synced: 6 months ago
JSON representation
Nextcloud App for Mattermost
- Host: GitHub
- URL: https://github.com/mattermost-community/mattermost-app-nextcloud
- Owner: mattermost-community
- Created: 2023-02-22T08:09:02.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-01-24T10:16:10.000Z (over 1 year ago)
- Last Synced: 2025-04-14T12:14:15.027Z (6 months ago)
- Topics: mattermost, mattermost-app
- Language: Go
- Homepage:
- Size: 152 KB
- Stars: 12
- Watchers: 23
- Forks: 4
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Nextcloud App
A Nextcloud app for Mattermost.
### First steps
#### Setting up
1. Run Mattermost server https://github.com/mattermost/mattermost-server/blob/master/README.md
2. Install/Enable Apps plugin https://github.com/mattermost/mattermost-plugin-apps
3. Run NC server `docker run -d -p 8081:80 nextcloud:latest`
4. Crete NC admin account via opening NC link http://localhost:8081
`Note`: After user creation install recommended apps
5. Inside docker container find config.php and add NC ngrok url to trusted domains
> docker exec -it %NEXTCLOUD_SERVER_DOCKER_CONTAINER_ID% /bin/sh
cd config
apt-get update
apt-get install nano
nano config.php
> 'trusted_domains' =>
array (
0 => 'localhost:8081',
1 => '%YOUR_NC_DOMAIN%.ngrok.io',
),`Note`: For HTTPS connection add to config.php
> 'overwriteprotocol' => 'https',
6. Register a NC app - http(s)://YOUR_NC_URL/settings/admin/security
* as a callback url use - http(s)://YOUR_MM_SERVER/plugins/com.mattermost.apps/apps/nextcloud/oauth2/remote/complete
* Copy the client secret for a future step
7. Run Nextcloud integration server app
* Run `docker-compose up` in the root of the Nextcloud App repository
8. In mattermost channel run `/apps install http http://localhost:8082/manifest.json`
`Note`: For http deploy type JWT_SECRET env variable contains value for Outgoing JWT Secret field#### Link MM account with Nextcloud
1. Run command `/nextcloud configure` and provide Nextcloud instance url ,client id and client secret from register a Nextcloud app step http://YOUR_NC_URL/settings/YOUR_ADMIN_USER/security
2. Run command `/nextcloud connect` and open link from bot response for linking mm with Nextcloud account### Usage
1. `/nextcloud share` - share public link for user file in MM channel
2. `/nextcloud calendars` - show user calendars
3. Message actions - Upload file to Nextcloud### Building aws bundle
In project root run command `make dist-aws`
### Deploy aws bundle with appsctl
https://developers.mattermost.com/integrate/apps/deploy/deploy-aws/`go run ./cmd/appsctl aws deploy -v bundle-aws.zip`
#### Lambda configuration
Increase RAM and timeout ( Lambda -> Configuration -> General Configuration)
Add environmental variables:
( Lambda-> Configuration -> Environment variables)
CHUNK_FILE_SIZE_MB
MAX_FILE_SIZE_MB
MAX_FILES_SIZE_MB
GIN_MODE=release
MAX_REQUEST_RETRIES=3#### HTTP configuration
Add environmental variables:
JWT_SECRET=secret
STATIC_FOLDER=static
APP_TYPE=HTTP
CHUNK_FILE_SIZE_MB=15
MAX_FILE_SIZE_MB=25
MAX_FILES_SIZE_MB=50
APP_URL=http://localhost:8082
PORT=8082
GIN_MODE=release
MAX_REQUEST_RETRIES=3