Unable to login to openbalena instance

Thanks for your help, @bversluijs!

I have an intriguing observation. I can ping [mydomain].org, but pinging api.[mydomain].org gives me:

$ ping api.[mydomain].org
cannot resolve api.[mydomain].org: Unknown host

$ curl api.[mydomain].org
curl: (6) Could not resolve host: api.[mydomain].org

At the same time, running docker ps shows me that the necessary containers are apparently running:

root@openbalena:~# docker ps
CONTAINER ID        IMAGE                                 COMMAND                  CREATED             STATUS              PORTS                                                                                           NAMES
b993d71af1be        openbalena_haproxy                    "/docker-entrypoint.…"   16 hours ago        Up 16 hours         0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp, 222/tcp, 5432/tcp, 0.0.0.0:3128->3128/tcp, 6379/tcp   openbalena_haproxy_1
11c8330cfdd2        balena/open-balena-vpn:v8.10.0        "/usr/bin/entry.sh"      16 hours ago        Up 16 hours         80/tcp, 443/tcp, 3128/tcp                                                                       openbalena_vpn_1
41c0dfae76a3        balena/open-balena-api:v0.19.5        "/usr/bin/entry.sh"      16 hours ago        Up 16 hours         80/tcp                                                                                          openbalena_api_1
219929aec5de        balena/open-balena-registry:v2.11.1   "/usr/bin/entry.sh"      16 hours ago        Up 16 hours         80/tcp                                                                                          openbalena_registry_1
d6518d97720f        balena/open-balena-s3:v2.8.5          "/usr/bin/entry.sh"      16 hours ago        Up 16 hours         80/tcp                                                                                          openbalena_s3_1
398a48e1fe5a        redis:alpine                          "docker-entrypoint.s…"   16 hours ago        Up 16 hours         6379/tcp                                                                                        openbalena_redis_1
1bd8dacab6b5        openbalena_cert-provider              "/entry.sh /usr/src/…"   16 hours ago        Up 16 hours         80/tcp                                                                                          openbalena_cert-provider_1
e30ae561b38d        balena/open-balena-db:v2.0.3          "docker-entrypoint.s…"   16 hours ago        Up 16 hours         5432/tcp                                                                                        openbalena_db_1

Also thanks for responding, @JuanFRidano!

Running the dig commands shows me that I do have an ;; ANSWER SECTION: on both [mydomain].org and api.[mydomain].org. I think the CNAME records are correct, though to troubleshoot, here is the output:

$ dig [mydomain].org
; <<>> DiG 9.9.7-P3 <<>>[mydomain].org
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19807
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;[mydomain].org.           IN      A

;; ANSWER SECTION:
[mydomain].org.    15      IN      A       [CORRECT IP ADDRESS HERE]

;; Query time: 11 msec
;; SERVER: 192.168.2.1#53(192.168.2.1)
;; WHEN: Fri Jun 12 23:23:08 EDT 2020
;; MSG SIZE  rcvd: 64
$ dig api.[mydomain].org

; <<>> DiG 9.9.7-P3 <<>> api.[mydomain].org
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28202
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;api.[mydomain].org.       IN      A

;; ANSWER SECTION:
api.[mydomain].org. 15     IN      CNAME   api.[mydomain].org.

;; Query time: 226 msec
;; SERVER: 192.168.2.1#53(192.168.2.1)
;; WHEN: Fri Jun 12 23:25:06 EDT 2020
;; MSG SIZE  rcvd: 66

Could it be I need to open up some ports or configure NGINX?