Deploying the FRP Server on a Linux System
1. Installing Docker and Docker Compose
To ensure flexible deployment and management of the FRP server, you first need to install Docker and Docker Compose. Docker provides containerization technology, while Docker Compose makes it easier to manage containers. The installation command is as follows:
bash <(curl -sSL [https://linuxmirrors.cn/docker.sh](https://linuxmirrors.cn/other/))
This command downloads and installs Docker from a Linux mirror website, simplifying the installation process.
2. Create the FRPs Installation Directory
Next, we need to create a directory to store the relevant files for the FRP server. Run the following commands:
mkdir -p /root/data/docker/frps
cd /root/data/docker/frps
3. Write the docker-compose.yml Configuration File
Docker Compose defines multi-container Docker applications through a YAML file. We need to create and edit the docker-compose.yml file to define the container configuration for the FRP server:
version: '3.3'
services:
frps:
restart: always
network\_mode: host
volumes:
- './frps.toml:/etc/frp/frps.toml'
container\_name: frps
image: snowdreamtech/frps
This configuration file tells Docker Compose how to deploy the FRP server container.
4. Write the frps.toml Configuration File
The FRP server configuration is handled through the frps.toml file. We need to create this file and fill in the necessary configuration information:
[common]
bind\_port= 5443
kcp\_bind\_port = 5443
dashboard\_user= 请修改此处
dashboard\_pwd= 请修改此处
dashboard\_port= 请修改此处
token = 请修改此处
Please make sure to replace the placeholders in the configuration file (“请修改此处”) with actual values.
5. Start the Docker Container for the FRP Server
After the configuration files are ready, you can start the Docker container for the FRP server:
This command starts the container in background mode.
Deploying the FRP Server on a Windows System
1. Download FRP
According to your Windows system architecture (32-bit or 64-bit), download the corresponding version of FRP from the FRP GitHub repository.
2. Extract the FRP Archive
Extract the downloaded FRP archive to a suitable directory, for example C:\frp.
3. Modify the frps.toml Configuration File
Find or create the frps.toml configuration file in the FRP extraction directory, and fill in the server-side configuration information.
4. Write the Startup Script
Create a batch file named start.bat in the FRP directory with the following content:
Double-click the start.bat batch file to start the FRP server.