Skip to content

Commit 8586043

Browse files
committed
chore(readme): update remote docker frpc setup guide
Signed-off-by: Anupam Kumar <kyteinsky@gmail.com>
1 parent dadcb7c commit 8586043

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

README.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,14 @@ For remote or external Docker Engines - or if you prefer not to mount the Docker
218218
- `client.key`
219219
- `ca.crt`
220220

221+
```bash
222+
mkdir -p harp_frpc_docker/certs/frp
223+
cd harp_frpc_docker
224+
for f in {client.crt,client.key,ca.crt}; do docker cp appapi-harp:/certs/frp/$f certs/frp/; done
225+
```
226+
221227
2. **Create an FRP Client Configuration:**
222-
With the certificate files in hand, create a configuration file (for example, `frpc.toml`) on the Docker Engine host. Below is a sample configuration:
228+
With the certificate files in hand, create a configuration file (for example, `frpc.toml`) on the Docker Engine host in the "harp_frpc_docker" folder. Below is a sample configuration:
223229

224230
```toml
225231
# frpc.toml
@@ -257,12 +263,32 @@ For remote or external Docker Engines - or if you prefer not to mount the Docker
257263
```bash
258264
docker run \
259265
-v /path/to/frpc.toml:/etc/frpc.toml \
266+
-v `pwd`/certs:/certs \
260267
-v /var/run/docker.sock:/var/run/docker.sock \
261268
--restart unless-stopped \
269+
-d --name harp_frpc_docker \
262270
-- ghcr.io/fatedier/frpc:v0.61.1 "-c=/etc/frpc.toml"
263271
```
264272

265-
You may want to run the FRP client-server connections through the same reverse proxy as the Nextcloud instance for better security. The following is an example of how to configure NGINX for this purpose:
273+
Or with docker compose:
274+
275+
```yaml
276+
services:
277+
harp_frpc_docker:
278+
image: ghcr.io/fatedier/frpc:v0.61.1
279+
container_name: harp_frpc_docker
280+
volumes:
281+
- ./frpc.toml:/etc/frpc.toml
282+
- ./certs:/certs
283+
- /var/run/docker.sock:/var/run/docker.sock
284+
restart: unless-stopped
285+
command: -c=/etc/frpc.toml
286+
```
287+
```bash
288+
docker compose up -d
289+
```
290+
291+
The FRP client-server connections, i.e. the connection from the above FRP client to the FRP server in the HaRP container, can be passed through the same reverse proxy as the Nextcloud instance for better security. The following is an example of how to configure NGINX for this purpose:
266292

267293
```nginx
268294
stream {

0 commit comments

Comments
 (0)