⚠️ PROJECT STATUS: MAINTENANCE MODE
uWSGI is in maintenance mode (announced 2024). The project receives only bugfixes and updates for new language APIs. Maintainer response times on GitHub issues/PRs are slow.
uWSGI is an application server (not a web server) that runs Python web applications. It is typically deployed behind a reverse proxy like Nginx or Apache.
| Method | Status | Recommendation |
|---|---|---|
| pip | ✅ Recommended | Latest version, cross-platform |
| Debian/Ubuntu package | ✅ Available | Good for system integration |
| RHEL/EPEL package | ✅ EPEL 9 | Version 2.0.31 |
| Docker | ⚠️ Community only | No official image, tiangolo deprecated |
# Debian/Ubuntu
sudo apt update
sudo apt install python3-dev python3-venv build-essential
# RHEL/CentOS
sudo dnf install python3-devel python3-pip gcc make
python3 -m venv /opt/myapp/venv
source /opt/myapp/venv/bin/activate
pip install uwsgi
uwsgi --version
# Output: uWSGI 2.0.31
sudo apt update
sudo apt install uwsgi uwsgi-plugin-python3
/etc/uwsgi//etc/uwsgi/apps-available//etc/uwsgi/apps-enabled/# Enable EPEL repository
sudo dnf install epel-release
# Install uWSGI
sudo dnf install uwsgi uwsgi-plugin-python3
⚠️ Note: EPEL 10 repository status for uWSGI is unclear. Use pip install for RHEL 10.
# If EPEL 10 has uWSGI
sudo dnf install uwsgi uwsgi-plugin-python3
# Otherwise, use pip
pip install uwsgi
# /etc/uwsgi/myapp.ini
[uwsgi]
module = myapp:app
master = true
processes = 4
socket = 127.0.0.1:8000
chmod-socket = 660
vacuum = true
die-on-term = true
pidfile = /var/run/uwsgi/myapp.pid
logto = /var/log/uwsgi/myapp.log
sudo mkdir -p /var/run/uwsgi
sudo mkdir -p /var/log/uwsgi
sudo chown -R www-data:www-data /var/run/uwsgi /var/log/uwsgi
# /etc/systemd/system/uwsgi.service
[Unit]
Description=uWSGI Emperor
After=network.target
[Service]
Type=notify
User=www-data
Group=www-data
WorkingDirectory=/var/www/myapp
ExecStart=/usr/local/bin/uwsgi --ini /etc/uwsgi/myapp.ini
Restart=on-failure
KillSignal=SIGQUIT
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable uwsgi
sudo systemctl start uwsgi
sudo systemctl status uwsgi
server {
listen 80;
server_name example.com;
location / {
include uwsgi_params;
uwsgi_pass 127.0.0.1:8000;
uwsgi_param Host $host;
uwsgi_param X-Real-IP $remote_addr;
uwsgi_param X-Forwarded-For $proxy_add_x_forwarded_for;
uwsgi_param X-Forwarded-Proto $scheme;
}
}
<VirtualHost *:80>
ServerName example.com
location / {
Include uwsgi_params;
uwsgi_pass 127.0.0.1:8000;
}
</VirtualHost>
sudo systemctl status uwsgi
sudo journalctl -u uwsgi -f
# or
tail -f /var/log/uwsgi/myapp.log
curl -I http://127.0.0.1:8000
⚠️ No Official Docker Image
- tiangolo/uwsgi-nginx is DEPRECATED (maintainer recommends Gunicorn)
- No official uWSGI Docker image exists
- Build custom Dockerfile or use community images
See uWSGI Docker Setup for containerized deployment.
See uWSGI Ansible Setup for automated deployment.
# Check logs
sudo journalctl -u uwsgi -n 50
# Test configuration
uwsgi --ini /etc/uwsgi/myapp.ini
# Check socket permissions
ls -la /var/run/uwsgi/
# Fix ownership
sudo chown www-data:www-data /var/run/uwsgi/
# Ensure virtual environment is activated
# Check module path in configuration
# Verify app is importable: python -c "import myapp"
⚠️ Maintenance Mode Warning
Security patches may be slower due to maintenance mode status.
See uWSGI Security and uWSGI Hardening for security guidance.
See uWSGI Configuration for configuration details.
Stuck on a step or need custom configuration? We provide paid consulting for uWSGI deployments, from single-instance setups to distributed clusters.
📧 office@linux-server-admin.com
🌐 Contact Page