Skip to content
/ ipmon Public

Monitor your public IP and get notified when it changes

Notifications You must be signed in to change notification settings

psidex/ipmon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ipmon

ipmon is a CLI tool which can monitor a machines public IP by periodically requesting it from a web server on the internet, such as checkip.amazonaws.com. If an IP change is detected, it can send notifications via most services by using apprise.

Deploy Using Docker

docker run -d --name ipmon \
    --restart unless-stopped \
    -v $(pwd)/config.yaml:/config.yaml \
    psidex/ipmon:latest

Config

ipmon is configured using a config.yaml file, this should exist in the working directory, or the path can be provided as an arg, e.g. ipmon ./path/to/config.yaml.

If you're running the Docker image, mount your config file to /config.yaml inside the container. If you want access to the IP cache file, mount a file to /ipmon.cache.

Use the server key to set the IP web server, this can be any URL that returns a plaintext IPv4, IPv6 is unsupported.

The interval key is the number of seconds ipmon will wait between checking for an IP change.

If the notifications key is set, it should contain an array of objects, each with a title, body, and url. body can contain the string {{ip}} which will get replaced with the newly detected IP. These will be passed into apprise, which will need to be installed and in your PATH if you're using ipmon as a standalone binary (don't worry about this if you're using the Docker image).

Example config.yaml

server: "https://checkip.amazonaws.com/"
interval: 600
notifications:
  - title: "ipmon"
    body: "IP changed to {{ip}}"
    url: "twilio://abc:def@123/456"