this post was submitted on 28 Oct 2025
3 points (100.0% liked)

Lemmy Support

4983 readers
40 users here now

Support / questions about Lemmy.

Matrix Space: #lemmy-space

founded 6 years ago
MODERATORS
 

Hello everyone,

I'm encountering an issue when trying to post from my Mastodon instance to my Lemmy instance. Both are running on separate virtual servers managed by Proxmox, and they communicate through a single reverse proxy.

Here is the relevant error log from the Lemmy web container:

2025-10-28T22:06:10.751716Z  WARN Error encountered while processing the incoming HTTP request: lemmy_server::root_span_builder: Unknown: URL failed verification: Localhost is only allowed in debug mode
2025-10-28T22:06:10.751717Z  TRACE tokio_postgres::connection: poll_flush: flushed    
2025-10-28T22:06:10.751766Z  INFO actix_web::middleware::logger: 192.168.100.12 'POST /inbox HTTP/1.1' 400 96 '-' 'Mastodon/4.4.8 (http.rb/5.3.1; +https://rollenspiel.social/)' 0.001290  

The key warning is:

URL failed verification: Localhost is only allowed in debug mode

It seems Lemmy is rejecting the request because it detects a localhost URL somewhere in the request or configuration, which is only permitted in debug mode.

Has anyone seen this error before or knows how to configure Lemmy or the reverse proxy to avoid this "localhost" URL verification failure? Any pointers on what to check or how to debug this further would be appreciated.

Thanks in advance!

you are viewing a single comment's thread
view the rest of the comments
[–] Tealk@rollenspiel.forum 1 points 1 week ago

I've tried a few things now, hardcoded proxy headers:

  proxy_set_header X-Real-IP $custom_real_ip;
  proxy_set_header X-Forwarded-For $custom_forwarded_for;

setting the IP for the domain in the container:

    extra_hosts:
      - "rollenspiel.forum:142.132.206.141"

setting the DNS server in the container:

    dns:
      - 8.8.8.8

it doesn't change the error message, I don't know what Lemmy checks to determine that it's a local IP, because all standard tools show me the public IP for rollenspiel.forum.