Issue replicating via Sync Gateway (cannot access admin port)

I’m trying to replicate data currently stored on a Cloudant db to a Couchbase Server instance via Sync Gateway. I’ve got SG set up and assigned a default bucket with the following config e.g:

{
  "log": ["*"],
  "databases": {
    "db": {
      "server": "http://<ip-address>:8091:",
      "bucket": "mydb",
      "users": { "GUEST": { "disabled": false, "admin_channels": ["*"] } }
    }
  }

I get the CouchDB hello message when I ping the SG port.

However when I try and replicate with e.g.:

curl -H 'Content-Type: application/json' -X POST http://<ip-address>:4984/_replicate -d ' {"source": "https://<username>:<password>@<my-account>.cloudant.com/mydb", "target": "mydb"} '

I get {"error":"not_found","reason":"unknown URL"}

I seem to get this with any input to _replicate. Is there something I’m missing here? Which bit is the "unknown URL" here?

It should be run against Admin REST API (port :4985 instead of 4984)

I’m getting curl: (7) Failed to connect to <ip-address> port 4985: Connection refused

I’m using Docker images, docker ps shows the following:

CONTAINER ID        IMAGE                    COMMAND                  CREATED             STATUS              PORTS                                                                                               NAMES
5a1e69b64442        couchbase/sync-gateway   "sync_gateway https:/"   16 hours ago        Up 16 hours         0.0.0.0:4984-4985->4984-4985/tcp                                                                    tiny_lumiere
adca39eea937        couchbase                "/entrypoint.sh couch"   5 weeks ago         Up 5 weeks          0.0.0.0:8091-8094->8091-8094/tcp, 11207/tcp, 11211/tcp, 0.0.0.0:11210->11210/tcp, 18091-18093/tcp   db

Trying from the server, e.g.

curl -H 'Content-Type: application/json' -X POST http://0.0.0.0:4985/_replicate -d ' {"source": "https://<username>:<password>@<my-account>.cloudant.com/mydb", "target": "mydb"} '

I get curl: (56) Recv failure: Connection reset by peer

I also can’t see the admin page if I navigate to http://<ip-address>:4985/_admin in the browser.

I don’t know if this is related at all, but if I send e.g.

curl http://0.0.0.0:4984/mydb

I get

<a href="/mydb/">Moved Permanently</a>.

Could there be something wrong with the way I’ve installed Sync Gateway via Docker?