Fast Reverse Proxy server that allows you to expose local servers located behind a NAT or firewall to the Internet.
docker compose up -d
| Variable | Default | Description |
|---|---|---|
AUTH_TOKEN | change-me | Authentication token for frpc connections |
DASHBOARD_USER | admin | Dashboard username |
DASHBOARD_PASSWORD | 1234 | Dashboard password |
SUBDOMAIN_HOST | frps.com | Base domain for virtual hosts |
LOG_LEVEL | info | Log level (trace, debug, info, warn, error) |
SSL_CERT_FILE | /ssl/fullchain.pem | Path to SSL certificate |
SSL_KEY_FILE | /ssl/privkey.pem | Path to SSL private key |
SSL_TRUST_FILE | - | Optional: Path to trusted CA file |
Create a .env file:
AUTH_TOKEN=your-secure-token-here
DASHBOARD_USER=admin
DASHBOARD_PASSWORD=your-secure-password
SUBDOMAIN_HOST=yourdomain.com
LOG_LEVEL=info
Then start:
docker compose up -d
After starting, access the dashboard at http://your-server:7500
To include this frpserver in another project:
git submodule add https://github.com/hieupth/frpserver.git submodules/frpserver
compose.yml:include:
- path: ./submodules/frpserver/compose.yml
services:
frps:
ports:
- "7000:7000" # Required: FRP server
- "7500:7500" # Required: Dashboard
environment:
- AUTH_TOKEN=${MY_AUTH_TOKEN}
- DASHBOARD_PASSWORD=${MY_DASHBOARD_PASSWORD}
- SUBDOMAIN_HOST=example.com
Important: When using as submodule, you must define all required ports in your override. The ports from the base service are not inherited.
To run multiple frps instances with different configurations, use the x-frps-service template:
include:
- path: ./submodules/frpserver/compose.yml
services:
# Instance 1 - Production
frps-prod:
<<: *frps-service
ports:
- "7000:7000"
- "7500:7500"
environment:
- AUTH_TOKEN=${PROD_AUTH_TOKEN}
- DASHBOARD_PASSWORD=${PROD_DASHBOARD_PASSWORD}
- SUBDOMAIN_HOST=prod.example.com
# Instance 2 - Staging
frps-staging:
<<: *frps-service
ports:
- "7001:7000"
- "7501:7500"
environment:
- AUTH_TOKEN=${STAGING_AUTH_TOKEN}
- DASHBOARD_PASSWORD=${STAGING_DASHBOARD_PASSWORD}
- SUBDOMAIN_HOST=staging.example.com
Note: Extension fields (x-) are preserved during include, making *frps-service available for reuse.
| Internal Port | Required | Description |
|---|---|---|
| 7000 | Yes | FRP server port - for client connections |
| 7500 | Yes | Dashboard web UI |
| 2095 | No | TCP multiplex HTTP connect |
| 8080 | No | HTTP virtual host |
| 8443 | No | HTTPS virtual host |
Port Mapping Example:
ports:
- "7000:7000" # host:container - expose FRP server on host port 7000
- "7500:7500" # host:container - expose dashboard on host port 7500
Copyright © 2025 Hieu Pham. All rights reserved.
Content type
Image
Digest
sha256:08adbe09c…
Size
15.5 MB
Last updated
6 months ago
docker pull hieupth/frpserver