@cryptotaxi247 / kubo / commits / fdfd2bc4a

docs: document rpc over unix socket

Marcin Rataj committed Aug 20, 2024 at 17:01 UTC fdfd2bc4a16782cce96f7d057f79ba055018d893
2 files changed +24 -1
cmd/ipfs/kubo/daemon.go
+5
@@ -113,6 +113,11 @@ control your node remotely. If you need to control the node remotely,
113 make sure to protect the port as you would other services or database
114 (firewall, authenticated proxy, etc), or at least set API.Authorizations.
115
116 +If you do not want to open any ports for RPC, and only want to use
117 +kubo CLI client, it is possible to expose the RPC over Unix socket:
118 +
119 + ipfs config Addresses.API /unix/var/run/kubo.socket
120 +
121 HTTP Headers
122
123 Kubo supports passing arbitrary headers to the RPC API and Gateway. You can
docs/changelogs/v0.30.md
+19 -1
@@ -10,6 +10,7 @@
10 - [AutoNAT V2 Service Introduced Alongside V1](#autonat-v2-service-introduced-alongside-v1)
11 - [Automated `ipfs version check`](#automated-ipfs-version-check)
12 - [Version Suffix Configuration](#version-suffix-configuration)
13 + - [`/unix/` socket support in `Addresses.API`](#unix-socket-support-in-addressesapi)
14 - [Cleaned Up `ipfs daemon` Startup Log](#cleaned-up-ipfs-daemon-startup-log)
15 - [📝 Changelog](#-changelog)
16 - [👨‍👩‍👧‍👦 Contributors](#-contributors)
@@ -49,7 +50,24 @@ Defining the optional agent version suffix is now simpler. The [`Version.AgentSu
50
51 > [!NOTE]
52 > Setting a custom version suffix helps with ecosystem analysis, such as Amino DHT reports published at https://stats.ipfs.network
52 ->
53 +
54 +#### `/unix/` socket support in `Addresses.API`
55 +
56 +This release fixes a bug which blocked users from disabling local HTTP port for [Kubo RPC](https://docs.ipfs.tech/reference/kubo/rpc/), and using a Unix socket instead.
57 +
58 +```console
59 +$ ipfs config Addresses.API "/unix/tmp/kubo.socket"
60 +$ ipfs daemon # start with rpc socket
61 +...
62 +RPC API server listening on /unix/tmp/kubo.socket
63 +
64 +$ # cli client, in different terminal can find socket via /api file
65 +$ cat $IPFS_PATH/api
66 +/unix/tmp/kubo.socket
67 +
68 +$ # or have it pased via --api
69 +$ ipfs --api=/unix/tmp/kubo.socket id
70 +```
71
72 #### Cleaned Up `ipfs daemon` Startup Log
73