frps
Expose local services behind NAT to public
TLDR
Start the service, using the default configuration file (assumed to be frps.ini in the current directory)
Start the service, using the newer TOML configuration file (frps.toml instead of frps.ini) in the current directory
Start the service, using a specified configuration file
Check if the configuration file is valid
Print autocompletion setup script for Bash, fish, PowerShell, or Zsh
Display version
SYNOPSIS
frps [-c <config_file> | --config <config_file>]
frps [--version | -v]
frps [--help]
PARAMETERS
-c <path>, --config <path>
Specifies the path to the frps configuration file (e.g., frps.ini). This is the most common way to configure the server's behavior.
-v, --version
Prints the version information of the frps server and exits.
--help
Displays a help message with available command-line options and exits.
--log-file <path>
Specifies the path for the log file. If not set, logs may be directed to standard output or syslog.
--log-level <level>
Sets the logging level. Possible values include info, warn, error, debug, and trace. Defaults to info.
--log-max-days <days>
Sets the maximum number of days to retain log files. Older logs will be automatically deleted.
--disable-log-redirect
Prevents frps from redirecting standard output and standard error to the log file, ensuring they are output to the console.
DESCRIPTION
frps (Fast Reverse Proxy Server) is the server-side component of the frp project, an open-source reverse proxy solution. It is designed to facilitate network traversal, allowing services located behind a NAT or firewall to be exposed to the public internet. This is achieved by establishing a persistent connection from a client (frpc) within the private network to the frps server, which typically resides on a publicly accessible IP address.
frps acts as an intermediary, forwarding requests from the public internet to the appropriate local service via the established tunnel. It supports various protocols, including TCP, UDP, HTTP, and HTTPS, making it a versatile tool for remote access, web service publishing, and secure internal network communication. Its primary use case is to make services accessible that would otherwise be unreachable due to network restrictions or complex firewall configurations.
CAVEATS
When deploying frps, security is paramount. Improper configuration, such as using weak authentication tokens, exposing unnecessary ports, or not enabling TLS, can lead to unauthorized access to internal network resources. It's crucial to use strong tokens, enable TLS encryption where possible, and restrict access to the server.
While efficient, frps can become a performance bottleneck for services with very high traffic volumes, as all data passes through the server. Careful resource planning for the server hosting frps is advisable.
CONFIGURATION FILE (FRPS.INI)
The primary configuration for frps is typically managed through a dedicated file, most commonly named frps.ini. This file contains settings for server binding ports (e.g., bind_port), dashboard settings (dashboard_port, dashboard_user, dashboard_pwd), authentication tokens (token), and virtual host configurations (vhost_http_port, vhost_https_port). Command-line options usually complement or override specific settings defined within this file.
DAEMONIZATION
For production environments, frps is almost always run as a background service to ensure continuous operation. This is commonly achieved using process managers like systemd on Linux, which can automatically start frps on system boot, restart it upon crashes, and manage its logging.
WEB DASHBOARD
frps includes an optional web-based dashboard, which can be enabled and configured within the frps.ini file. This dashboard provides real-time monitoring of active frpc client connections, traffic statistics, and overall server status, offering a convenient way to oversee the proxy's operation.
HISTORY
The frp project, including frps, was initiated by fatedier as an open-source solution on GitHub. It quickly gained popularity for its lightweight design and versatility in addressing common network traversal challenges. Its development focused on providing a user-friendly and efficient alternative to more complex VPNs or firewall configurations for exposing internal services. The project has seen continuous development and community contributions, enhancing its features, stability, and protocol support, making it a widely adopted tool for both personal and enterprise use cases.
SEE ALSO
frpc(1) - The client component of the frp project for connecting to frps., ssh(1) - Secure Shell, often used for similar port forwarding and tunneling purposes., socat(1) - A versatile relay for various protocols, capable of complex network manipulations., nginx(8) - A powerful web server and reverse proxy that can also handle similar traffic forwarding scenarios, though typically at the application layer.