Skip to main content

Frp

1. Overview​

FRP (Fast Reverse Proxy) is a reverse proxy tool that allows devices behind NAT or a firewall to be accessed from the public network through a server with a public IP address.

This guide uses a cloud server as the FRP server (frps) and PicoKVM as the FRP client (frpc). After configuration, you can access the PicoKVM web interface remotely through the cloud server.

The examples below use:

ItemExample
Cloud server public IP<SERVER_PUBLIC_IP>
FRP server port7000
HTTP access port40800
HTTPS access port40444
FRP dashboard port7500
TIP

Replace all placeholder values such as <SERVER_PUBLIC_IP>, <FRP_TOKEN>, and <FRP_DASHBOARD_PASSWORD> with your own values.

Placeholder descriptions:

PlaceholderDescription
<SERVER_PUBLIC_IP>Public IP address of your cloud server
<FRP_TOKEN>Authentication token shared by frps and frpc. Use a random, hard-to-guess string, and keep the same value on both sides
<FRP_DASHBOARD_PASSWORD>Login password for the FRP dashboard at http://<SERVER_PUBLIC_IP>:7500
<PICOKVM_IP>LAN IP address of PicoKVM, used when copying certificate files to PicoKVM

2. Preparation​

  1. Download the FRP package for the server from the FRP GitHub releases page. For a Linux x86_64 cloud server, download a package similar to frp_0.68.1_linux_amd64.tar.gz.

  2. Install FileZilla on your computer.

  3. Open FileZilla and connect to the cloud server using the SSH/SFTP information.

    Connection information:

    FieldDescription
    HostPublic IP address of the cloud server
    UsernameSSH username, for example ubuntu
    PasswordPassword for the SSH user
    PortSSH port, usually 22
  4. After the connection succeeds, upload the downloaded FRP package to the cloud server.

3. Server-Side Configuration​

3.1 Install frps​

  1. Extract the FRP package and enter the extracted directory:

    tar -zxvf frp_*_linux_amd64.tar.gz
    cd frp_*_linux_amd64
  2. Install frps:

    sudo cp frps /usr/local/bin/frps
    sudo chmod +x /usr/local/bin/frps

3.2 Create the Server Configuration​

  1. Create the FRP configuration directory:

    sudo mkdir -p /etc/frp
    sudo vim /etc/frp/frps.toml
  2. Add the following configuration:

    bindAddr = "0.0.0.0"
    bindPort = 7000

    vhostHTTPPort = 40800

    auth.method = "token"
    auth.token = "<FRP_TOKEN>"

    webServer.addr = "0.0.0.0"
    webServer.port = 7500
    webServer.user = "admin"
    webServer.password = "<FRP_DASHBOARD_PASSWORD>"
  3. Open the required ports in the cloud server firewall or security group:

    PortPurpose
    7000FRP client connection port
    40800HTTP access entry for PicoKVM
    40444HTTPS access entry for PicoKVM
    7500FRP dashboard

  4. Verify the configuration:

    frps verify -c /etc/frp/frps.toml

3.3 Create a systemd Service​

  1. Create the service file:

    sudo vim /etc/systemd/system/frps.service
  2. Add the following content:

    [Unit]
    Description=FRP Server
    After=network.target

    [Service]
    Type=simple
    ExecStart=/usr/local/bin/frps -c /etc/frp/frps.toml
    Restart=always
    RestartSec=5

    [Install]
    WantedBy=multi-user.target
  3. Start the FRP server:

    sudo systemctl daemon-reload
    sudo systemctl enable frps
    sudo systemctl start frps
    sudo systemctl status frps

4. PicoKVM Client Configuration​

PicoKVM supports FRP client configuration from the web interface. Open the PicoKVM web interface, go to Settings -> Access, and enter the frpc.toml configuration according to one of the following access methods.

5. Option 1: HTTP Access​

This method is the simplest option and does not require a certificate.

External access address:

http://<SERVER_PUBLIC_IP>:40800

Use the following frpc.toml configuration on PicoKVM:

serverAddr = "<SERVER_PUBLIC_IP>"
serverPort = 7000

auth.method = "token"
auth.token = "<FRP_TOKEN>"

[[proxies]]
name = "picokvm-http"
type = "http"
localIP = "127.0.0.1"
localPort = 80
customDomains = ["<SERVER_PUBLIC_IP>"]

Click Start to test the connection. If the configuration is correct, the log should show success and no error messages.

6. Option 2: HTTPS Access with https2http​

This method exposes an HTTPS entry on the public network and forwards traffic to the PicoKVM HTTP service.

External access address:

https://<SERVER_PUBLIC_IP>:40444

6.1 Generate a Self-Signed Certificate​

Run the following commands on your PC or Linux host:

mkdir -p ~/picokvm/tls
openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
-keyout ~/picokvm/tls/__ca__.key \
-out ~/picokvm/tls/__ca__.crt \
-subj "/CN=<SERVER_PUBLIC_IP>"

Copy the certificate files to PicoKVM:

scp -r ~/picokvm/tls root@<PICOKVM_IP>:/userdata/picokvm/

6.2 Configure frpc.toml​

Use the following configuration on PicoKVM:

serverAddr = "<SERVER_PUBLIC_IP>"
serverPort = 7000

auth.method = "token"
auth.token = "<FRP_TOKEN>"

[[proxies]]
name = "picokvm-https"
type = "tcp"
localIP = "127.0.0.1"
localPort = 80
remotePort = 40444

[proxies.plugin]
type = "https2http"
localAddr = "127.0.0.1:80"
crtPath = "/userdata/picokvm/tls/__ca__.crt"
keyPath = "/userdata/picokvm/tls/__ca__.key"

6.3 Test HTTPS Access​

Click Start to test the connection. If the configuration is correct, the log should show success and no error messages.

note

Because this example uses a self-signed certificate, the browser may show a certificate warning when you access PicoKVM through HTTPS. This is expected for self-signed certificates.