[GH-ISSUE #1058] 功能建议: 建议添加一键安装脚本(主要方便部署linux服务器) #832

Closed
opened 2026-05-05 12:31:51 -06:00 by gitea-mirror · 20 comments
Owner

Originally created by @snowdream on GitHub (Jan 23, 2019).
Original GitHub issue: https://github.com/fatedier/frp/issues/1058

功能建议: 建议添加一键安装脚本(主要方便部署linux服务器)

Originally created by @snowdream on GitHub (Jan 23, 2019). Original GitHub issue: https://github.com/fatedier/frp/issues/1058 功能建议: 建议添加一键安装脚本(主要方便部署linux服务器)
gitea-mirror 2026-05-05 12:31:51 -06:00
  • closed this issue
  • added the
    todo
    label
Author
Owner

@yunnl commented on GitHub (Jan 24, 2019):

解压 设置权限 运行,这种还要一键脚本?

<!-- gh-comment-id:457021575 --> @yunnl commented on GitHub (Jan 24, 2019): 解压 设置权限 运行,这种还要一键脚本?
Author
Owner

@fatedier commented on GitHub (Jan 24, 2019):

可以提供一些规范化的例如支持 systemctl 的配置,TODO

<!-- gh-comment-id:457029084 --> @fatedier commented on GitHub (Jan 24, 2019): 可以提供一些规范化的例如支持 systemctl 的配置,TODO
Author
Owner

@flykarry commented on GitHub (Jan 28, 2019):

我觉着这个已经属于非常简单的东西了

<!-- gh-comment-id:457981602 --> @flykarry commented on GitHub (Jan 28, 2019): 我觉着这个已经属于非常简单的东西了
Author
Owner

@catchfishday commented on GitHub (Jan 29, 2019):

可以像ss、v2ray写个sh脚本,安装、更新、重启、开机启动等服务,这样更容易上手

<!-- gh-comment-id:458354670 --> @catchfishday commented on GitHub (Jan 29, 2019): 可以像ss、v2ray写个sh脚本,安装、更新、重启、开机启动等服务,这样更容易上手
Author
Owner

@lyin888 commented on GitHub (Jan 29, 2019):

可以像SS,v2ray写个SH脚本,安装,更新,重启,开机启动等服务,这样更容易上手

使用supervisor来守护frps

sudo apt-get update

sudo apt-get install supervisor

vi /etc/supervisor/conf.d/frps.conf

[program:frps]
command = /root/frps/frps -c /root/frps/frps.ini # frps存放路径
autostart = true

重启supervisor

sudo systemctl restart supervisor

查看supervisor运行状态

sudo supervisorctl status

<!-- gh-comment-id:458409068 --> @lyin888 commented on GitHub (Jan 29, 2019): > 可以像SS,v2ray写个SH脚本,安装,更新,重启,开机启动等服务,这样更容易上手 使用supervisor来守护frps sudo apt-get update sudo apt-get install supervisor vi /etc/supervisor/conf.d/frps.conf [program:frps] command = /root/frps/frps -c /root/frps/frps.ini # frps存放路径 autostart = true # 重启supervisor sudo systemctl restart supervisor # 查看supervisor运行状态 sudo supervisorctl status
Author
Owner

@smoryan commented on GitHub (Jan 30, 2019):

[Unit]
Description=Frp Server Daemon
After=syslog.target network.target
Wants=network.target

[Service]
Type=simple
ExecStart=/usr/bin/frps -c /etc/frps.ini
ExecStop=/usr/bin/killall frps
#启动失败1分钟后再次启动
RestartSec=1min
KillMode=control-group
#重启控制:总是重启
Restart=always

[Install]
WantedBy=multi-user.target

这个脚本放在# /etc/systemd/system/frps.service
然后 systemctl enable frps.service 即可
配置文件请自己搞掂。。每个人的需求都不同
@fatedier 这个systemctl配置应该足够简单通用了吧

<!-- gh-comment-id:458787686 --> @smoryan commented on GitHub (Jan 30, 2019): [Unit] Description=Frp Server Daemon After=syslog.target network.target Wants=network.target [Service] Type=simple ExecStart=/usr/bin/frps -c /etc/frps.ini ExecStop=/usr/bin/killall frps #启动失败1分钟后再次启动 RestartSec=1min KillMode=control-group #重启控制:总是重启 Restart=always [Install] WantedBy=multi-user.target 这个脚本放在# /etc/systemd/system/frps.service 然后 systemctl enable frps.service 即可 配置文件请自己搞掂。。每个人的需求都不同 @fatedier 这个systemctl配置应该足够简单通用了吧
Author
Owner

@mvscode commented on GitHub (Feb 8, 2019):

Frps 一键安装脚本&管理脚本 for Linux,frp:v0.23.3 https://github.com/MvsCode/frp-onekey

<!-- gh-comment-id:461785768 --> @mvscode commented on GitHub (Feb 8, 2019): Frps 一键安装脚本&管理脚本 for Linux,frp:v0.23.3 https://github.com/MvsCode/frp-onekey
Author
Owner

@a-wing commented on GitHub (Mar 20, 2019):

为什么不考虑把软件推到 linux 发行版的官方仓库中

archlinux 的 AUR 上有人打了这个包
不过按规范这种应该算 bin 包

https://aur.archlinux.org/packages/frp/

目前 archlinuxcn 软件仓库中有一共有三个 frp 的包

最近准备合并成一个然后 split package

https://github.com/archlinuxcn/repo/issues/1083

<!-- gh-comment-id:474743938 --> @a-wing commented on GitHub (Mar 20, 2019): 为什么不考虑把软件推到 linux 发行版的官方仓库中 archlinux 的 AUR 上有人打了这个包 不过按规范这种应该算 bin 包 https://aur.archlinux.org/packages/frp/ 目前 archlinuxcn 软件仓库中有一共有三个 frp 的包 最近准备合并成一个然后 `split package` https://github.com/archlinuxcn/repo/issues/1083
Author
Owner

@fatedier commented on GitHub (Mar 20, 2019):

@a-wing 不是很了解相关的东西,你能提供一些帮助?

<!-- gh-comment-id:474745645 --> @fatedier commented on GitHub (Mar 20, 2019): @a-wing 不是很了解相关的东西,你能提供一些帮助?
Author
Owner

@kantkong commented on GitHub (Mar 24, 2019):

参考这个 https://github.com/clangcn/onekey-install-shell

<!-- gh-comment-id:475931055 --> @kantkong commented on GitHub (Mar 24, 2019): 参考这个 https://github.com/clangcn/onekey-install-shell
Author
Owner

@deadlineOvO commented on GitHub (Mar 27, 2019):

话说日志的话

会在相关的服务管理程序提供的日志功能上吗

<!-- gh-comment-id:476953959 --> @deadlineOvO commented on GitHub (Mar 27, 2019): 话说日志的话 会在相关的服务管理程序提供的日志功能上吗
Author
Owner

@chronicom commented on GitHub (Apr 15, 2019):

为什么不考虑把软件推到 linux 发行版的官方仓库中

archlinux 的 AUR 上有人打了这个包
不过按规范这种应该算 bin 包

https://aur.archlinux.org/packages/frp/

目前 archlinuxcn 软件仓库中有一共有三个 frp 的包

最近准备合并成一个然后 split package

archlinuxcn/repo#1083

frps.service 中
User=nobody
好像在ubuntu 下有问题 nobody 没有绑定80端口的权限

<!-- gh-comment-id:483099740 --> @chronicom commented on GitHub (Apr 15, 2019): > 为什么不考虑把软件推到 linux 发行版的官方仓库中 > > archlinux 的 AUR 上有人打了这个包 > 不过按规范这种应该算 bin 包 > > https://aur.archlinux.org/packages/frp/ > > 目前 archlinuxcn 软件仓库中有一共有三个 frp 的包 > > 最近准备合并成一个然后 `split package` > > [archlinuxcn/repo#1083](https://github.com/archlinuxcn/repo/issues/1083) frps.service 中 User=nobody 好像在ubuntu 下有问题 nobody 没有绑定80端口的权限
Author
Owner

@a-wing commented on GitHub (Apr 15, 2019):

好像在ubuntu 下有问题 nobody 没有绑定80端口的权限

正常的发行版。 1024 以下的端口当然都不行。

特权端口 你自己用 nginxiptables 转一下。

<!-- gh-comment-id:483103293 --> @a-wing commented on GitHub (Apr 15, 2019): > 好像在ubuntu 下有问题 nobody 没有绑定80端口的权限 正常的发行版。 1024 以下的端口当然都不行。 特权端口 你自己用 `nginx` 或 `iptables` 转一下。
Author
Owner

@deadlineOvO commented on GitHub (Apr 15, 2019):

好像在ubuntu 下有问题 nobody 没有绑定80端口的权限

正常的发行版。 1024 以下的端口当然都不行。

特权端口 你自己用 nginxiptables 转一下。

不过为什么要用 nobody 用户来启动 frp 呢?

<!-- gh-comment-id:483147837 --> @deadlineOvO commented on GitHub (Apr 15, 2019): > > 好像在ubuntu 下有问题 nobody 没有绑定80端口的权限 > > 正常的发行版。 1024 以下的端口当然都不行。 > > 特权端口 你自己用 `nginx` 或 `iptables` 转一下。 不过为什么要用 nobody 用户来启动 frp 呢?
Author
Owner

@Athenacle commented on GitHub (Apr 23, 2019):

话说为啥没有官方docker啊,去DockerHub逛了一圈,找了个xddxdd/frps两个月前更新的。。

客户端使用的时候一直是说[W] [service.go:82] login to server failed: session shutdown

服务器端[D] [service.go:304] Accept new mux stream error: invalid protocol version

一看服务器版本0.22,客户端版本0.26。。不得不自己FROM scratch做一个。。为啥不能向后兼容

<!-- gh-comment-id:485936008 --> @Athenacle commented on GitHub (Apr 23, 2019): 话说为啥没有官方docker啊,去[DockerHub](https://hub.docker.com/search?q=frp&type=image)逛了一圈,找了个`xddxdd/frps`两个月前更新的。。 客户端使用的时候一直是说`[W] [service.go:82] login to server failed: session shutdown` 服务器端`[D] [service.go:304] Accept new mux stream error: invalid protocol version` 一看服务器版本0.22,客户端版本0.26。。不得不自己FROM scratch做一个。。~为啥不能向后兼容~
Author
Owner

@snowdream commented on GitHub (Jun 17, 2019):

已经封装了Docker镜像,支持amd64, arm32v6, arm32v7, arm64v8, i386。

frp

Docker Image packaging for Frp.

(amd64, arm32v6, arm32v7, arm64v8, i386)

Usage

start frps

docker run  --network host -d -v /etc/frp/frps.ini:/etc/frp/frps.ini --name frps snowdreamtech/frps

start frpc

docker run  --network host -d -v /etc/frp/frpc.ini:/etc/frp/frpc.ini --name frpc snowdreamtech/frpc

Quick reference

  • Where to file issues:

https://github.com/snowdreamtech/frp/issues

  • Maintained by:

snowdream sn0wdr1am@icloud.com

frpc:

amd64, arm32v6, arm32v7, arm64v8, i386

frps:

amd64, arm32v6, arm32v7, arm64v8, i386

  • Supported Tags:

Frps

Frpc

License

Apache 2.0

<!-- gh-comment-id:502753123 --> @snowdream commented on GitHub (Jun 17, 2019): 已经封装了Docker镜像,支持amd64, arm32v6, arm32v7, arm64v8, i386。 # frp Docker Image packaging for Frp. (amd64, arm32v6, arm32v7, arm64v8, i386) ## Usage start frps ``` docker run --network host -d -v /etc/frp/frps.ini:/etc/frp/frps.ini --name frps snowdreamtech/frps ``` start frpc ``` docker run --network host -d -v /etc/frp/frpc.ini:/etc/frp/frpc.ini --name frpc snowdreamtech/frpc ``` ## Quick reference * Where to file issues: [https://github.com/snowdreamtech/frp/issues](https://github.com/snowdreamtech/frp/issues) * Maintained by: snowdream <sn0wdr1am@icloud.com> * Supported architectures: ([more info](https://github.com/docker-library/official-images#architectures-other-than-amd64)) frpc: [amd64](https://cloud.docker.com/u/snowdreamtechamd64/repository/docker/snowdreamtechamd64/frpc), [arm32v6](https://cloud.docker.com/u/snowdreamtecharm32v6/repository/docker/snowdreamtecharm32v6/frpc), [arm32v7](https://cloud.docker.com/u/snowdreamtecharm32v7/repository/docker/snowdreamtecharm32v7/frpc), [arm64v8](https://cloud.docker.com/u/snowdreamtecharm64v8/repository/docker/snowdreamtecharm64v8/frpc), [i386](https://cloud.docker.com/u/snowdreamtechi386/repository/docker/snowdreamtechi386/frpc) frps: [amd64](https://cloud.docker.com/u/snowdreamtechamd64/repository/docker/snowdreamtechamd64/frps), [arm32v6](https://cloud.docker.com/u/snowdreamtecharm32v6/repository/docker/snowdreamtecharm32v6/frps), [arm32v7](https://cloud.docker.com/u/snowdreamtecharm32v7/repository/docker/snowdreamtecharm32v7/frps), [arm64v8](https://cloud.docker.com/u/snowdreamtecharm64v8/repository/docker/snowdreamtecharm64v8/frps), [i386](https://cloud.docker.com/u/snowdreamtechi386/repository/docker/snowdreamtechi386/frps) * Supported Tags: [Frps](https://cloud.docker.com/u/snowdreamtech/repository/docker/snowdreamtech/frps/tags) [Frpc](https://cloud.docker.com/u/snowdreamtech/repository/docker/snowdreamtech/frpc/tags) ## License Apache 2.0
Author
Owner

@deadlineOvO commented on GitHub (Sep 15, 2019):

可以在这里提交相关的东西了

<!-- gh-comment-id:531567303 --> @deadlineOvO commented on GitHub (Sep 15, 2019): 可以在[这里](https://github.com/gofrp/deploy)提交相关的东西了
Author
Owner

@ttimasdf commented on GitHub (Sep 3, 2020):

我是从google过来的,简单搜一下能搜到好多……给后来的人汇总一下。
没营养的: #1302 #902 #1474
一些解决方案: #1058 (本贴)
作者说明不维护service脚本(包括Dockerfile)的原因: https://github.com/fatedier/frp/pull/1291#issuecomment-502966225

建议加到项目FAQ里。


PS: 我平时用的Dockerfile,甚至不需要Alpine XD

FROM scratch
ARG ver=0.33.0
COPY ./frp_${ver}_linux_amd64/frps /frps
ENTRYPOINT ["/frps", "-c", "/frps.ini"]
<!-- gh-comment-id:686393768 --> @ttimasdf commented on GitHub (Sep 3, 2020): 我是从google过来的,简单搜一下能搜到好多……给后来的人汇总一下。 没营养的: #1302 #902 #1474 一些解决方案: #1058 (本贴) 作者说明不维护service脚本(包括Dockerfile)的原因: https://github.com/fatedier/frp/pull/1291#issuecomment-502966225 建议加到项目FAQ里。 ------ PS: 我平时用的Dockerfile,甚至不需要Alpine XD ```dockerfile FROM scratch ARG ver=0.33.0 COPY ./frp_${ver}_linux_amd64/frps /frps ENTRYPOINT ["/frps", "-c", "/frps.ini"] ```
Author
Owner

@yf-hk commented on GitHub (Jun 24, 2021):

建议还是做个 debian 包,直接安装的话还是多少省点事,更新起来也方便

<!-- gh-comment-id:867279379 --> @yf-hk commented on GitHub (Jun 24, 2021): 建议还是做个 debian 包,直接安装的话还是多少省点事,更新起来也方便
Author
Owner

@donmor commented on GitHub (Jul 24, 2025):

挖一下,看没什么人给Debian打包就搓了一套,常见架构都有,欢迎帮忙测试🙂
Debian Build Bot

<!-- gh-comment-id:3113222106 --> @donmor commented on GitHub (Jul 24, 2025): 挖一下,看没什么人给Debian打包就搓了一套,常见架构都有,欢迎帮忙测试🙂 [![Debian Build Bot](https://github.com/donmor/frp-debian/actions/workflows/dpkg-buildpackage.yml/badge.svg?event=release)](https://github.com/donmor/frp-debian/actions/workflows/dpkg-buildpackage.yml)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#832
No description provided.