-
Base documentation: https://github.com/fatedier/frp#table-of-contents
-
Full examples: https://github.com/fatedier/frp/blob/dev/conf/frpc_full.ini
1° Change environment variable in Dockerfile to correct number and target architecture
ENV ARCH arm64
OR
ENV ARCH amd64
ENV FRP_VERSION 0.33.0
2° Build the Dockerfile by changing ${FRP_VERSION} with proper number e.g. 0.33.0
docker build --tag frpc:${FRP_VERSION} .
💡
|
To build for another platform you can follow this guide: https://github.com/matbgn/auto-scan#build-for-other-platforms |
3° Run the new instance by changing ${FRP_VERSION} with proper number e.g. 0.33.0
docker run -d \
--network host \
--name frpc \
--restart=always \
-v /etc/frp:/conf \
frpc:${FRP_VERSION}
|
You need to specify network as host to enable port forwarding |
# sudo nano /etc/frp/frpc.ini
[common]
server_addr = server_ip_address
server_port = 7000
token = your_token_same_as_frps
[web01]
type = http
local_port = 8080
# Custom domains can not be repeated:
custom_domains = awesome.example.com
[web02]
type = https
# local_port = 3000
# Custom domains can not be repeated:
custom_domains = another.example.com
# Rerouting local http server with SSL certificate
plugin = https2http
plugin_local_addr = 127.0.0.1:8080
plugin_crt_path = /conf/certs/fullchain.pem
plugin_key_path = /conf/certs/privkey.pem
plugin_host_header_rewrite = another.example.com
plugin_header_X-From-Where = frp
|
Don’t forget to resolve *.example.com to the frps server’s IP. This is usually called a Wildcard DNS record. |
ℹ️
|
In order to achieve certification you have to generate a certificate (e.g. via Certbot for Webmin) and place it in following folder on local server:
|