A very simple endpoint to get your public IP address. Powered by Caddy
https://ip.kytta.dev
| .editorconfig | ||
| ip.caddyfile | ||
| LICENSE | ||
| README.md | ||
kytta/ip
A very simple endpoint to get your public IP address. It's so simple, it runs in your reverse proxy!
Usage
Just send a GET request to ip.kytta.dev using your
tool of choice (examples below). In response, you'll get the IP address as
text/plain.
cURL
curl ip.kytta.dev
wget
wget -qO- ip.kytta.dev
HTTPie
http ip.kytta.dev
Deploy
-
Download ip.caddyfile and place it in
/etc/caddy/(or anywhere else where Caddy can read it) -
Import the file in your main Caddyfile:
import "ip.caddyfile" -
Import the
ipsnippet in your site block:https://ip.example.com, http://ip.example.com { import ip }Note: You should include both http and https to disable auto redirect. This makes it more accessible for tools like cURL that don't follow redirects and use
http://by default.
Licence
AGPL-3.0-only © 2025 Nikita Karamov