Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit e89ff99

Browse files
authored
Merge pull request #15 from orbitdb/docs/https_options
https flags for passing cert and private key.
2 parents f32d09d + 96fd318 commit e89ff99

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,7 @@ typings/
5959

6060
# next.js build output
6161
.next
62+
63+
# ignore certificates
64+
*.crt
65+
*.key

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ In local mode, OrbitDB HTTP Client will launch its own IPFS node to replicate
4949
the OrbitDB peer:
5050

5151
```shell
52-
node src/cli.js local --orbitdb-dir /path/to/orbitdb
52+
node src/cli.js local --orbitdb-dir /path/to/orbitdb --https-cert ./my.crt --https-key my.key
5353
```
5454

5555
where --orbitdb-dir is the path to your OrbitDB peer.
@@ -58,12 +58,25 @@ In api mode, OrbitDB HTTP Client will connect to an existing IPFS node to
5858
replicate the OrbitDB peer:
5959

6060
```shell
61-
node src/cli.js api --ipfs-host localhost --orbitdb-dir /path/to/orbitdb
61+
node src/cli.js api --ipfs-host localhost --orbitdb-dir /path/to/orbitdb --https-cert ./my.crt --https-key my.key
6262
```
6363

6464
where --ipfs-host is an external IPFS node and --orbitdb-dir is the path to
6565
your OrbitDB peer.
6666

67+
In both modes, you will also need to specify an SSL certifcate and private key:
68+
69+
--https-cert will be the path to your certificate.
70+
--https-key will be the path to your associated private key.
71+
72+
You can generate an SSL certificate using an SSL certificate authority such as
73+
Let's Encrypt. Alternatively, you can create your own self-signed certificate
74+
although this is highly discouraged for production environments.
75+
76+
When using a self-signed SSL certificate you will either need to add your
77+
certificate to your CA list or pass the ```-k``` option to curl, telling curl to
78+
ignore the the insecure connection.
79+
6780
## API
6881

6982
### GET /dbs

0 commit comments

Comments
 (0)