多用户管理面板 ss-manager 安装教程

By | 2017年9月9日

ss-manager 是一款由 ss 团队开发的多用户管理面板程序,支持 Python 及 libev 版,但官方强烈建议搭配 libev 版使用。相对于 ss-panel 而言,ss-manager 部署安装更为简单,但功能上也有所精简。但如果只是个人分享使用,ss-manager 是完全能够满足需求的。

ss-manager 的安装分为主控机和被控机,均要求已安装好 ss 。有需要的话可以使用一键包进行安装。在安装完成后我们还需要为其准备 node.js 环境,使用以下脚本进行安装即可:

  • curl -sL https://deb.nodesource.com/setup_10.x | bash -
  • apt-get install -y nodejs

Update. 目前 ss-manager 需要 Node.js 10.x ,文章已做更新。如有早期安装过 Node.js 低版本的朋友,在更新到最近版本的 ss-manager 后可能会遇到 no such file or directory 的问题。卸载 Node.js 后重装 10.x 版本即可。

随后直接使用 npm 安装 ss-manager:

  • npm i -g shadowsocks-manager

如果以 root 用户运行,请使用:

  • npm i -g shadowsocks-manager --unsafe-perm

安装完成后新建 ~/.ssmgr 目录,并在其下新建 ss.yml 配置文件:

  • mkdir ~/.ssmgr
  • cd ~/.ssmgr
  • nano ss.yml

内容如下:

type: s
shadowsocks:
  address: 127.0.0.1:4000
manager:
  address: 0.0.0.0:4001
  password: '123456'
db: 'ss.sqlite'

其中4000端口为连接 ssmgr 的端口,4001为接受主控机指令的端口,password 为密码,均可以任意更改。

如果是主控机的话,还要新建一个 webgui.yml ,用于启动管理服务。请注意主控机内存要求至少 512M。webgui.yml 内容如下:

type: m
empty: false

manager:
    address: 1.1.1.1:4001
    password: '123456'
plugins:
  flowSaver:
    use: true
  user:
    use: true
  account:
    use: true
  group:
    use: true
  email:
    use: true
    type: 'smtp'
    username: 'username'
    password: 'password'
    host: 'smtp.your-email.com'
  webgui:
    use: true
    host: '0.0.0.0'
    port: '80'
    site: 'http://yourwebsite.com'
    gcmSenderId: '456102641793'
    gcmAPIKey: 'AAAAGzzdqrE:XXXXXXXXXXXXXX'
  alipay:
    use: true
    appid: 2015012108272442
    notifyUrl: 'http://yourwebsite.com/api/user/alipay/callback'
    merchantPrivateKey: 'xxxxxxxxxxxx'
    alipayPublicKey: 'xxxxxxxxxxx'
    gatewayUrl: 'https://openapi.alipay.com/gateway.do'
  paypal:
    use: true
    mode: 'live'
    client_id: 'At9xcGd1t5L6OrICKNnp2g9'
    client_secret: 'EP40s6pQAZmqp_G_nrU9kKY4XaZph'

db: 'webgui.sqlite'
redis:
host: '127.0.0.1'
port: 6379
db: 0

update:自 0.30 版本起,webgui.yml 需要添加 Redis 配置才能正常工作

其中 address 为主控机的ip,其后的端口需与 ss.yml 中设置的一致,密码为 ss.yml 中设置的密码。stmp 部分作为发送注册邮件的配置,需要对应填写 smtp 服务器的地址,账号及密码。port 为监听端口,建议配合 Nginx 反代,以实现全站 https

site 为网站地址,按实际填写即可。gcm 部分是 Google Cloud Messaging 接口,可以按需配置。末尾的 alipay 和 paypal 部分为可选项,其中支付宝需要进入商家中心进行签约才能使用。

最后在任意目录新建 ssmgr.sh ,用于后台运行:

  • setsid ss-manager -m aes-256-gcm -u --manager-address 127.0.0.1:4000 &
  • setsid ssmgr -c ~/.ssmgr/ss.yml &
  • setsid ssmgr -c ~/.ssmgr/webgui.yml &

其中端口需要与 ss.yml 中设置的 ssmgr 端口一致。如果是被控机,则删除最后一行。最后使用 nohup 运行 ssmgr.sh 即可开启:

  • nohup ./ssmgr.sh &

此时如不出意外,打开网站后已经添加好了本机节点。ss-manager 的第一个注册用户默认为管理员,登陆后可以在后台继续添加服务器。

如果在启动时出现形如 Cannot find module 的红色报错文字是因为 sqlite 未成功安装,手动安装后重新启动即可:

  • cd /usr/lib/node_modules/shadowsocks-manager/
  • npm install sqlite3 --save

如果需要更新的话直接使用 npm 操作即可:

  • killall node
  • npm update -g shadowsocks-manager

最后使用 ssmgr.sh 重新启动服务。

文末小打一个广告

71 thoughts on “多用户管理面板 ss-manager 安装教程

  1. wangli

    博主你好,我按照你的教程操作,折腾了快一周了 老是出现了下面错误,麻烦你给分析一下什么原因,非常感谢:
    [2018-03-31 23:33:37.963] [ERROR] system - { Error: connect ECONNREFUSED 207.148.112.180:14001
    at Object.exports._errnoException (util.js:1020:11)
    at exports._exceptionWithHostPort (util.js:1043:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1105:14)
    code: 'ECONNREFUSED',
    errno: 'ECONNREFUSED',
    syscall: 'connect',
    address: '207.148.112.180',
    port: 14001 }
    [2018-03-31 23:33:37.972] [ERROR] flowSaver - connect to server abcde@207.148.112.180:14001 fail.

    回复
    1. reizhi 博主

      扫了一下你的ip端口是关闭的,在启动服务端之前,一定要先配置好一个客户端。可以是本机,也可以是其它机器。

      回复
      1. wangli

        你好博主, 是不是 我先配置好该VPS的shadowsocks服务,在找一台电脑或者手机配置好能够正常访问该vps的shadowsocks服务,然后 在进行安装 ss-manager,启动ss.yml和webgui.yml服务?
        小白一只,见笑了。

        回复
        1. reizhi 博主

          ss-manager只是个管理控制台,需要先安装ss本体才能用

          回复
  2. 夏沫

    博主你好, 我按照你的安装方法搭建好后,一切都正常, 就是有个问题:管理员后台无法实时更新数据,手动刷新页面也不行,必须清理cookie后,重新登录后台,才能显示最新的数据,麻烦你给分析下什么原因,非常感谢,感谢!

    回复
  3. IMPR

    在这一步出现了错误。。
    nohup ./ssmgr.sh &

    然后我前台运行了一下:
    root@ubuntu:~# ./ssmgr.sh
    setsid: failed to execute ss-manager: No such file or directory
    root@ubuntu:~# /usr/lib/node_modules/shadowsocks-manager/lib/
    /usr/lib/node_modules/shadowsocks-manager/lib/
    [2018-04-25 21:44:01.643] [INFO] system - System start.
    [2018-04-25 21:44:01.647] [INFO] system - System start.
    [2018-04-25 21:44:01.855] [ERROR] system - { YAMLException: duplicated mapping key at line 6, column 1:
    address: 172.96.199.158:4001
    ^
    at generateError (/usr/lib/node_modules/shadowsocks-manager/node_modules/js-yaml/lib/js-yaml/loader.js:165:10)
    at throwError (/usr/lib/node_modules/shadowsocks-manager/node_modules/js-yaml/lib/js-yaml/loader.js:171:9)
    at storeMappingPair (/usr/lib/node_modules/shadowsocks-manager/node_modules/js-yaml/lib/js-yaml/loader.js:308:7)
    at readBlockMapping (/usr/lib/node_modules/shadowsocks-manager/node_modules/js-yaml/lib/js-yaml/loader.js:1071:9)
    at composeNode (/usr/lib/node_modules/shadowsocks-manager/node_modules/js-yaml/lib/js-yaml/loader.js:1332:12)
    at readDocument (/usr/lib/node_modules/shadowsocks-manager/node_modules/js-yaml/lib/js-yaml/loader.js:1492:3)
    at loadDocuments (/usr/lib/node_modules/shadowsocks-manager/node_modules/js-yaml/lib/js-yaml/loader.js:1548:5)
    at load (/usr/lib/node_modules/shadowsocks-manager/node_modules/js-yaml/lib/js-yaml/loader.js:1569:19)
    at Object.safeLoad (/usr/lib/node_modules/shadowsocks-manager/node_modules/js-yaml/lib/js-yaml/loader.js:1591:10)
    at Object. (/usr/lib/node_modules/shadowsocks-manager/lib/services/config.js:33:19)
    name: 'YAMLException',
    reason: 'duplicated mapping key',
    mark:
    Mark {
    name: null,
    buffer: 'type: s\nempty: false\nshadowsocks:\naddress: 127.0.0.1:4000\nmanager:\naddress: 172.96.199.158:4001\npassword: \'synco\'\ndb: \'ss.sqlite\'\n\u0000',
    position: 67,
    line: 5,
    column: 0 },
    message: 'duplicated mapping key at line 6, column 1:\n address: 172.96.199.158:4001\n ^' }
    [2018-04-25 21:44:01.868] [ERROR] system - Caught exception:
    [2018-04-25 21:44:01.868] [ERROR] system - TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.basename (path.js:1361:5)
    at Object. (/usr/lib/node_modules/shadowsocks-manager/lib/init/checkConfig.js:46:18)
    at Module._compile (module.js:577:32)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.require (module.js:504:17)
    at require (internal/module.js:20:19)
    [2018-04-25 21:44:01.885] [ERROR] system - { YAMLException: duplicated mapping key at line 11, column 1:
    use: true
    ^
    at generateError (/usr/lib/node_modules/shadowsocks-manager/node_modules/js-yaml/lib/js-yaml/loader.js:165:10)
    at throwError (/usr/lib/node_modules/shadowsocks-manager/node_modules/js-yaml/lib/js-yaml/loader.js:171:9)
    at storeMappingPair (/usr/lib/node_modules/shadowsocks-manager/node_modules/js-yaml/lib/js-yaml/loader.js:308:7)
    at readBlockMapping (/usr/lib/node_modules/shadowsocks-manager/node_modules/js-yaml/lib/js-yaml/loader.js:1071:9)
    at composeNode (/usr/lib/node_modules/shadowsocks-manager/node_modules/js-yaml/lib/js-yaml/loader.js:1332:12)
    at readDocument (/usr/lib/node_modules/shadowsocks-manager/node_modules/js-yaml/lib/js-yaml/loader.js:1492:3)
    at loadDocuments (/usr/lib/node_modules/shadowsocks-manager/node_modules/js-yaml/lib/js-yaml/loader.js:1548:5)
    at load (/usr/lib/node_modules/shadowsocks-manager/node_modules/js-yaml/lib/js-yaml/loader.js:1569:19)
    at Object.safeLoad (/usr/lib/node_modules/shadowsocks-manager/node_modules/js-yaml/lib/js-yaml/loader.js:1591:10)
    at Object. (/usr/lib/node_modules/shadowsocks-manager/lib/services/config.js:33:19)
    name: 'YAMLException',
    reason: 'duplicated mapping key',
    mark:
    Mark {
    name: null,
    buffer: 'type: m\nempty: false\n\nmanager:\naddress: 172.96.199.158:4001\npassword: \'synco\'\nplugins:\nflowSaver:\nuse: true\nuser:\nuse: true\naccount:\nuse: true\nemail:\nuse: true\ntype: \'smtp\'\nusername: \'l@imprfe.cn\'\npassword: \'password\'\nhost: \'smtp.ym.163.com\'\nwebgui:\nuse: true\nhost: \'0.0.0.0\'\nport: \'80\'\nsite: \'http://synco.imprfe.cn\'\ngcmSenderId: \'456102641793\'\ngcmAPIKey: \'AAAAGzzdqrE:XXXXXXXXXXXXXX\'\nalipay:\nuse: false\nappid: 2015012108272442\nnotifyUrl: \'http://yourwebsite.com/api/user/alipay/callback\'\nmerchantPrivateKey: \'xxxxxxxxxxxx\'\nalipayPublicKey: \'xxxxxxxxxxx\'\ngatewayUrl: \'https://openapi.alipay.com/gateway.do\'\npaypal:\nuse: false\nmode: \'live\'\nclient_id: \'At9xcGd1t5L6OrICKNnp2g9\'\nclient_secret: \'EP40s6pQAZmqp_G_nrU9kKY4XaZph\'\n\ndb: \'webgui.sqlite\'\n\u0000',
    position: 118,
    line: 10,
    column: 0 },
    message: 'duplicated mapping key at line 11, column 1:\n use: true\n ^' }
    [2018-04-25 21:44:01.899] [ERROR] system - Caught exception:
    [2018-04-25 21:44:01.899] [ERROR] system - TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.basename (path.js:1361:5)
    at Object. (/usr/lib/node_modules/shadowsocks-manager/lib/init/checkConfig.js:46:18)
    at Module._compile (module.js:577:32)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.require (module.js:504:17)
    at require (internal/module.js:20:19)

    求解..

    回复
    1. reizhi 博主

      failed to execute ss-manager: No such file or directory
      试试直接运行ss-manager看看报错,另外贴一下webgui.yml

      回复
        1. reizhi 博主

          请先安装shadowsocks-libev,ss-manager只是一个管理软件,不含ss本体

          回复
  4. 薛清君

    请问ssr可以用这个吗,如果不可以的话,都有什么版本的ss支持这个管理面板,谢谢。

    回复
  5. 不知春秋

    有没有可以在服务器访问的控制器,我搭建的游戏加速ss按流量收费,我怕朋友拿来看YouTube,我想屏蔽掉……

    回复
    1. reizhi 博主

      目前没有现成的工具,建议用iptables封80端口出网

      回复
  6. vlvum

    请教一下这是怎么回事
    [2018-07-11 10:00:36.559] [INFO] system - System start.
    [2018-07-11 10:00:36.569] [INFO] system - System start.
    [2018-07-11 10:00:36.775] [ERROR] system - { YAMLException: end of the stream or a document separator is expected at line 2, column 1:
    empty: false
    ^
    at generateError (/usr/lib/node_modules/shadowsocks-manager/node_modules/js-yaml/lib/js-yaml/loader.js:165:10)
    at throwError (/usr/lib/node_modules/shadowsocks-manager/node_modules/js-yaml/lib/js-yaml/loader.js:171:9)
    at readDocument (/usr/lib/node_modules/shadowsocks-manager/node_modules/js-yaml/lib/js-yaml/loader.js:1512:5)
    at loadDocuments (/usr/lib/node_modules/shadowsocks-manager/node_modules/js-yaml/lib/js-yaml/loader.js:1548:5)
    at load (/usr/lib/node_modules/shadowsocks-manager/node_modules/js-yaml/lib/js-yaml/loader.js:1569:19)
    at Object.safeLoad (/usr/lib/node_modules/shadowsocks-manager/node_modules/js-yaml/lib/js-yaml/loader.js:1591:10)
    at Object. (/usr/lib/node_modules/shadowsocks-manager/lib/services/config.js:33:19)
    at Module._compile (module.js:577:32)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    name: 'YAMLException',
    reason: 'end of the stream or a document separator is expected',
    mark:
    Mark {
    name: null,
    buffer: ' type: s\nempty: false\nshadowsocks:\n address: 127.0.0.1:4454\nmanager:\n address: 0.0.0.0:4001\n password: \'hentai123.\'\ndb: \'ss.sqlite\'\n\u0000',
    position: 10,
    line: 1,
    column: 0 },
    message: 'end of the stream or a document separator is expected at line 2, column 1:\n empty: false\n ^' }
    [2018-07-11 10:00:36.789] [ERROR] system - Caught exception:
    [2018-07-11 10:00:36.789] [ERROR] system - TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.basename (path.js:1361:5)
    at Object. (/usr/lib/node_modules/shadowsocks-manager/lib/init/checkConfig.js:46:18)
    at Module._compile (module.js:577:32)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.require (module.js:504:17)
    at require (internal/module.js:20:19)
    [2018-07-11 10:00:36.782] [ERROR] system - { YAMLException: bad indentation of a mapping entry at line 36, column 4:
    paypal:
    ^
    at generateError (/usr/lib/node_modules/shadowsocks-manager/node_modules/js-yaml/lib/js-yaml/loader.js:165:10)
    at throwError (/usr/lib/node_modules/shadowsocks-manager/node_modules/js-yaml/lib/js-yaml/loader.js:171:9)
    at readBlockMapping (/usr/lib/node_modules/shadowsocks-manager/node_modules/js-yaml/lib/js-yaml/loader.js:1080:7)
    at composeNode (/usr/lib/node_modules/shadowsocks-manager/node_modules/js-yaml/lib/js-yaml/loader.js:1332:12)
    at readBlockMapping (/usr/lib/node_modules/shadowsocks-manager/node_modules/js-yaml/lib/js-yaml/loader.js:1062:11)
    at composeNode (/usr/lib/node_modules/shadowsocks-manager/node_modules/js-yaml/lib/js-yaml/loader.js:1332:12)
    at readDocument (/usr/lib/node_modules/shadowsocks-manager/node_modules/js-yaml/lib/js-yaml/loader.js:1492:3)
    at loadDocuments (/usr/lib/node_modules/shadowsocks-manager/node_modules/js-yaml/lib/js-yaml/loader.js:1548:5)
    at load (/usr/lib/node_modules/shadowsocks-manager/node_modules/js-yaml/lib/js-yaml/loader.js:1569:19)
    at Object.safeLoad (/usr/lib/node_modules/shadowsocks-manager/node_modules/js-yaml/lib/js-yaml/loader.js:1591:10)
    name: 'YAMLException',
    reason: 'bad indentation of a mapping entry',
    mark:
    Mark {
    name: null,
    buffer: 'type: m\nempty: false\n\nmanager:\n address: 0.0.0.0:4001\n password: \'123456\'\nplugins:\n flowSaver:\n use: true\n user:\n use: true\n account:\n use: true\n group:\n use: true\n email:\n use: true\n type: \'smtp\'\n username: \'username\'\n password: \'password\'\n host: \'smtp.your-email.com\'\n webgui:\n use: true\n host: \'0.0.0.0\'\n port: \'80\'\n site: \'http://yourwebsite.com\'\n gcmSenderId: \'456102641793\'\n gcmAPIKey: \'AAAAGzzdqrE:XXXXXXXXXXXXXX\'\n alipay:\n use: true\n appid: 2015012108272442\n notifyUrl: \'http://yourwebsite.com/api/user/alipay/callback\'\n merchantPrivateKey: \'xxxxxxxxxxxx\'\n alipayPublicKey: \'xxxxxxxxxxx\'\n gatewayUrl: \'https://openapi.alipay.com/gateway.do\'\n paypal:\n use: true\n mode: \'live\'\n client_id: \'At9xcGd1t5L6OrICKNnp2g9\'\n client_secret: \'EP40s6pQAZmqp_G_nrU9kKY4XaZph\'\n\ndb: \'webgui.sqlite\'\n\u0000',
    position: 728,
    line: 35,
    column: 3 },
    message: 'bad indentation of a mapping entry at line 36, column 4:\n paypal:\n ^' }
    [2018-07-11 10:00:36.796] [ERROR] system - Caught exception:
    [2018-07-11 10:00:36.796] [ERROR] system - TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.basename (path.js:1361:5)
    at Object. (/usr/lib/node_modules/shadowsocks-manager/lib/init/checkConfig.js:46:18)
    at Module._compile (module.js:577:32)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.require (module.js:504:17)
    at require (internal/module.js:20:19)

    回复
  7. 啪啪啪的指针

    webgui.yml运行报错
    type: m
    empty: false
    manager:
    address: 127.0.0.1:4001
    password: '123456'
    plugins:
    flowSaver:
    use: true
    user:
    use: true
    account:
    use: true
    group:
    use: true
    webgui:
    use: true
    host: '0.0.0.0'
    port: '8085'
    db: 'webgui.sqlite'
    报错信息:
    [2018-08-31 15:27:36.404] [INFO] system - System start.
    [2018-08-31 15:27:37.054] [ERROR] system - Unhandled Rejection at: Promise Promise {
    TypeError: Cannot read property 'type' of undefined
    at Object. (/root/node/lib/node_modules/shadowsocks-manager/lib/plugins/email/index.js:17:27)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at global.appRequire.filePath (/root/node/lib/node_modules/shadowsocks-manager/lib/init/utils.js:6:10)
    at Object. (/root/node/lib/node_modules/shadowsocks-manager/lib/plugins/webgui/server/home.js:14:21)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at global.appRequire.filePath (/root/node/lib/node_modules/shadowsocks-manager/lib/init/utils.js:6:10)
    at Object. (/root/node/lib/node_modules/shadowsocks-manager/lib/plugins/webgui/server/route.js:8:14)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32) } reason: TypeError: Cannot read property 'type' of undefined
    at Object. (/root/node/lib/node_modules/shadowsocks-manager/lib/plugins/email/index.js:17:27)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at global.appRequire.filePath (/root/node/lib/node_modules/shadowsocks-manager/lib/init/utils.js:6:10)
    at Object. (/root/node/lib/node_modules/shadowsocks-manager/lib/plugins/webgui/server/home.js:14:21)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at global.appRequire.filePath (/root/node/lib/node_modules/shadowsocks-manager/lib/init/utils.js:6:10)
    at Object. (/root/node/lib/node_modules/shadowsocks-manager/lib/plugins/webgui/server/route.js:8:14)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    [2018-08-31 15:27:45.371] [ERROR] express - [undefined] GET 404 13ms /

    回复
    1. reizhi 博主

      需要先在本机启动ss.yml,并设置manager端口为4001,才能用你写的webgui.yml启动面板

      回复
      1. 啪啪啪的指针

        先启动了它 nohup ss-manager -c /etc/shadowsocks-libev/test.json --manager-address 127.0.0.1:4000 -u test.json &
        客户端软件直接用test.json里配置的密码端口连接是正常的

        然后启动了ss.yml 没有报错
        type: s
        empty: false
        shadowsocks:
        address: 127.0.0.1:4000
        manager:
        address: 0.0.0.0:4001
        password: '123456'
        db: 'ss.sqlite'

        最后启动webgui的时候就报错了, node报错信息第一行email...., 但是没有配置email选项应该不加载才对

        回复
        1. reizhi 博主

          建议你看一下上面的回复,会不会是配置文件空格对齐,或者符号的问题,有一个另外的链接复制一下webgui.yml。

          回复
  8. 四夕

    大神,出现以下问题怎么回事啊?

    npm i -g shadowsocks-manager
    npm WARN deprecated socks@1.1.10: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
    /usr/bin/ssmgr -> /usr/lib/node_modules/shadowsocks-manager/bin/ssmgr

    > sqlite3@4.0.2 install /usr/lib/node_modules/shadowsocks-manager/node_modules/sqlite3
    > node-pre-gyp install --fallback-to-build

    node-pre-gyp WARN Using request for node-pre-gyp https download
    node-pre-gyp WARN Pre-built binaries not installable for sqlite3@4.0.2 and node@8.12.0 (node-v57 ABI, glibc) (falling back to source compile with node-gyp)
    node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/usr/lib/node_modules/shadowsocks-manager/node_modules/sqlite3/lib/binding'
    gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/8.12.0"
    gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/shadowsocks-manager/node_modules/sqlite3/.node-gyp"
    gyp WARN install got an error, rolling back install
    gyp WARN install got an error, rolling back install
    gyp ERR! configure error
    gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/shadowsocks-manager/node_modules/sqlite3/.node-gyp'
    gyp ERR! System Linux 3.16.0-6-amd64
    gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/lib/node_modules/shadowsocks-manager/node_modules/sqlite3/lib/binding/node-v57-linux-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/usr/lib/node_modules/shadowsocks-manager/node_modules/sqlite3/lib/binding/node-v57-linux-x64" "--napi_version=3" "--node_abi_napi=napi"
    gyp ERR! cwd /usr/lib/node_modules/shadowsocks-manager/node_modules/sqlite3
    gyp ERR! node -v v8.12.0
    gyp ERR! node-gyp -v v3.8.0
    gyp ERR! not ok
    node-pre-gyp ERR! build error
    node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/lib/node_modules/shadowsocks-manager/node_modules/sqlite3/lib/binding/node-v57-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/usr/lib/node_modules/shadowsocks-manager/node_modules/sqlite3/lib/binding/node-v57-linux-x64 --napi_version=3 --node_abi_napi=napi' (1)
    node-pre-gyp ERR! stack at ChildProcess. (/usr/lib/node_modules/shadowsocks-manager/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
    node-pre-gyp ERR! stack at emitTwo (events.js:126:13)
    node-pre-gyp ERR! stack at ChildProcess.emit (events.js:214:7)
    node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:915:16)
    node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
    node-pre-gyp ERR! System Linux 3.16.0-6-amd64
    node-pre-gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/shadowsocks-manager/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
    node-pre-gyp ERR! cwd /usr/lib/node_modules/shadowsocks-manager/node_modules/sqlite3
    node-pre-gyp ERR! node -v v8.12.0
    node-pre-gyp ERR! node-pre-gyp -v v0.10.3
    node-pre-gyp ERR! not ok
    Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/lib/node_modules/shadowsocks-manager/node_modules/sqlite3/lib/binding/node-v57-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/usr/lib/node_modules/shadowsocks-manager/node_modules/sqlite3/lib/binding/node-v57-linux-x64 --napi_version=3 --node_abi_napi=napi' (1)
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! sqlite3@4.0.2 install: `node-pre-gyp install --fallback-to-build`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the sqlite3@4.0.2 install script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

    npm ERR! A complete log of this run can be found in:
    npm ERR! /root/.npm/_logs/2018-10-15T16_02_03_618Z-debug.log

    回复
  9. 新手

    服务端一直是try to bind interface: 0.0.0.0, port: 50000
    客户端无法网络

    回复
    1. reizhi 博主

      请把你的m端,s端配置文件都发上来看一下,以及m端日志

      回复
      1. 新手

        { Error: read ECONNRESET
        at TCP.onread (net.js:622:25) errno: 'ECONNRESET', code: 'ECONNRESET', syscall: 'read' }

        回复
  10. x-corn

    为什么添加完account 不能连接呢?
    我run the command:
    ```ss-manager -m aes-256-gcm -u --manager-address 127.0.0.1:4000

    then give me the output below:
    ```INFO: try to bind interface: 0.0.0.0, port: 50000

    please help! thanks

    回复
    1. reizhi 博主

      看你的日志是正常输出,请把ss.yml webgui.yml和完整日志都发送到我的邮箱

      回复
      1. x-corn

        thank you for your kindly reply, I found this issue that when I exit ( Ctrl + c ) the "nohup ./ssmgr.sh" & script, the service will no longer work, that is why the client side connection failed.
        do you have any idea how to solve this kind issue?

        回复
  11. 疯狂的猿猴

    楼主你好!我最后一部 无法启动!
    root@vultr:~/.ssmgr# nohup ./ssmgr.sh &
    [1] 3828
    root@vultr:~/.ssmgr# nohup: ignoring input and appending output to 'nohup.out'
    nohup: failed to run command './ssmgr.sh': Permission denied

    回复
  12. yanchong

    运行一切都正常。设置的site是用的ip地址 系统centos7 没任何报错 但就是打不开管理页面 是什么问题?

    回复
  13. yanchong

    楼主 我运行一切正常 服务器是centos7。 website用的是ip地址, 但就是无法访问到管理页面。 端口权限都开了。

    回复
      1. yanchong

        运行最后一步webgui.yml 返回如下
        [2019-03-09T02:51:51.148] [INFO] system - System start[27459].
        /usr/lib/node_modules/shadowsocks-manager/
        [2019-03-09T02:51:51.414] [INFO] system - System start[27466].
        [2019-03-09T02:51:51.416] [INFO] system - Worker [27466] started
        [2019-03-09T02:51:51.598] [INFO] system - Config file path: /root/.ssmgr/webgui.yml
        [2019-03-09T02:51:51.929] [INFO] system - Load plugin db: [ flowSaver ]
        [2019-03-09T02:51:51.929] [INFO] system - Load plugin db: [ flowSaver/db/saveFlow.js ]
        [2019-03-09T02:51:51.930] [INFO] system - Load plugin db: [ flowSaver/db/saveFlow5min.js ]
        [2019-03-09T02:51:51.931] [INFO] system - Load plugin db: [ flowSaver/db/saveFlowDay.js ]
        [2019-03-09T02:51:51.931] [INFO] system - Load plugin db: [ flowSaver/db/saveFlowHour.js ]
        [2019-03-09T02:51:51.932] [INFO] system - Load plugin db: [ flowSaver/db/server.js ]
        [2019-03-09T02:51:51.945] [INFO] system - Load plugin db: [ user ]
        [2019-03-09T02:51:51.945] [INFO] system - Load plugin db: [ user/db/user.js ]
        [2019-03-09T02:51:51.982] [INFO] system - { command: 'flow', options: { clear: false } }
        [2019-03-09T02:51:51.999] [INFO] system - Load plugin db: [ account ]
        [2019-03-09T02:51:51.999] [INFO] system - Load plugin db: [ account/db/account.js ]
        [2019-03-09T02:51:52.001] [INFO] system - Load plugin db: [ account/db/accountFlow.js ]
        [2019-03-09T02:51:52.022] [INFO] system - Load plugin db: [ group ]
        [2019-03-09T02:51:52.023] [INFO] system - Load plugin db: [ group/db/group.js ]
        [2019-03-09T02:51:52.036] [INFO] system - Load plugin db: [ email ]
        [2019-03-09T02:51:52.037] [INFO] system - Load plugin db: [ email/db/email.js ]
        [2019-03-09T02:51:52.044] [INFO] system - Load plugin db: [ webgui ]
        [2019-03-09T02:51:52.044] [INFO] system - Load plugin db: [ webgui/db/notice.js ]
        [2019-03-09T02:51:52.045] [INFO] system - Load plugin db: [ webgui/db/push.js ]
        [2019-03-09T02:51:52.046] [INFO] system - Load plugin db: [ webgui/db/setting.js ]
        [2019-03-09T02:51:52.075] [INFO] system - Load plugin dependence: [ webgui ]
        [2019-03-09T02:51:52.075] [INFO] system - Load plugin db: [ webgui_ref ]
        [2019-03-09T02:51:52.076] [INFO] system - Load plugin db: [ webgui_ref/db/webgui_ref.js ]
        [2019-03-09T02:51:52.077] [INFO] system - Load plugin db: [ webgui_ref/db/webgui_ref_code.js ]
        [2019-03-09T02:51:52.079] [INFO] system - Load plugin db: [ webgui_ref/db/webgui_ref_time.js ]
        [2019-03-09T02:51:52.179] [INFO] system - Load plugin db: [ macAccount ]
        [2019-03-09T02:51:52.179] [INFO] system - Load plugin db: [ macAccount/db/macAccount.js ]
        [2019-03-09T02:51:52.191] [INFO] system - Load plugin db: [ webgui_order ]
        [2019-03-09T02:51:52.191] [INFO] system - Load plugin db: [ webgui_order/db/webgui_flow_pack.js ]
        [2019-03-09T02:51:52.192] [INFO] system - Load plugin db: [ webgui_order/db/webgui_order.js ]
        [2019-03-09T02:51:52.212] [INFO] system - Load plugin db: [ account_checker ]
        [2019-03-09T02:51:52.212] [INFO] system - Load plugin: [ flowSaver ]
        [2019-03-09T02:51:52.313] [INFO] system - Load plugin: [ user ]
        [2019-03-09T02:51:52.320] [INFO] system - Load plugin: [ account ]
        [2019-03-09T02:51:52.320] [INFO] system - Load plugin: [ group ]
        [2019-03-09T02:51:52.321] [INFO] system - Load plugin: [ email ]
        [2019-03-09T02:51:52.588] [INFO] system - Load plugin: [ webgui ]
        [2019-03-09T02:51:52.883] [INFO] system - Load plugin: [ webgui_ref ]
        [2019-03-09T02:51:52.884] [INFO] system - Load plugin: [ macAccount ]
        [2019-03-09T02:51:52.884] [INFO] system - Load plugin: [ webgui_order ]
        [2019-03-09T02:51:52.884] [INFO] system - Load plugin: [ account_checker ]
        [2019-03-09T02:51:52.944] [INFO] webgui - server start at 0.0.0.0:80
        [2019-03-09T02:51:52.970] [INFO] system - [1] cron: AccountCheckerDeleteExtraPorts, [360]
        [2019-03-09T02:51:53.307] [INFO] account - no need to check
        [2019-03-09T02:51:54.093] [INFO] system - { command: 'list' }
        [2019-03-09T02:52:00.002] [INFO] system - [1] cron: CheckPaypalOrder, [60]
        [2019-03-09T02:52:00.003] [INFO] system - [1] cron: SaveFlow, [60]
        [2019-03-09T02:52:00.003] [INFO] system - [1] cron: CheckAlipayOrder, [60]
        [2019-03-09T02:52:00.004] [INFO] alipay - check alipay order
        [2019-03-09T02:52:00.027] [INFO] system - Receive flow from shadowsocks: (libev)
        {}
        [2019-03-09T02:52:00.036] [INFO] system - { command: 'flow', options: { clear: true } }
        [2019-03-09T02:52:24.954] [INFO] account - no need to check

        全程无报错 配置文件 受控端口10040 主控端口10041 网站地址我确认没配错
        webgui 配置如下:
        type: m

        manager:
        address: 108.61.185.4:10041
        password: 'vpstest'
        plugins:
        flowSaver:
        use: true
        user:
        use: true
        account:
        use: true
        group:
        use: true
        email:
        use: true
        type: 'smtp'
        username: 'username'
        password: 'password'
        host: 'smtp.your-email.com'
        webgui:
        use: true
        host: '0.0.0.0'
        port: '80'
        site: '108.61.185.4'
        db: 'webgui.sqlite'

        redis:
        host: '127.0.0.1'
        port: 6379
        db: 0

        打开网站 提示This site can’t be reached 108.61.185.4 refused to connect.
        你说的日志文件是ssmanager的日志么?

        回复
        1. yanchong

          [root@vultr ~]# setsid ss-manager -m aes-256-cfb -u --manager-address 127.0.0.1:10040 &
          [1] 3425
          [root@vultr ~]# 2019-03-13 03:14:54 INFO: running from root user
          2019-03-13 03:14:54 INFO: working directory points to /root/.shadowsocks

          [1]+ Done setsid ss-manager -m aes-256-cfb -u --manager-address 127.0.0.1:10040

          日志指向的这个shadowsocks工作目录下什么都没有 是不是这个工作目录错了?

          回复
          1. reizhi 博主

            你试试直接在前台运行,看日志的话没什么异常
            setsid ssmgr -c ~/.ssmgr/webgui.yml
            另外webgui需要这样写,我倒是没试过 ip 行不行
            site: ‘http://108.61.185.4’

          2. yanchong

            按照你说的我改成了http格式的了 也前台运行了 日志出来还是一样 没任何报错 但就是访问不了 ,提示This site can’t be reached 108.61.185.4 refused to connect. 我测试了下 80端口是可以用的 相关端口防火墙也配置放行了。 是不是ssmanager不能用ip访问? 我没域名因为。

        2. reizhi 博主

          超过3层无法嵌套回复了,所以在这回一下
          ssmgr开起来之后看看80端口的占用情况,另外你该没有安装apache或者nginx占用了80端口吧

          回复
          1. yanchong

            最奇怪的就是这里。我没安装apache nginx之类的。80端口肯定没占用 但我运行webgui之后 扫描80端口是未活动状态 根本没服务监听。我以为是防火墙问题 但我试了安装apache 80端口正常。说明防火墙配置肯定是正常的。 所以我怀疑是不是ssmanager服务压根没启动起来

  14. Visean

    [root@localhost ~]# ssmgr -c ~/.ssmgr/ss.yml
    /usr/lib/node_modules/shadowsocks-manager/
    /usr/lib/node_modules/shadowsocks-manager/server.js:21
    const startWorker = async () => {
    ^

    SyntaxError: Unexpected token (
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:549:28)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.require (module.js:504:17)
    at require (internal/module.js:20:19)
    at Object. (/usr/lib/node_modules/shadowsocks-manager/bin/ssmgr:8:1)

    你好,为什么我这个配置会出现这个问题,可以和我看看吗?

    回复
    1. reizhi 博主

      请把你的ss.yml发上来看一下,或者邮件回复我也可以

      回复
      1. Visean

        type: s
        empty: false
        shadowsocks:
        address: 127.0.0.1:4000
        manager:
        address: 0.0.0.0:8388
        password: 'barfoo!'
        db: 'ss.sqlite'

        回复
          1. Visean

            博主,我又重装了,现在怎么会运行ssmgr -c ~/.ssmgr/ss.yml这个,会提示-bash: ssmgr: command not found这个,但是执行这个是这样的
            [root@localhost .ssmgr]# ss-manager -m aes-256-cfb -u --manager-address 127.0.0.1:4000 &
            [2] 59988
            [root@localhost .ssmgr]# 2019-04-04 12:34:58 INFO: running from root user
            2019-04-04 12:34:58 INFO: working directory points to /root/.shadowsocks

          1. Visean

            这个是有安装的,也是v10的,sqlite这个要不要额外安装?
            怎么按官网的装了都不行,你这里有安装的教程吗,os 7 64位的

          2. Visean

            我自己重复检查再安装,现在遇到这样的问题,可以帮我看看吗?
            [2019-04-04T21:59:34.653] [INFO] system - Load plugin: [ macAccount ]
            [2019-04-04T21:59:34.654] [INFO] system - Load plugin: [ webgui_order ]
            [2019-04-04T21:59:34.654] [INFO] system - Load plugin: [ account_checker ]
            [WARN] Redis server does not require a password, but a password was supplied.
            [2019-04-04T21:59:34.949] [ERROR] webgui - express server error: Error: bind EADDRINUSE 0.0.0.0:80
            [2019-04-04T21:59:34.971] [ERROR] system - worker [60861][3] died
            我查了80端口有监听,也设置了密码,redis-cli -h 127.0.0.1 -p 6379 -a 123456

            可以帮我再排看看吗?

    2. reizhi 博主

      你这里绑定80失败,看是不是有其他软件占用了80,换端口试试

      回复
      1. Visean

        Redis server does not require a password, but a password was supplied.
        这个是哪里错了吗?我是在配置文件有加入密码的

        回复
  15. Visean

    现在除了这个错误,就没有其它错误了,但是面板还是不可以访问,真是奇怪,可以指导一下吗

    回复
  16. Visean

    tcp 0 0 0.0.0.0:6379 0.0.0.0:* LISTEN 4374/redis-server *
    tcp 0 0 0.0.0.0:8399 0.0.0.0:* LISTEN 2739/ss-server
    tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 4449/node
    tcp 0 0 0.0.0.0:6002 0.0.0.0:* LISTEN 4430/node
    tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2725/sshd
    tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 3237/master
    tcp6 0 0 :::6379 :::* LISTEN 4374/redis-server *
    tcp6 0 0 :::22 :::* LISTEN 2725/sshd
    tcp6 0 0 ::1:25 :::* LISTEN 3237/master
    udp 0 0 0.0.0.0:8399 0.0.0.0:* 2739/ss-server
    udp 0 0 127.0.0.1:6001 0.0.0.0:* 3931/ss-manager
    udp 0 0 127.0.0.1:6001 0.0.0.0:* 3905/ss-manager
    udp 0 0 0.0.0.0:6002 0.0.0.0:* 4430/node
    raw6 0 0 :::58 :::* 7 2177/NetworkManager
    帮我看看这个是否有异常

    回复
  17. Niter

    启动的端口。过一会,会自动kill掉是什么原因
    比如说添加8080端口。添加成功后,过一会,程序就会自动kill掉。

    回复
    1. reizhi 博主

      ss-manager对内存消耗比较大,建议查一下是否内存不足自动kill了

      回复
  18. tyson

    你好博主,请教您一个问题
    我将 用户分配的端口(范围是1234到1234) 设定成与 s端开启ss-libev的端口(1234) 一样 。 当我用 用户分配的账号ss密码 连接ss时,是F不出去的,就是无法连接;如果把用户 分配的账号ss密码设定与s端配置的ss-libev密码一样,就可以连接。
    这是为什么呢?
    我在logs里查看日志时 发现除了flowSaver.log里有且仅有一条
    [ERROR] flowSaver - [server: 1] save flow error,
    还有express.log里某些地方有404,其他地方没什么不对的了。
    这个问题卡壳几天了,不懂只好提问了。。。
    plz help

    回复
    1. reizhi 博主

      分配端口不能这样设置,必须是闲置端口。S端的端口是用作通讯管理的。ss-manager 会负责按照面板的命令启动 ss 进程。
      请不要画蛇添足自己设置面板的端口和密码与s端一致
      [m端---ss-manager]---[s端---ss-manager---ss]

      回复
  19. Brian

    yml文件配置都正确
    ssmgr -c启动之后
    /usr/lib/node_modules/shadowsocks-manager/
    [2019-11-13T09:11:46.883] [INFO] system - Worker start[826].
    [2019-11-13T09:11:46.937] [INFO] system - Config file path: /root/.ssmgr/webgui.yml
    就停在这不会动 然后访问ip:port也不能成功打开

    回复
    1. reizhi 博主

      暂无法确认你的问题原因,建议到官方tg群询问,在github可以找到

      回复

发表评论

电子邮件地址不会被公开。 必填项已用*标注