§2024-08-25

  1. /etc/systemd/system/RocketChatLaiKos.service
[Unit]
Description=The Rocket.Chat server
After=network.target remote-fs.target nss-lookup.target nginx.service mongod.service
[Service]
# ExecStart=/home/alexlai/.local/share/fnm/node-versions/v14.21.3/installation/bin/node /opt/Rocket.Chat/main.js
ExecStart=/bin/bash -c 'printenv; /home/alexlai/.local/share/fnm/node-versions/v20.17.0/installation/bin/node /opt/Rocket.Chat-7.0.0/main.js'
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=rocketchat
User=rocketchat

# Environment="MONGO_URL=mongodb://siteRootAdmin:b23258585@x8664Arch.yushei.com.tw:27017,n2Bookworm.yushei.com.tw:27017,n2Jammy.yushei.com.tw:27017/LaiKos?replicaSet=odroid01&authSource=admin"
# Environment="MONGO_OPLOG_URL=mongodb://siteRootAdmin:b23258585@x8664Arch.yushei.com.tw:27017,n2Bookworm.yushei.com.tw:27017,n2Jammy.yushei.com.tw:27017/LaiKos?replicaSet=odroid01&authSource=admin"
Environment="MONGO_URL=mongodb://siteRootAdmin:b23258585@redisMongo03.yushei.com.tw:27017,redisMongo04.yushei.com.tw:27017,redisMongo05.yushei.com.tw:27017/LaiKos?replicaSet=ys20220318&authSource=admin"
Environment="MONGO_OPLOG_URL=mongodb://siteRootAdmin:b23258585@redisMongo03.yushei.com.tw:27017,redisMongo04.yushei.com.tw:27017,redisMongo05.yushei.com.tw:27017/LaiKos?replicaSet=ys20220318&authSource=admin"

Environment="ROOT_URL=https://munetaka.me:43887/"
Environment="PORT=43887"
Environment="ADMIN_USERNAME=LaiKosAdmin"
Environment="ADMIN_PASS=TseiLienLai#1950"
Environment="ADMIN_EMAIL=rai.sousuke@mac.com"
Environment="MAIL_URL=smtp://alexlai:alex1765@mail.h2Jammy.yushei.net:25/"
[Install]
WantedBy=multi-user.target

  1. LaiKosAdmin exits??? passwaor TsxxLixxLxx#19nn
odroid01 [primary] LaiKos> db.users.find().pretty()
[
  {
    _id: 'rocket.cat',
    createdAt: ISODate('2024-08-25T04:41:09.929Z'),
    avatarOrigin: 'local',
    name: 'Rocket.Cat',
    username: 'rocket.cat',
    status: 'online',
    statusDefault: 'online',
    utcOffset: 0,
    active: true,
    type: 'bot',
    _updatedAt: ISODate('2024-08-25T04:41:10.401Z'),
    roles: [ 'bot' ],
    avatarETag: 'YcHQdjbRKviywSdoP'
  },
  {
    _id: '66cab5e6130aa7a8497fa865',
    createdAt: ISODate('2024-08-25T04:41:10.474Z'),
    avatarOrigin: 'none',
    name: 'Administrator',
    username: 'LaiKosAdmin',
    status: 'offline',
    statusDefault: 'online',
    utcOffset: 0,
    active: true,
    emails: [ { address: 'rai.sousuke@mac.com', verified: false } ],
    type: 'user',
    _updatedAt: ISODate('2024-08-25T04:41:10.669Z'),
    services: {
      password: {
        bcrypt: '$2b$10$s/.CphqbSaA8wWoEWMy8y.KOtxcPA85tKnHmO93FAtGh9M2MQDITC'
      }
    },
    roles: [ 'admin' ]
  }
]
odroid01 [primary] LaiKos> db.users.find().pretty()
  1. Setup Smtp server
  1. add User