Getting Started with FRP - A Comprehensive Setup Guide

Getting Started with FRP - A Comprehensive Setup Guide

Fireflies Lv2

Introduction

FRP (Fast Reverse Proxy) is a high-performance reverse proxy application that allows you to expose a local server behind a NAT or firewall to the internet. It is particularly useful for scenarios where you need to access services on your home or office network from anywhere in the world.

Why use FRP?

  • Easy to use: Simple configuration files and straightforward deployment.
  • Versatile: Supports multiple protocols including TCP, UDP, HTTP, and HTTPS.
  • High Performance: Optimized for speed and low resource usage.
  • Security: Supports encryption and compression for data transmission.

Download FRP

You can find the latest releases of frp on their official GitHub repository: https://github.com/fatedier/frp.

Steps to download:

  1. Go to the Releases page.
  2. Select the version appropriate for your operating system (e.g., frp_0.68.1_linux_amd64.tar.gz).

Linux Command:

To download and extract frp on a Linux server, you can use the following commands:

1
2
3
wget https://github.com/fatedier/frp/releases/download/v0.68.1/frp_0.68.1_linux_amd64.tar.gz
tar -zxvf frp_0.68.1_linux_amd64.tar.gz
cd frp_0.68.1_linux_amd64

Remember to replace the link and filename with the one you want.

Configure FRPS

frps is the server-side component that should be run on a machine with a public IP address.

  1. Locate the frps.toml file in the extracted directory.
  2. Edit the configuration to specify the port frps will listen on:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# 1. frp listening setting
bindPort = 7000

# 2. Authentication setting
auth.method = "token"
auth.token = "STRONG_PASSWORD"

# 3. Web dashboard (Check status)
webServer.addr = "0.0.0.0"
webServer.port = 7500 # Access IP:7500 by browser
webServer.user = "DASHBOARD_USERNAME"
webServer.password = "DASHBOARD_PASSWORD"

# 4. Port white list
allowPorts = [
{ start = 5432, end = 5432 },
{ start = 10000, end = 10005 }
]
  1. Start the server:
1
./frps -c ./frps.toml

Configure FRPC

frpc is the client-side component that runs on your local machine behind the NAT.

  1. Locate the frpc.toml file.
  2. Configure it to connect to your frps server and define the services you want to expose:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# 1. Connection with server
serverAddr = "x.x.x.x" # Your server public IP
serverPort = 7000 # Must be the same as bindPort in frps.toml

# 2. Authetication setting
auth.method = "token"
auth.token = "STRONG_PASSWORD" # Must be the same as auth.token in frps.toml

# 3. Enable TLS
transport.tls.enable = true

# 4. Proxy setting
[[proxies]]
name = "postgresql" # Name must be unique
type = "tcp" # Protocol
localIP = "127.0.0.1"
localPort = 5432
remotePort = 5432

[[proxies]]
name = "ssh"
type = "tcp"
localIP = "127.0.0.1"
localPort = 22
remotePort = 6000

[[proxies]]
name = "my-web"
type = "http"
localIP = "127.0.0.1"
localPort = 80
customDomains = ["www.yourdomain.com"]
  1. Start the client:
1
./frpc -c ./frpc.toml

Configure systemd

To allow frps and frpc to run stably in the background and start on boot, we will configure systemd.

  1. Move the executable file to system directory.

frps:

1
sudo cp frps /usr/local/bin/

frpc:

1
sudo cp frpc /usr/local/bin/
  1. Create systemd config directory.

frps:

1
sudo mkdir /etc/frp && sudo cp frps.toml /etc/frp/

frpc:

1
sudo mkdir /etc/frp && sudo cp frpc.toml /etc/frp/
  1. Create service file.

frps:

1
sudo vim /etc/systemd/system/frps.service
1
2
3
4
5
6
7
8
9
10
11
12
13
[Unit]
Description=Frp Server Service
After=network.target

[Service]
Type=simple
User=nobody
Restart=on-failure
RestartSec=5s
ExecStart=/usr/local/bin/frps -c /etc/frp/frps.toml

[Install]
WantedBy=multi-user.target

frpc:

1
sudo vim /etc/systemd/system/frpc.service
1
2
3
4
5
6
7
8
9
10
11
12
13
[Unit]
Description=Frp Client Service
After=network.target

[Service]
Type=simple
User=nobody
Restart=on-failure
RestartSec=5s
ExecStart=/usr/local/bin/frpc -c /etc/frp/frpc.toml

[Install]
WantedBy=multi-user.target
  1. Start service.

frps:

1
2
sudo systemctl enable frps
sudo systemctl start frps

frpc:

1
2
sudo systemctl enable frpc
sudo systemctl start frpc
  • Title: Getting Started with FRP - A Comprehensive Setup Guide
  • Author: Fireflies
  • Created at : 2026-05-15 19:48:15
  • Updated at : 2026-05-15 22:30:03
  • Link: https://fireflies3072.github.io/frp-tutorial/
  • License: This work is licensed under CC BY-NC-SA 4.0.