{"id":9007,"date":"2023-11-20T10:01:12","date_gmt":"2023-11-20T10:01:12","guid":{"rendered":"https:\/\/truehost.com\/support\/?post_type=ht_kb&#038;p=9007"},"modified":"2024-10-18T06:15:15","modified_gmt":"2024-10-18T06:15:15","password":"","slug":"deploy-django-python-app-on-cloudpanel","status":"publish","type":"docs","link":"https:\/\/truehost.com\/support\/knowledge-base\/deploy-django-python-app-on-cloudpanel\/","title":{"rendered":"Deploy Django Python App on CloudPanel"},"content":{"rendered":"\n<p>In this guide, we will show you how you can deploy your Django Python application on your CloudPanel.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Create your site. Go to your CloudPanel dashboard and click <strong>Add Site<\/strong>.<\/h4>\n\n\n\n<ol class=\"wp-block-list\"><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large is-style-zoooom\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"96\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-20-1024x96.png\" alt=\"\" class=\"wp-image-9008\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-20-1024x96.png 1024w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-20-300x28.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-20-768x72.png 768w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-20-50x5.png 50w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-20-1536x143.png 1536w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-20-920x86.png 920w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-20-600x56.png 600w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-20-320x30.png 320w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-20.png 1918w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Click <strong>Create a Python Site<\/strong>.<\/h4>\n\n\n\n<figure class=\"wp-block-image size-large is-style-zoooom\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"148\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-21-1024x148.png\" alt=\"\" class=\"wp-image-9009\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-21-1024x148.png 1024w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-21-300x43.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-21-768x111.png 768w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-21-50x7.png 50w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-21-1536x223.png 1536w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-21-920x133.png 920w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-21-600x87.png 600w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-21-320x46.png 320w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-21.png 1918w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Add the domain. Other fields will be filled automatically. Then click <strong>Create<\/strong>. The Python site will be created.<\/h4>\n\n\n\n<figure class=\"wp-block-image size-large is-style-zoooom\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"285\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-22-1024x285.png\" alt=\"\" class=\"wp-image-9010\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-22-1024x285.png 1024w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-22-300x83.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-22-768x213.png 768w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-22-50x14.png 50w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-22-1536x427.png 1536w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-22-920x256.png 920w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-22-600x167.png 600w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-22-320x89.png 320w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-22.png 1918w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Next, we&#8217;ll install SSL certificate for your site. Click the <strong>SSL\/TLS<\/strong> tab, click Actions then click <strong>New Let&#8217;s Encrypt Certificate<\/strong>.<\/h4>\n\n\n\n<figure class=\"wp-block-image size-large is-style-zoooom\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"285\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-23-1024x285.png\" alt=\"\" class=\"wp-image-9011\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-23-1024x285.png 1024w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-23-300x83.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-23-768x213.png 768w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-23-50x14.png 50w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-23-1536x427.png 1536w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-23-920x256.png 920w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-23-600x167.png 600w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-23-320x89.png 320w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-23.png 1918w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Upload your files. You can upload through FileZilla or CloudPanel&#8217;s File Manager. Upload all your python files except<strong>\u00a0env<\/strong>\u00a0or\u00a0<strong>Venv<\/strong>\u00a0folder.<\/h4>\n\n\n\n<figure class=\"wp-block-image size-large is-style-zoooom\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"391\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-24-1024x391.png\" alt=\"\" class=\"wp-image-9012\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-24-1024x391.png 1024w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-24-300x114.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-24-768x293.png 768w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-24-50x19.png 50w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-24-1536x586.png 1536w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-24-920x351.png 920w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-24-600x229.png 600w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-24-320x122.png 320w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-24.png 1918w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Let&#8217;s install Django and create a virtual environment. Go to the Settings page and copy the Root Directory.<\/h4>\n\n\n\n<figure class=\"wp-block-image size-large is-style-zoooom\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"56\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-25-1024x56.png\" alt=\"\" class=\"wp-image-9013\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-25-1024x56.png 1024w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-25-300x16.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-25-768x42.png 768w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-25-50x3.png 50w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-25-1536x84.png 1536w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-25-920x50.png 920w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-25-600x33.png 600w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-25-320x18.png 320w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-25.png 1918w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h5 class=\"wp-block-heading\">Log in via SSH as root to your VPS. Access the root directory by typing the following command:<\/h5>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>cd \/home\/&lt;your-domain&gt;\/htdocs\/www.<strong>&lt;your-domain&gt;<\/strong>.com<\/strong><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Create a virtual environment:<\/h5>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>apt install -y python3.10-venv<\/strong> <strong>python3-pip<\/strong><br><strong><code>python3 -m venv env<\/code><\/strong><div class=\"open_grepper_editor\" title=\"Edit &amp; Save To Grepper\"><\/div><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Activate the virtual environment<\/h5>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>source env\/bin\/activate<\/strong><div class=\"open_grepper_editor\" title=\"Edit &amp; Save To Grepper\"><\/div><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">If your terminal has <strong>env,<\/strong> then your virtual environment is active.<\/h5>\n\n\n\n<h5 class=\"wp-block-heading\">Now install\u00a0<strong>requirements.txt<\/strong>\u00a0file:<\/h5>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>pip install -r requirements.txt<\/strong><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Now install\u00a0<strong>Django<\/strong>\u00a0and Gunicorn<\/h5>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>pip install django gunicorn psycopg2-binary<\/strong><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Migrate your database<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>python3 manage.py makemigrations\npython3 manage.py migrate<\/strong><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Next, let&#8217;s collect our static files. Ensure your STATIC_ROOT is set well. Then run the following command:<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>python3 manage.py collectstatic<\/strong><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Let&#8217;s allow access to our port through the firewall.<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>ufw allow 8090<\/strong><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">You can test your project by starting up the Django development server with this command:<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>python3 manage.py runserver 0.0.0.0:8090<\/strong><div class=\"open_grepper_editor\" title=\"Edit &amp; Save To Grepper\"><\/div><\/pre>\n\n\n\n<p>In your web browser, visit your domain name. If your site loads, then the setup was successful.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">We need to set up Gunicorn to as a more robust way to start or stop our site. First, deactivate from virtual environment and create a Gunicorn socket:<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>deactivate<\/strong>\n<strong>nano \/etc\/systemd\/system\/gunicorn.socket<\/strong><\/pre>\n\n\n\n<p>Copy\/paste this code there then save the file:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[Unit]\nDescription=gunicorn socket\n\n[Socket]\nListenStream=\/run\/gunicorn.sock\n\n[Install]\nWantedBy=sockets.target<\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Then create and open a systemd service file for Gunicorn<\/h5>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>nano \/etc\/systemd\/system\/gunicorn.service<\/strong><\/pre>\n\n\n\n<p>Copy\/paste this code there. Change the bold parts to match your application i.e user to your site user, directory to your root directory and wsgi application to directory where the wsgi file is found (exclude the root directory). Save the file.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[Unit]\nDescription=gunicorn daemon\nRequires=gunicorn.socket\nAfter=network.target\n\n[Service]\nUser=<strong>projectkeepwalking<\/strong>\nGroup=www-data\nWorkingDirectory=<strong>\/home\/projectkeepwalking\/htdocs\/www.projectkeepwalking.xyz<\/strong>\nExecStart=<strong>\/home\/projectkeepwalking\/htdocs\/www.projectkeepwalking.xyz\/<\/strong>env\/bin\/gunicorn \\\n          --access-logfile - \\\n          --workers 3 \\\n          --bind unix:\/run\/gunicorn.sock \\\n          <strong>django_project.<\/strong>wsgi:application\n\n[Install]\nWantedBy=multi-user.target<\/pre>\n\n\n\n<p>Let&#8217;s start and enable the Gunicorn socket. When a connection is made to that socket, systemd will automatically start the&nbsp;<code>gunicorn.service<\/code>&nbsp;to handle it:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>systemctl start gunicorn.socket\nsystemctl enable gunicorn.socket<\/strong><\/pre>\n\n\n\n<p>To check the status of the Gunicorn socket, type the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>systemctl status gunicorn.socket<\/strong><\/pre>\n\n\n\n<p>The status should be similar to this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Output<br>\u25cf gunicorn.socket - gunicorn socket<br>     Loaded: loaded (\/etc\/systemd\/system\/gunicorn.socket; enabled; vendor preset: enabled)<br>     Active: active (listening) since Mon 2023-11-20 09:34:12 UTC; 34s ago<br>   Triggers: \u25cf gunicorn.service<br>     Listen: \/run\/gunicorn.sock (Stream)<br>     CGroup: \/system.slice\/gunicorn.socket<br><br>Nov 20 09:34:12 vm-fa710939 systemd[1]: Listening on gunicorn socket.<div class=\"open_grepper_editor\" title=\"Edit &amp; Save To Grepper\"><\/div><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Go to the CloudPanel Site Settings, then click the Vhost tab.<\/h4>\n\n\n\n<figure class=\"wp-block-image size-large is-style-zoooom\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"341\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-26-1024x341.png\" alt=\"\" class=\"wp-image-9018\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-26-1024x341.png 1024w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-26-300x100.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-26-768x255.png 768w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-26-50x17.png 50w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-26-1536x511.png 1536w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-26-920x306.png 920w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-26-600x200.png 600w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-26-320x106.png 320w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-26.png 1918w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Replace the Vhost code with this one:<\/figcaption><\/figure>\n\n\n\n<pre class=\"wp-block-preformatted\">server {\n  listen 80;\n  listen [::]:80;\n  listen 443 ssl http2;\n  listen [::]:443 ssl http2;\n  {{ssl_certificate_key}}\n  {{ssl_certificate}}\n  <strong>server_name www.projectkeepwalking.xyz;<\/strong>\n  {{root}}\n\n  {{nginx_access_log}}\n  {{nginx_error_log}}\n\n  if ($scheme != \"https\") {\n    rewrite ^ https:\/\/$host$uri permanent;\n  }\n\n\n\n  location ~ \/.well-known {\n    auth_basic off;\n    allow all;\n  }\n\n location = \/favicon.ico { access_log off; log_not_found off; }\n    location \/static\/ {\n        <strong>root \/home\/projectkeepwalking\/htdocs\/www.projectkeepwalking.xyz\/blog;<\/strong>\n    }\n\n  {{settings}}\n\n  index index.html;\n\n location \/ {\n        include proxy_params;\n        proxy_pass http:\/\/unix:\/run\/gunicorn.sock;\n    }\n\n  #location ~* ^.+\\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|woff2|eot|mp4|ogg|ogv|webm|webp|zip|swf)$ {\n  #  add_header Access-Control-Allow-Origin \"*\";\n  #  expires max;\n  #  access_log on;\n  #}\n\n  if (-f $request_filename) {\n    break;\n  }\n}<\/pre>\n\n\n\n<p>Replace the server_name with your domain name and root with your root directory. Click the <strong>Save<\/strong> button.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">If there are no errors, go ahead and restart Nginx. Type this in the terminal:<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>systemctl restart nginx<\/strong>\n<strong>ufw delete allow 8090\nufw allow 'Nginx Full'<\/strong><\/pre>\n\n\n\n<p>Check the status of Nginx:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>systemctl status nginx<\/strong><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Done. Now you can refresh your domain your site will be up and running.<\/h5>\n","protected":false},"excerpt":{"rendered":"<p>In this guide, we will show you how you can deploy your Django Python application on your CloudPanel. Create your site. Go to your CloudPanel dashboard and click Add Site. Click Create a Python Site. Add the domain. Other fields will be filled automatically. Then click Create. The Python site will be created. Next, we&#8217;ll [&hellip;]<\/p>\n","protected":false},"author":25,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_eb_attr":"","_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"doc_category":[2132],"doc_tag":[],"class_list":["post-9007","docs","type-docs","status-publish","hentry","doc_category-cloudpanel"],"year_month":"2026-06","word_count":740,"total_views":"0","reactions":{"happy":"22","normal":"0","sad":"0"},"author_info":{"name":"Ian M","author_nicename":"ian","author_url":"https:\/\/truehost.com\/support\/author\/ian\/"},"doc_category_info":[{"term_name":"Cloudpanel","term_url":"https:\/\/truehost.com\/support\/docs-category\/cloudpanel\/"}],"doc_tag_info":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Deploy Django Python App on CloudPanel -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.truehost.com\/support\/knowledge-base\/deploy-django-python-app-on-cloudpanel\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Deploy Django Python App on CloudPanel -\" \/>\n<meta property=\"og:description\" content=\"In this guide, we will show you how you can deploy your Django Python application on your CloudPanel. Create your site. Go to your CloudPanel dashboard and click Add Site. Click Create a Python Site. Add the domain. Other fields will be filled automatically. Then click Create. The Python site will be created. Next, we&#8217;ll [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.truehost.com\/support\/knowledge-base\/deploy-django-python-app-on-cloudpanel\/\" \/>\n<meta property=\"article:modified_time\" content=\"2024-10-18T06:15:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-20-1024x96.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/knowledge-base\\\/deploy-django-python-app-on-cloudpanel\\\/\",\"url\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/knowledge-base\\\/deploy-django-python-app-on-cloudpanel\\\/\",\"name\":\"Deploy Django Python App on CloudPanel -\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/knowledge-base\\\/deploy-django-python-app-on-cloudpanel\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/knowledge-base\\\/deploy-django-python-app-on-cloudpanel\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/image-20-1024x96.png\",\"datePublished\":\"2023-11-20T10:01:12+00:00\",\"dateModified\":\"2024-10-18T06:15:15+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/knowledge-base\\\/deploy-django-python-app-on-cloudpanel\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.truehost.com\\\/support\\\/knowledge-base\\\/deploy-django-python-app-on-cloudpanel\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/knowledge-base\\\/deploy-django-python-app-on-cloudpanel\\\/#primaryimage\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/image-20-1024x96.png\",\"contentUrl\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/image-20-1024x96.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/knowledge-base\\\/deploy-django-python-app-on-cloudpanel\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/truehost.com\\\/support\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Deploy Django Python App on CloudPanel\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#website\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/\",\"name\":\"\",\"description\":\"Help In a Click\",\"publisher\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/truehost.com\\\/support\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#organization\",\"name\":\"Truehost Kenya\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/cropped-image_2026-04-16_174808866.png\",\"contentUrl\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/cropped-image_2026-04-16_174808866.png\",\"width\":240,\"height\":48,\"caption\":\"Truehost Kenya\"},\"image\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Deploy Django Python App on CloudPanel -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.truehost.com\/support\/knowledge-base\/deploy-django-python-app-on-cloudpanel\/","og_locale":"en_US","og_type":"article","og_title":"Deploy Django Python App on CloudPanel -","og_description":"In this guide, we will show you how you can deploy your Django Python application on your CloudPanel. Create your site. Go to your CloudPanel dashboard and click Add Site. Click Create a Python Site. Add the domain. Other fields will be filled automatically. Then click Create. The Python site will be created. Next, we&#8217;ll [&hellip;]","og_url":"https:\/\/www.truehost.com\/support\/knowledge-base\/deploy-django-python-app-on-cloudpanel\/","article_modified_time":"2024-10-18T06:15:15+00:00","og_image":[{"url":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-20-1024x96.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.truehost.com\/support\/knowledge-base\/deploy-django-python-app-on-cloudpanel\/","url":"https:\/\/www.truehost.com\/support\/knowledge-base\/deploy-django-python-app-on-cloudpanel\/","name":"Deploy Django Python App on CloudPanel -","isPartOf":{"@id":"https:\/\/truehost.com\/support\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.truehost.com\/support\/knowledge-base\/deploy-django-python-app-on-cloudpanel\/#primaryimage"},"image":{"@id":"https:\/\/www.truehost.com\/support\/knowledge-base\/deploy-django-python-app-on-cloudpanel\/#primaryimage"},"thumbnailUrl":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-20-1024x96.png","datePublished":"2023-11-20T10:01:12+00:00","dateModified":"2024-10-18T06:15:15+00:00","breadcrumb":{"@id":"https:\/\/www.truehost.com\/support\/knowledge-base\/deploy-django-python-app-on-cloudpanel\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.truehost.com\/support\/knowledge-base\/deploy-django-python-app-on-cloudpanel\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.truehost.com\/support\/knowledge-base\/deploy-django-python-app-on-cloudpanel\/#primaryimage","url":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-20-1024x96.png","contentUrl":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/11\/image-20-1024x96.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.truehost.com\/support\/knowledge-base\/deploy-django-python-app-on-cloudpanel\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/truehost.com\/support\/"},{"@type":"ListItem","position":2,"name":"Deploy Django Python App on CloudPanel"}]},{"@type":"WebSite","@id":"https:\/\/truehost.com\/support\/#website","url":"https:\/\/truehost.com\/support\/","name":"","description":"Help In a Click","publisher":{"@id":"https:\/\/truehost.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/truehost.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/truehost.com\/support\/#organization","name":"Truehost Kenya","url":"https:\/\/truehost.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/truehost.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2026\/04\/cropped-image_2026-04-16_174808866.png","contentUrl":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2026\/04\/cropped-image_2026-04-16_174808866.png","width":240,"height":48,"caption":"Truehost Kenya"},"image":{"@id":"https:\/\/truehost.com\/support\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs\/9007","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/users\/25"}],"replies":[{"embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/comments?post=9007"}],"version-history":[{"count":8,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs\/9007\/revisions"}],"predecessor-version":[{"id":15397,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs\/9007\/revisions\/15397"}],"wp:attachment":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/media?parent=9007"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/doc_category?post=9007"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/doc_tag?post=9007"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}