GitLab refuses a Kroki server on the local machine

When I try to configure GitLab to use a Kroki server I have manually installed at ‘http://localhost:8001’, I get an error:

Kroki url is not valid. Requests to localhost are not allowed

I don’t have another convenient machine to run this server on, and I don’t want to use the public Kroki server. Does anyone know of a way to override this? ‘’ doesn’t work either (same error).

BTW, when I stupidly doubled the first colon (‘http:://localhost:8001’) I got a very unhelpful 500 error.

Use the public server’s DNS hostname/IP address instead of localhost. Note that it needs to be reachable from GitLab, you can limit the origin with firewall policies for example.

If you are planning with an additional server - I’d suggest putting the Kroki container behind a TLS secured environment, i.e. using Nginx proxy manager or other variants to generate TLS certificates with Lets Encrypt.

I tried using both the machine’s DNS hostname and the IP address of its Ethernet interface. These were also rejected with “Requests to localhost are not allowed”. … Oh, I found it. I needed to go to Settings > Network > Outbound requests and add ‘localhost’ to the whitelist.

This is a home-office, 1-developer situation at the moment; TLS would be overkill. I’ll set it up when I get funding :smile_cat: