DEV Community

Cover image for How to use uWSGI Avahi plugin in Ubuntu
Paolo Melchiorre
Paolo Melchiorre

Posted on • Edited on • Originally published at paulox.net

3 1

How to use uWSGI Avahi plugin in Ubuntu

Step-by-step how-to to use uWSGI Avahi plugin for GNU/Linux (tested on Ubuntu 17.04).

The Avahi uWSGI plugin (github.com/20tab/uwsgi-avahi) allows your instances to register services in your mDNS system.

$ sudo apt-get install uwsgi uwsgi-src libavahi-client-dev
$ cd ~
$ PYTHON=python3.6 uwsgi --build-plugin https://github.com/20tab/uwsgi-avahi
$ sudo mv avahi_plugin.so /usr/lib/uwsgi/plugins/avahi_plugin.so
$ sudo chmod 644 /usr/lib/uwsgi/plugins/avahi_plugin.so
Enter fullscreen mode Exit fullscreen mode

Configuring your .ini file like:

[uwsgi]
...
project_name = paulox
socket = 127.0.0.1:0
subscribe-to = 127.0.0.1:5005:%(project_name).local
plugins = avahi
avahi-register = %(project_name).local
Enter fullscreen mode Exit fullscreen mode

After starting your emperor you can view some similar messages on your log:

...
Avahi Server Version: avahi 0.6.32
[uwsgi-avahi] registered record paulox.local CNAME ubuntu.local
...
Enter fullscreen mode Exit fullscreen mode

Originally published on: www.paulox.net

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay