0

I've set up a Cardano node using DigitalOcean's droplet, and I've gotten to the point where I can run:

cardano-wallet serve
 --port 1337
 --mainnet 
 --database ~/cardano/db
 --node-socket ~/cardano/db/node.socket

However, I'm not able to access it publicly either via a web browser or using CURL.

curl --url http://<public ip address>:1337/v2/network/information | jq

I've made sure the firewall rules allow inbound connections via TCP to port 1337 (all ipv4 and ipv6). Outbound supports all TCP and all UDP for all ports.

Any ideas?

1 Answer 1

2

First off, the wallet API is not secure. It should never ever be open to the public without TLS client based authentication.

Second, by default it only listen on 127.0.0.1 (localhost loopback) to prevent people from accidentally running it on a public server open to the world. If you're absolutely sure you want to do this (which I would only do if you run in TLS mode with a CA authorizing a client certificate like Daedalus does by default), you would use this parameter:

  --listen-address HOST    Specification of which host to the bind API server
                           to. Can be an IPv[46] address, hostname, or '*'.
                           (default: 127.0.0.1)
3
  • Yes, that's the next thing I need to figure out. I didn't want to install Apache, thinking it might conflict with the service. But SSL requires Apache on Ubuntu? Still researching, any pointers would be appreciated. Jan 30 at 21:49
  • 1
    I personally would secure it with nginx doing ssl termination and a reverse proxy. Then you can also institute things like allow/deny lists, rate limiting, etc... at the service level before it hits the wallet webserver. Jan 31 at 2:18
  • THANK YOU. That's actually in line with the advice I got from a dev ops friend this afternoon (he didn't know the details about Cardano, but he knows servers and security) Feb 1 at 3:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.