Documentation contents

Domain and HTTPS

Point your domain to the server. Have the TLS certificate for that domain and its private key ready for installation.

Apps connect to Gadka only over encrypted connections. You need a domain and a TLS certificate issued for it.

HTTPS and QUIC connections

  • The bundled reverse proxy (gadka-proxy.service) accepts HTTPS on TCP port 6543 and forwards requests to the Gadka server at 127.0.0.1:8080.
  • The Gadka server accepts QUIC connections directly on UDP port 6543.
  • Both use the same certificate and key files, /etc/gadka/tls-cert.pem and /etc/gadka/tls-key.pem.

You supply and renew the certificate. Gadka does not fetch or renew certificates automatically or connect to services such as ACME.

1. Set up DNS

Add an A (IPv4) or AAAA (IPv6) record for your domain, e.g. gadka.example.com, pointing to the server’s IP address, e.g. 203.0.113.10.

Check the record from another computer.

nslookup gadka.example.com

2. Prepare the certificate

You need two PEM files:

  • The full certificate chain, with the server certificate first, followed by the intermediate certificates.
  • The private key.

You can use a public certificate authority or your company’s certificate authority. If your company issues the certificate, team members’ computers must trust its certificate authority.

The installer asks for both file paths and copies the files to /etc/gadka.

Renewing the certificate

When you receive the new certificate, replace the files and restart the services. In this example, nowy-fullchain.pem and nowy-klucz.pem are the new chain and private key.

sudo install -o root -g gadka -m 0640 nowy-fullchain.pem /etc/gadka/tls-cert.pem
sudo install -o root -g gadka -m 0640 nowy-klucz.pem /etc/gadka/tls-key.pem
sudo systemctl restart gadka gadka-proxy

Apps reconnect automatically after a few seconds.

Put the certificate expiry date in your calendar. Once it expires, apps can no longer connect.

Changing the domain or port

The domain and port are configured in /etc/gadka/gadka.yaml (the api.public_url, auth.issuer and gateway.quic_listen keys) and in /etc/gadka/Caddyfile. Update both files and restart both services. Users must enter the new domain in the app if the domain changes.

Troubleshooting

SymptomWhat to check
The app displays No Gadka server responds at this address.Check DNS, the firewall and the status of gadka-proxy
The app reports a certificate errorCheck that the certificate file includes the full chain and that the certificate matches the domain
gadka-proxy fails to startRun journalctl -u gadka-proxy -n 50