Back

Specify wildcard for IP address in docker-compose.override.yml

  • 0
  • Self Hosted
  • General
kathelia.dokgu
21 Sep, 2023, 01:33

On my self-hosted Appwrite that is behind Nginx Proxy Manager (NPM), I have a line that says accept headers from trusted IP address (NPM IP address):

TypeScript
...
    --entrypoints.appwrite_web.forwardedHeaders.trustedIPs=172.22.0.2
    --entrypoints.appwrite_websecure.forwardedHeaders.trustedIPs=172.22.0.2
...

This IP however changes when I restart my server. Is it possible to just specify a wildcard instead? Let's say --entrypoints.appwrite_websecure.forwardedHeaders.trustedIPs=172.22.0.*

TL;DR
You cannot specify a wildcard for the IP address in the `docker-compose.override.yml` file. However, there are alternative solutions. Instead of specifying a specific IP address, you can use subnet masks or trust all IPs. For example, you can use `--entrypoints.appwrite_web.forwardedHeaders.trustedIPs=172.22.0.0/24` to allow any IP address within the `172.22.0` subnet. Alternatively, you can trust all IP addresses by using `--entrypoints.appwrite_web.forwardedHeaders.trustedIPs=0.0.0.0/0`. This allows
Drake
21 Sep, 2023, 02:49

This isn't really an Appwrite thing; it's a traefik thing.

That said, you can use subnet masks or trust all IPs

kathelia.dokgu
21 Sep, 2023, 03:09

Thanks!

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more