Error Throttled - Mastodon


Dear All,

I am facing the issue ( error: “Throttled” ), Our instance is already setup on docker and running for more than 6 months.

We are having an NGINX reverse proxy running in front of mastodon. Due to which the mastodon will always see request coming from same IP (Nginx reverse proxy). Also my SSL certificate gets terminated at reverse proxy.

To add “TRUSTED_PROXY_IP=true” parameter now, i will have to recreate the container again, I want to avoid this. Is there way around using which i can set this parameter in already running container ??


Hello, the TRUSTED_PROXY_IP variable does not take a true/false value, but rather a single or multiple comma-separated IP addresses that are to be trusted, for example, the IP your nginx reverse proxy appears as to the process inside Docker.

Variables cannot be changed in a running container, the container must be re-created. Docker containers are ephermal, it re-creating is not much different to restarting, especially for the “web” container which stores no data on its own. But just to be sure, why do you fear recreating the container? Any specific reasons?


Yes thanks, after reading git issues and trying out, I figured out that IP address need’s to be passed in TRUSTED_PROXY_IP variable.

But as .env file is passed in web, streaming and sidekiq those container’s will get recreated and also as nginx container depends on these 3 container, even that will get re-created.

Setting up Nginx container again is tricky, so i was trying to figure out if there is any other way round to add the parameter without re-creating container.

And also i want to avoid downtime of the mastodon instance.


I’m assuming you created the containers manually via docker run. Have you considered pinning down the configuration using docker-compose? It would allow you to define their parameters and how they are linked to each other, and where the volumes are mapped in a docker-compose.yml file, and let docker-compose up -d take care of the rest.


I am using docker-compose, i tried doing docker-compose up after changing .env file on local instance and it recreated all the containers except (postgres and redis).