/images/avatar.png

Download failed for onlyoffice in mattermost

Problem:

After installing onlyoffice (docker) and onlyoffice-plugin in mattermost. It shows Download failed when open files in mattermost.

https://cdn.jsdelivr.net/gh/JoshuaChou2018/oss@main/uPic/DIVdJf.image-20241219164424601.png

Reason:

JWT_HEADER must be set to a value that is not Authorization, as stated here:

  • JWT Header: If JWT protection is enabled, it is necessary to specify a custom header name since the Mattermost security policy blocks external ‘Authorization’ Headers. This header should be specified in the ONLYOFFICE Docs signature settings as well (further information can be found here).

Reference: https://github.com/ONLYOFFICE/onlyoffice-mattermost?tab=readme-ov-file#plugin-settings

Ext4硬盘空间系统占用

在 Ubuntu 中挂载硬盘后,如果发现硬盘的部分空间显示为“系统占用”或不可用,可能是由于:

  • Ext4 默认会预留 5% 的空间给root,以便在磁盘空间耗尽时仍可进行系统操作。这部分空间通常也会显示为“系统占用”。

解决方法

  • 如果这是数据盘而非系统盘,可以使用

    1
    
    sudo tune2fs -m 0 /dev/sdX1
    

nextcloud配置smtp邮件服务器

问题描述

smtp服务器已配置ssl,支持465端口并且在其它软件中均可正常配置。但是使用nextcloud-aio-nextcloud docker,在Nextcloud中配置自建smtp服务器时总是遇到报错:

1
“A problem occurred while sending the email. Please revise your settings. (Error: Email could not be sent. Check your mail server log)”

解决方案

修改config.php文件,首先在nextcloud-aio-nextcloud docker中定位数据卷的位置,如/var/lib/docker/volumes/nextcloud_aio_nextcloud/_data,在这个文件夹下的config/config.php即为配置文件。

config/config.php中加入一行以下内容,即可解决问题:

1
2
3
4
5
6
7
8
9
'mail_smtpstreamoptions' =>
  array (
    'ssl' =>
    array (
      'allow_self_signed' => true,
      'verify_peer' => false,
      'verify_peer_name' => false,
    ),
  ),

手动创建swapfile文件以配置swap

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
free -h
sudo swapoff /swapfile  
sudo rm  /swapfile
df -h
sudo fallocate -l 64G /swapfile
ls -lh /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo swapon --show
free -h
sudo cp /etc/fstab /etc/fstab.bak
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab