openstatic.org

openstatic.org

RSS to Webhook

A Java 21+ service that polls RSS/Atom feeds and posts new entries as JSON to
webhook endpoints. An embedded Jetty server provides the configuration interface.

Screenshot

Run

./run.sh --password 'choose-a-password'
# Windows: run.cmd --password "choose-a-password"

Open http://127.0.0.1:28215/ and enter the supplied password on the sign-in
page. Use the tabs to add feed URLs and webhook URLs and set polling intervals;
+ Add feed inserts a new feed at the top of the list and focuses its URL field.
Feeds added through the interface are named from their RSS/Atom title when available;
changing a feed's URL replaces its name with the new feed's title (keeping the current
name if the new feed has none). Names can be edited afterwards, and a failed title
lookup does not prevent saving. Choose the feeds for each webhook by name (or URL for
unnamed feeds; hover a choice to see its URL). Feed icons appear beside each feed
name and these choices; the application's icon is shown until a feed's icon has
been imported.

The Settings button opens global settings. Public URL is the externally
reachable address of the admin page, including any reverse-proxy path (for example
https://openstatic.org/rsstowebhook/); Fetch from browser fills it in from the
current page address. When set, webhook payloads include an iconUrl for the
feed's cached icon, and cached icons under res/ can be fetched without signing in
so webhook receivers can display them. Edits remain in place when switching
tabs; Save configuration (at the bottom of the form or beside Settings at the
top of every tab) saves both lists. The Delivery status tab shows
fetch errors, known entry counts, and pending delivery failures.
The Imported entries tab lists saved entries (including the initial baseline)
newest first by publication date (or updated date, or import time for undated
entries), with feed filtering, pagination, and expandable JSON payloads. Select a configured
Test endpoint and use an entry's Test send button to send it immediately.
Disabled endpoints can be tested before enabling automatic delivery.
The Webhook logs tab lists every triggered webhook (automatic deliveries,
retries, and test sends), newest first, with the HTTP status or error, attempt
number, duration, and delivery ID. Filter by endpoint or show only failures.

OptionDefaultMeaning
-p, --port <port>28215Jetty HTTP port (1–65535)
-d, --config-dir <path>.rss-to-webhook/Directory for configuration, state, logs, and icons
--password <password>noneRequire this password on the admin sign-in page; protects the UI and API
--bind-address <address>127.0.0.1Listen address; non-loopback addresses require a password
-?, --helpShow usage

Without --config-dir, the directory is .rss-to-webhook/ inside the launch
directory. If it cannot be written there, the default is .rss-to-webhook/ in
the user's home directory. Startup prints the directory in use. It contains
rss-to-webhook.json (configuration), state.json (polling and delivery state),
log.json (webhook log), entries/ (one file per imported
entry), and res/ (feed icons).

On the first default-directory launch, an existing .rss-to-webhook.json and its
state/log sidecars are copied into the new directory without deleting the old
files. Existing new configuration is never overwritten. The old --config-file
option is no longer supported. For a previously customized file, copy it into
your chosen directory as rss-to-webhook.json, and copy its .state.json and
.log.json sidecars as state.json and log.json before
starting with --config-dir.

Jetty informational messages are hidden by default; warnings and errors remain
visible. When running the JAR, restore Jetty's informational logs for troubleshooting
with java -Dorg.slf4j.simpleLogger.log.org.eclipse.jetty=info -jar target/rss-to-webhook-1.0.jar.

Without a password, the interface is accessible only on localhost by default.
For remote access, use e.g. --bind-address 0.0.0.0 --password ..., and place Jetty
behind an HTTPS reverse proxy or access it over an SSH tunnel. Plain HTTP does
not encrypt the password or session cookie. Command-line passwords may be visible in
process listings. Only trusted administrators should have access: configured
feed/webhook URLs can reach services accessible to this machine.

Signing in creates an HttpOnly, SameSite=Strict session cookie (marked Secure
over HTTPS, including behind a proxy sending X-Forwarded-Proto: https). Sessions
expire after 12 hours of inactivity, end on Sign out, and are cleared when the
service restarts. After 5 failed attempts from one address within 5 minutes,
further sign-ins are refused with HTTP 429 until the window passes.

Reverse proxy under a subpath

The admin UI uses only relative URLs, so it can be mounted below any path. Include
the trailing slash in the proxy_pass URL so nginx strips the prefix, and forward
the original host and scheme so cross-origin protection works with HTTPS:

location = /rsstowh { return 301 /rsstowh/; }
location /rsstowh/ {
    proxy_pass http://127.0.0.1:28215/;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-Host $host;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

Open the UI as https://example.com/rsstowh/ (with the trailing slash).
Forwarded headers are honored, so keep Jetty bound to localhost or otherwise
reachable only through the proxy.

Configuration and delivery behavior

The configuration is created automatically, including parent directories, and
saved atomically by the web interface:

{
  "feeds": [
    {
      "url": "https://example.org/feed.xml",
      "name": "Example news",
      "intervalSeconds": 900,
      "enabled": true
    }
  ],
  "webhooks": [
    {
      "url": "https://example.org/webhook",
      "enabled": true,
      "feedUrls": ["https://example.org/feed.xml"]
    }
  ],
  "publicUrl": "https://openstatic.org/rsstowebhook/"
}

URLs must be absolute HTTP(S) URLs without embedded credentials or fragments.
publicUrl is optional, must not include a query string, and is saved with a
trailing /.
Intervals default to 15 minutes, with a 60-second minimum and 24-hour
maximum
. Omitted enabled fields default to true. Invalid configurations are
rejected without replacing the saved configuration. Manual file edits require a
restart; web interface changes are picked up automatically.

Feed names are optional and do not affect routing; URLs identify feeds. When
feedUrls is omitted, a webhook receives all enabled feeds, including feeds
added later, preserving the behavior of older configurations. An explicit array
selects only the listed configured feed URLs; an empty array selects none. Each
selected URL must be unique and match a configured feed. Renaming a feed keeps
its selections; changing its URL is treated as removing the old feed and adding
a new one.

  • The first successful scan of a feed records its current entries without
    sending them. Later unseen entries are sent; adding a webhook does not backfill.
  • Imported payloads are saved as entries/<id>.json and available after restart.
    They preserve the entry as first imported; later edits with the same ID do not
    replace the saved payload. Removing a feed also removes its imported history.
  • Manual test sends use the same JSON payload and report the receiver's HTTP
    result immediately, even when the feed is not selected for that endpoint.
    They do not modify deduplication or automatic delivery queues,
    and are not retried automatically. Each test has a fresh X-RSS-Delivery-ID
    prefixed with test- and an X-RSS-Test: true header.
  • RSS and Atom are normalized using ROME. GUID/Atom ID, then link, then a content
    fingerprint identifies entries. Edits with an unchanged ID do not trigger a new post.
  • Requests use a user agent, ETag/If-None-Match, and
    Last-Modified/If-Modified-Since. HTTP 304 avoids reprocessing unchanged feeds.
    HTTP 429/503 Retry-After is honored (up to 24 hours).
  • Requests have a 10-second connection timeout and 30-second total timeout.
    Feed responses are limited to 5 MiB; webhook responses to 64 KiB. XML DTDs and
    external entities are disabled. HTML content is preserved as strings, not rendered.
  • Feed icons are fetched in the background. The website named by the feed's
    channel link (and then the feed host's root page) is checked for icons declared
    by <link rel="icon">, apple-touch-icon, and msapplication-TileImage tags,
    including data: icons, and by its web app manifest. The smallest PNG/ICO icon of
    at least 128 pixels is preferred, then SVG icons, then smaller icons; maskable
    manifest icons are used only after regular ones. If none can be used, favicon.ico is tried alongside the feed URL,
    at the feed host's root, and at the website's root. At most 8 icon images are
    downloaded per lookup; only the first 512 KiB of a page (stopping after its
    <head>) and 256 KiB of a manifest are read.
  • The chosen ICO, PNG, or SVG (including gzip-compressed SVGZ) icon is converted to a
    128×128 PNG in res/; images are limited to 2 MiB. ICO bitmap frames support
    uncompressed and bitfield color formats. SVGs are drawn by a built-in renderer
    that supports paths, basic shapes, transforms, <use>/<symbol>, simple CSS
    class/ID/element selectors, solid colors, linear and radial gradients, strokes,
    opacity, and clip paths; text, embedded images, filters, masks, patterns, and
    dashes are ignored. Safari mask icons, JPEG, GIF, and WebP icons are skipped.
    PNG color profiles and compressed text metadata are discarded during conversion.
    Missing or invalid icons do not stop polling or delivery. Failed lookups are
    logged and retried after 24 hours; deleting a cached PNG allows it to be fetched
    again. Icon files are accessible only to authenticated administrators unless a
    public URL is set in global settings.
  • Entries are queued durably before sending. Each endpoint is retried
    independently on network errors or non-2xx responses, with exponential backoff
    from 30 seconds to one hour. Webhook redirects are not followed.
  • Delivery is at least once: a crash after a receiver accepts a POST but before
    state is saved can cause a duplicate. Receivers can deduplicate using the stable
    X-RSS-Delivery-ID header. A 2xx response acknowledges delivery.
  • Disabling a feed stops its polling and pauses its queued deliveries. Disabling an
    endpoint or deselecting a feed for it pauses the affected queued deliveries until
    re-enabled or reselected. Removing a feed/endpoint discards its pending deliveries;
    removing a feed also removes its baseline. Re-adding it starts a fresh baseline.
    Entries discovered while an endpoint is disabled or has not selected the feed
    are recorded, not backfilled when it is enabled or selected.
  • Polling and delivery share one background worker, with at most 20 delivery
    attempts per pass. Slow endpoints may delay scans; configured intervals are a
    minimum spacing, not a real-time schedule.

State is stored in state.json in the configuration directory, retaining
known entry fingerprints, conditional request headers, scheduled scans, and
pending deliveries across restarts. Imported entries are stored separately in
entries/, one <id>.json file per entry, where <id> is the entry's ID in the
Imported entries tab and API (a SHA-256 of the feed URL and the entry's own ID,
so identical entry IDs in different feeds do not collide). Each file contains id,
feedUrl, key (the entry's fingerprint in state.json), importedAt, and
payload. Removing a feed deletes its entry files; unreadable entry files are
skipped with a warning. Back up the configuration directory and run only one
instance per configuration. A corrupt state.json fails startup rather than
silently resetting state. Entry history and persistent failures are retained, so
the directory can grow over time.

Versions before state.json stored state, including all imported entries, in
rss-to-webhook.json.state.json. On startup that file is converted: entries are
written to entries/, the rest is saved as state.json, and the old file is
removed. The webhook log, previously rss-to-webhook.json.log.json, is renamed to
log.json.
The webhook log is kept separately in log.json (the
most recent 500 calls); an unreadable log is ignored at startup rather than blocking it.
Passwords are never written to either file.

Webhook payload

Each POST has Content-Type: application/json and represents one normalized entry:

{
  "feedUrl": "https://example.org/feed.xml",
  "feedTitle": "Example news",
  "id": "story-123",
  "title": "A new story",
  "link": "https://example.org/story-123",
  "author": "Alice",
  "publishedAt": "2026-01-01T12:00:00Z",
  "updatedAt": null,
  "summary": "<p>A short summary</p>",
  "content": [{"type": "text/html", "value": "<p>Full story</p>"}],
  "categories": ["news"],
  "iconUrl": "https://openstatic.org/rsstowebhook/res/1ce44b4dc89ed392c872acc9a61ed843a9fe21a40363e3a1cb4b6bc9b14a2a33.png"
}

iconUrl is present only when a public URL is configured and the feed's icon has
been imported; it is added when each request is sent, so it reflects the current
setting. Missing scalar fields are null; content/categories are arrays. Dates are UTC
ISO-8601 strings. This is an entry-oriented RSS/Atom normalization, not a
lossless conversion of every vendor-specific XML extension.

Scripts can authenticate with POST /login and {"password":"..."}, then send the
returned rsswh_session cookie; POST /logout ends the session. The authenticated
API supports:

  • GET /api/config and PUT /api/config to read/save configuration. A saved
    configuration without publicUrl keeps the current public URL.
  • GET /api/settings and PUT /api/settings with {"publicUrl":"https://..."}
    to read/save global settings; an empty string clears the public URL.
  • POST /api/feed-title with {"url":"<feed URL>"} to look up a feed's title
    without adding it. It returns {"title":"..."} (an empty string if no title);
    fetch or parse failures return HTTP 502. The same feed timeout, size limit, and
    XML protections apply as for polling.
  • GET /api/status for polling/delivery status; feedIcons maps feed URLs to
    relative resource paths for cached icons.
  • GET /api/entries?offset=0&limit=20&feedUrl=... for imported entries. The optional
    feedUrl filter is an exact match; limit defaults to 50 and is capped at 100.
    Entries are ordered newest first by publishedAt, then updatedAt, then import time.
    Responses contain entries, total, offset, and limit; each entry contains
    its browser id, feedUrl, importedAt (epoch milliseconds), and payload.
  • POST /api/test-send with {"entryId":"<browser id>","webhookUrl":"<configured URL>"}
    for an immediate test delivery. Success returns the receiver's statusCode and
    the test deliveryId; receiver/network failures return HTTP 502 with an error.
  • GET /api/deliveries?offset=0&limit=25&webhookUrl=...&failed=true for the webhook
    log, newest first (limit capped at 100). Each item has at (epoch milliseconds),
    webhookUrl, feedUrl, title, link, success, statusCode (when a response
    was received), error, attempt, durationMs, deliveryId, and test.

Write requests require Content-Type: application/json. Cross-origin write
requests are rejected. Older state files without payload history are upgraded
by importing entries still present in the next successful feed scan, without
replaying already-seen entries.

Build and test

mvn test
# Portable executable JAR, without platform-specific native installers:
mvn package -P '!linux-build,!windows-build,!mac-build'
java -jar target/rss-to-webhook-1.0.jar

mvn package retains the project's platform-specific GraalVM native image and
installer builds, requiring their native toolchains. On Linux it produces
target/rss-to-webhook-<version>-native-<arch>.deb, where <arch> is the build
machine's Debian architecture (for example amd64 or arm64). Source launchers
(run.sh and run.cmd) compile and run without building the native installers.

Native builds do not download the shared GraalVM reachability metadata repository.
Metadata for third-party libraries (Jetty, Jackson, SLF4J, Commons CLI, and Jakarta
APIs) is vendored under src/main/resources/META-INF/native-image/<group>/<artifact>/,
copied from repository version 1.0.20 (CC0). When upgrading one of these libraries,
refresh its file from the
GraalVM reachability metadata repository.

PNG decoding uses PNGJ under the
Apache License 2.0.

Some Text
If you are feeling generous and would like to support this project


Downloads

Latest Update: November 29 2026 02:09:49 PM EST

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.