# \*\*\*Script\*\*\*A working \`uwsgi conf\` for a django app in Cloudpanel

**URL:** <https://forum.hhf.technology/t/script-a-working-uwsgi-conf-for-a-django-app-in-cloudpanel/149>\
**Category:** Resources\
**Tags:** uwsgi, django, cloudpanel\
**Created:** [October 10, 2024, 8:48am UTC](https://forum.hhf.technology/t/script-a-working-uwsgi-conf-for-a-django-app-in-cloudpanel/149 "2024-10-10T08:48:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hhf.technoloy](https://forum.hhf.technology/user_avatar/forum.hhf.technology/hhf.technoloy/32/68_2.png) [@hhf.technoloy](https://forum.hhf.technology/u/hhf.technoloy)\
**Post date:** [October 10, 2024, 8:48am UTC](https://forum.hhf.technology/t/script-a-working-uwsgi-conf-for-a-django-app-in-cloudpanel/149/1 "2024-10-10T08:48:24Z")

</div>

```ini
[uwsgi]
plugins = python3

master = true
protocol = uwsgi
socket = 127.0.0.1:8090
chdir = /home/<user>/htdocs/<TLD>/
module = <user>.wsgi:application
# In case you're using virtualenv uncomment this:
; virtualenv = /home/<user>/.local/share/virtualenvs/<VENV>/
; callable = application

# Needed for OAuth/OpenID
buffer-size = 8192

# Reload when consuming too much of memory
reload-on-rss = 250

# Increase number of workers for heavily loaded sites
workers = 4

# Enable threads for Sentry error submission
enable-threads = true

# Child processes do not need file descriptors
close-on-exec = true

# Avoid default 0000 umask
umask = 0022

# Run as weblate user
uid = <user>
gid = <user>

# Enable harakiri mode (kill requests after some time)
# harakiri = 3600
# harakiri-verbose = true

# Enable uWSGI stats server
# stats = :1717
# stats-http = true

# Do not log some errors caused by client disconnects
ignore-sigpipe = true
ignore-write-errors = true
disable-write-exception = true

```
