1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
# Every key is optional; the values below are the defaults unless marked otherwise.
# Any key can be overridden with an environment variable:
# FAVICONS_<SECTION>__<KEY>, e.g. FAVICONS_CACHE__STORAGE=s3://bucket/icons
[]
= "0.0.0.0:8080"
# admin_listen = "127.0.0.1:9090" # /metrics and /healthz; keep private
= 4096
= 512
= 5000
= 5000
= 10000
# worker_threads = 2 # async runtime threads; default is one per CPU. Lower it on a box shared with other services
= true # serve the demo page at / (only in builds with the "site" feature, e.g. the favicons.page image)
# public_url = "https://favicons.example.com" # name and canonical URLs on the page; defaults to tls.domains[0], then the Host header
[]
# peer | x-forwarded-for | x-real-ip | cf-connecting-ip
# Only change this when a trusted reverse proxy sets the header.
= "peer"
= 1 # for x-forwarded-for: how many proxies append to the header
= 24 # clients are grouped by subnet for limits and fairness
= 56
[]
= 50.0 # per subnet; 0 disables
= 400.0
= 0.05 # share of a token a cached icon costs; a miss pays the full token
= 100000
[]
= 8
= 10000
= 64
= 1500 # how long a cache miss may wait for the fetch
= 3000
= 8000
= 2000
= 25000
= 131072 # stream stops at </head> or <body>, or at this cap
= 65536
= 1048576
= 4
= 6
# Every URL the service connects to (pages, manifests, icons, redirect hops,
# upstream providers, blocklists, RDAP, the catalog) must pass these three.
# Startup fails if a configured URL doesn't.
= false # plain http:// at all
= [443] # e.g. [80, 443] together with allow_http = true
= false # links or redirects to https://203.0.113.7/; public addresses only even when true
[]
# process each image is decoded in a fresh seccomp-confined child process (default)
# socket send images to `favicons render-server` (e.g. a container with no network)
# off decode in-process (not recommended)
= "process"
= "/run/favicons/render.sock"
= 268435456
# Largest source bitmap used for tracing; larger ones are downscaled first.
# Tracing itself runs on a 512 px resample with a palette of up to 12 colours.
= 256
= 49152
# Max mean difference between a site's SVG and our sanitized copy before tracing instead.
= 0.02
= 2
= 5000
= 1024
= 33554432
= 262144
= 48
= true
[]
# none memory only (lost on restart)
# /var/cache/favicons local directory (also file:///var/cache/favicons)
# s3://bucket/prefix S3 or any S3-compatible store (MinIO, R2, Ceph, …)
# gs://bucket/prefix Google Cloud Storage
# az://container/prefix Azure Blob Storage
= "none"
= 604800 # real icons are refreshed after 7 days
= 86400
= 3600
= 86400
= 86400 # domains sinkholed by the filtering DNS resolver
= 67108864 # hot in-memory image cache
= 100000
= 600
= 60
= 2000
# Caps for a local directory, counted as allocated disk space (a 2 KB icon takes
# a 4 KB block). Over a cap, the least recently used domains are deleted until
# usage is back under 90% of it. 0 means no cap. Object storage: use lifecycle rules.
= 0 # e.g. 5_000_000_000
= 0 # domains
# Passed straight to object_store; see its docs for all keys.
[]
# aws_region = "eu-central-1"
# aws_endpoint = "https://s3.eu-central-1.amazonaws.com"
# aws_access_key_id = "…" # prefer FAVICONS_CACHE__OPTIONS__AWS_ACCESS_KEY_ID
# aws_secret_access_key = "…"
[]
# gzip: stored icons are kept gzipped on disk and in memory and sent as is to
# clients that accept gzip (every browser and CDN); others get them unpacked.
# Generated fallbacks are never compressed. off: everything is stored and sent raw.
= "gzip"
# Each profile sets the browser Cache-Control and the CDN-Cache-Control (RFC 9213).
[]
= "public, max-age=604800, stale-while-revalidate=86400"
= "public, max-age=2592000, stale-while-revalidate=604800, stale-if-error=604800"
[] # 301 from non-canonical URLs to /{style}/{domain}
= "public, max-age=2592000, immutable"
= "public, max-age=31536000, immutable"
[] # queued, overloaded, fetch-failed; keep short so a flood is not cached
= "public, max-age=10"
= "public, max-age=10"
[] # not-found, blocklisted, domain-too-new, invalid-domain
= "public, max-age=86400"
= "public, max-age=86400, stale-if-error=86400"
[]
= "no-store"
= "no-store"
[]
= true
= ["onion", "arpa", "i2p"]
# Local paths or URLs; hosts, adblock (||domain^) and plain-domain formats.
= []
= []
= 21600
= 67108864
# Also applied to every foreign host an icon, manifest or redirect points to. 0 disables.
= 30
= "allow" # allow | block when RDAP has no answer
= "https://data.iana.org/rdap/dns.json"
[]
# cloudflare-security 1.1.1.2 / 1.0.0.2, Cloudflare with malware blocking (default)
# quad9 9.9.9.9, malware blocking as well
# cloudflare | google no filtering
# system OS resolver config (plain DNS)
# custom your own servers below
= "cloudflare-security"
= "https" # https (DoH, port 443) | tls (DoT, port 853) | udp
# servers = ["194.242.2.2"] # for provider = "custom"
# server_name = "dns.mullvad.net"
= "/dns-query"
= 8192
= 3600
[]
# Look up the domain's BIMI record (default._bimi.<domain> TXT, over the DoH
# resolver above) and use the logo the owner publishes for mail clients. It is
# tried before anything else and goes through the usual checks and sanitizer.
= true
[]
# Curated brand SVGs from theSVG (https://github.com/GLINCKER/thesvg). The index
# is re-downloaded every reload_secs; icons are fetched lazily, one at a time.
# A domain matches only when the entry's url points at that site's root.
= false
= "https://raw.githubusercontent.com/GLINCKER/thesvg/main/src/data/icons.json"
= "https://raw.githubusercontent.com/GLINCKER/thesvg/main/public/"
# Licenses are per icon in theSVG. CC0 needs no attribution. Adding "MIT" or
# "Apache-2.0" also requires you to credit the authors where you show the icons.
= ["CC0-1.0"] # e.g. ["CC0-1.0", "Unlicense", "MIT", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause", "CC-BY-4.0", "CC-BY-3.0"]
= ["brands"]
= 86400
= 16777216
# Optional icon catalogs addressed by slug instead of domain:
# GET /color/{id}/{slug}. Icons go through the same checks, sanitizer, palettes
# and caches as domains; an unknown slug is a 404 and never reaches the network.
# /catalogs.json and /catalogs/{id}.json list them. Formats: selfhst,
# simple-icons (tinted with each brand's colour), dashboard-icons, devicon,
# thesvg (licensed per icon; `licenses` keeps only the ones listed) and iconify
# (any Iconify JSON set, with an optional `mono_index_url`). Iconify catalogs
# are prerendered: with a cache storage configured, every icon goes through the
# usual pipeline into the cache in the background, then the source SVGs leave
# memory; unchanged icons are skipped on the next reload and prerendered entries
# are never evicted. `prerender = false` keeps the sources in memory and renders
# on first request instead. `license`
# is sent as X-Icon-License unless the index has one per icon.
# [[catalogs]]
# id = "selfhst"
# name = "selfh.st icons"
# format = "selfhst"
# index_url = "https://cdn.jsdelivr.net/gh/selfhst/icons@main/index.json"
# base_url = "https://cdn.jsdelivr.net/gh/selfhst/icons@main/"
# license = "CC-BY-4.0"
# attribution = "https://selfh.st/icons/"
#
# [[catalogs]] # Iconify JSON: SVGs come straight from the index
# id = "fluent-emoji"
# name = "Fluent Emoji"
# format = "iconify"
# index_url = "https://cdn.jsdelivr.net/npm/@iconify-json/fluent-emoji-flat/icons.json"
# mono_index_url = "https://cdn.jsdelivr.net/npm/@iconify-json/fluent-emoji-high-contrast/icons.json"
# base_url = "https://cdn.jsdelivr.net/npm/@iconify-json/fluent-emoji-flat/"
# license = "MIT"
# attribution = "https://github.com/microsoft/fluentui-emoji"
#
# [[catalogs]]
# id = "simple-icons"
# name = "Simple Icons"
# format = "simple-icons"
# index_url = "https://cdn.jsdelivr.net/npm/simple-icons@16/data/simple-icons.json"
# base_url = "https://cdn.jsdelivr.net/npm/simple-icons@16/"
# license = "CC0-1.0"
# attribution = "https://simpleicons.org"
#
# [[catalogs]]
# id = "dashboard-icons"
# name = "Dashboard Icons"
# format = "dashboard-icons"
# index_url = "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons@main/metadata.json"
# base_url = "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons@main/"
# license = "Apache-2.0"
# attribution = "https://github.com/homarr-labs/dashboard-icons"
#
# [[catalogs]]
# id = "devicon"
# name = "Devicon"
# format = "devicon"
# index_url = "https://cdn.jsdelivr.net/gh/devicons/devicon@master/devicon.json"
# base_url = "https://cdn.jsdelivr.net/gh/devicons/devicon@master/"
# license = "MIT"
# attribution = "https://devicon.dev"
#
# [[catalogs]]
# id = "thesvg"
# name = "theSVG"
# format = "thesvg"
# index_url = "https://raw.githubusercontent.com/GLINCKER/thesvg/main/src/data/icons.json"
# base_url = "https://raw.githubusercontent.com/GLINCKER/thesvg/main/public/"
# license = "per icon"
# licenses = ["CC0-1.0", "Unlicense", "MIT", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause", "CC-BY-4.0", "CC-BY-3.0"]
# attribution = "https://github.com/GLINCKER/thesvg"
[]
# Optional third-party sources, tried in order only when the site itself has no
# usable icon or cannot be reached. {domain} is replaced by the registrable
# domain. Each URL must be https and passes the same checks as any foreign host
# (SSRF rules, blocklists, domain age, DNS filter, every redirect hop). The image
# is traced into our own SVG in the sandbox; responses are never passed through.
# Once a day each provider is asked about a domain that does not exist; an
# answer identical to that placeholder is skipped.
#
# Privacy: the domain is sent to that service. Disabled by default.
#
# EXAMPLES ONLY. These are third-party services with their own terms of use,
# which may not allow this kind of access. Check their terms before enabling
# one, or point this at a service you run yourself.
= []
# providers = [
# "https://favicon.vemetric.com/{domain}?size=256&format=webp",
# "https://icons.duckduckgo.com/ip3/{domain}.ico",
# "https://www.google.com/s2/favicons?domain={domain}&sz=64",
# ]
[]
# Change to make generated icons unique to your deployment.
= ""
[]
# Serve HTTPS directly, with certificates from Let's Encrypt (ACME http-01).
# The plain listener in [server] keeps working; point it at localhost if
# everything should go through HTTPS.
= false
= "[::]:443"
= "[::]:80" # answers ACME challenges, redirects the rest to https://domains[0]
= [] # e.g. ["favicon.example.com"]
= [] # e.g. ["mailto:ops@example.com"]
= "https://acme-v02.api.letsencrypt.org/directory"
# directory = "https://acme-staging-v02.api.letsencrypt.org/directory" # for testing
# directory_ca = "/etc/favicons/acme-root.pem" # trust a private ACME server, e.g. Pebble
= "/var/lib/favicons/acme" # account, key and certificate; keep it across restarts
= 30
# cert = "/etc/favicons/origin.pem" # use a fixed certificate (e.g. Cloudflare Origin CA) instead of ACME
# key = "/etc/favicons/origin.key"