Use Custom Icons for localhost?

Is it possible to use custom icons for self-hosted websites such as localhost

You may try the solution listed here otherwise I would recommend adding your vote for this feature request upstream

For Vaultwarden you could add a custom file in the icon cache folder.
It should be localhost.png

You can also add more and abuse the URI’s to show a different icon.
For example special-localhost.png, then you need to add special-localhost as the first URI, and configure the host to never be used for matching.

Then the second URI will be the one to match.

where can i find the folder? I use docker and portainer. In Portainer the vaultwarden container

It should be in the data folder you configured. It could be a volume. If that is the case, then i suggest to search the internet on how to manipulate those.