doc | ||
src | ||
.gitignore | ||
CMakeLists.txt | ||
LICENSE | ||
README.md |
libravatarserv is a simple libravatar server. It is intended as a CGI program.
Libravatar is a free service and an open specification for hosting profile images tied to email or OpenID addresses.
Features
- Avatar delivery based on email addresses
- Default avatar for unknown addresses
- MD5 hashes
- SHA256 hashes
- Variable image size (
s
)
Not supported
- Avatar delivery based on OpenID
- Default URL for missing images (
d
)
Usage
Install nginx and fcgiwrap, copy the example config to the nginx configuration directory and edit it according to your needs. Other webservers and cgi spawners will also work, of course.
Add the following DNS records to your nameserver:
_avatars._tcp.example.com. IN SRV 0 0 80 avatars.example.com
_avatars-sec._tcp.example.com. IN SRV 0 0 443 avatars.example.com
_avatars._tcp.example.com
is for HTTP, _avatars-sec._tcp.example.com
is for
HTTPS.
libravatarserv looks in each of ${XDG_DATA_DIRS}
for a directory named
libravatarserv
. You can force a different directory by setting the environment
variable ${AVATAR_DIR}
.
The image files are named like your email address, no file extension. If you
want to deliver a default image for unknown email addresses, name it default
.
Test your setup on https://www.libravatar.org/tools/check/.
Example
A directory could look like this:
/usr/share/libravatarserv
├── [ 32K] default
├── [ 759] user@example.com
└── [ 16] user+newsletter@example.com -> user@example.com
Install
Dependencies
- C++ compiler (tested: gcc 7, clang 6)
- cmake (at least 3.2)
- crypto++ (tested: 7.0)
- imagemagick (tested: 7.0)
- libxdg-basedir (tested: 1.2)
Compile
mkdir build
cd build
cmake ..
make
make install
Contributing
Contributions are always welcome. You can submit them as pull requests or via
email to tastytea
@tastytea.de
.
Contact
License & Copyright
Copyright © 2018 tastytea <tastytea@tastytea.de>.
License GPLv3: GNU GPL version 3 <https://www.gnu.org/licenses/gpl-3.0.html>.
This program comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistribute it under certain conditions.