mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 18:37:45 +08:00
docs: document rpc over unix socket
This commit is contained in:
parent
a5f4d0be02
commit
fdfd2bc4a1
@ -113,6 +113,11 @@ control your node remotely. If you need to control the node remotely,
|
||||
make sure to protect the port as you would other services or database
|
||||
(firewall, authenticated proxy, etc), or at least set API.Authorizations.
|
||||
|
||||
If you do not want to open any ports for RPC, and only want to use
|
||||
kubo CLI client, it is possible to expose the RPC over Unix socket:
|
||||
|
||||
ipfs config Addresses.API /unix/var/run/kubo.socket
|
||||
|
||||
HTTP Headers
|
||||
|
||||
Kubo supports passing arbitrary headers to the RPC API and Gateway. You can
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
- [AutoNAT V2 Service Introduced Alongside V1](#autonat-v2-service-introduced-alongside-v1)
|
||||
- [Automated `ipfs version check`](#automated-ipfs-version-check)
|
||||
- [Version Suffix Configuration](#version-suffix-configuration)
|
||||
- [`/unix/` socket support in `Addresses.API`](#unix-socket-support-in-addressesapi)
|
||||
- [Cleaned Up `ipfs daemon` Startup Log](#cleaned-up-ipfs-daemon-startup-log)
|
||||
- [📝 Changelog](#-changelog)
|
||||
- [👨👩👧👦 Contributors](#-contributors)
|
||||
@ -49,7 +50,24 @@ Defining the optional agent version suffix is now simpler. The [`Version.AgentSu
|
||||
|
||||
> [!NOTE]
|
||||
> Setting a custom version suffix helps with ecosystem analysis, such as Amino DHT reports published at https://stats.ipfs.network
|
||||
>
|
||||
|
||||
#### `/unix/` socket support in `Addresses.API`
|
||||
|
||||
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.
|
||||
|
||||
```console
|
||||
$ ipfs config Addresses.API "/unix/tmp/kubo.socket"
|
||||
$ ipfs daemon # start with rpc socket
|
||||
...
|
||||
RPC API server listening on /unix/tmp/kubo.socket
|
||||
|
||||
$ # cli client, in different terminal can find socket via /api file
|
||||
$ cat $IPFS_PATH/api
|
||||
/unix/tmp/kubo.socket
|
||||
|
||||
$ # or have it pased via --api
|
||||
$ ipfs --api=/unix/tmp/kubo.socket id
|
||||
```
|
||||
|
||||
#### Cleaned Up `ipfs daemon` Startup Log
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user