BigCloudy KnowledgeBase BigCloudy KnowledgeBase
  • Cloud Hosting
    • cPanel Hosting
    • Laravel Hosting
    • Node.js Hosting
    • Magento Hosting
    • Django Hosting
    • Reseller/Agency Hosting
    • SSL Certificates
  • WordPress
    • WordPress Hosting
    • WooCommerce Hosting
  • VPS & Dedicated Server
    • Linux VPS Hosting
    • Windows VPS
    • Forex VPS Hosting
    • SEO VPS Hosting
    • n8n VPS Hosting
    • Dedicated Servers
  • AI Website Builder
Log in
BigCloudy KnowledgeBase BigCloudy KnowledgeBase
Log in
BigCloudy KnowledgeBase BigCloudy KnowledgeBase
  • Cloud Hosting
    • cPanel Hosting
    • Laravel Hosting
    • Node.js Hosting
    • Magento Hosting
    • Django Hosting
    • Reseller/Agency Hosting
    • SSL Certificates
  • WordPress
    • WordPress Hosting
    • WooCommerce Hosting
  • VPS & Dedicated Server
    • Linux VPS Hosting
    • Windows VPS
    • Forex VPS Hosting
    • SEO VPS Hosting
    • n8n VPS Hosting
    • Dedicated Servers
  • AI Website Builder
creativeleaf
loading
Popular Searches
  • wordpress
  • how do i add new domains or subdomains in plesk?
  1. Home
  2. Framework
  3. Python
  4. How Do I Deploy a Django App on Your VPS or Shared Server?
Updated on February 9, 2026
Framework
  • Folder icon closed Folder open iconNode.Js
    • How do I deploy a Node.js app on your hosting?
    • What Node.js Versions Are Supported?
    • How Do I Configure Environment Variables in Shared Hosting?
    • Can I Run Multiple Node.js Apps Under One Account?
    • How to fix “503 Service Unavailable” in Node.js hosting?
  • Folder icon closed Folder open iconPython
    • Do You Support Python and Django Applications?
    • How Do I Deploy a Django App on Your VPS or Shared Server?
    • How to set up Gunicorn and Nginx for Django?
    • How Do I Manage Static and Media Files in Django Hosting?
    • Can I use virtual environments with Django hosting?
  • Folder icon closed Folder open iconLaravel
    • How to Deploy a Laravel Project on BigCloudy Shared Hosting ?
    • How Do I Set Up .env and Manage Environment Variables in Laravel?
    • Is SSH access available for running artisan commands?
    • How to configure queues and cron jobs in Laravel hosting?
    • Can I connect Laravel with a remote MySQL server?

How Do I Deploy a Django App on Your VPS or Shared Server?

Introduction

Deploying a Django app does not have to be complicated. Whether you are using a shared hosting plan under Django Hosting or a VPS Hosting environment, you can set it up easily using CloudLinux Passenger, SSH terminal, or Gunicorn and Nginx on a VPS.

In shared hosting, you will typically use cPanel Setup Python App, while on a VPS you will manually configure Gunicorn and Nginx for full control.

This guide explains both methods step by step, so you can deploy your Django project smoothly and confidently, even if this is your first time working with a Python application.

Prerequisites

Before you begin, make sure you have:

  • A Django project ready to deploy
  • Python 3.6+ (check supported versions in your hosting account)
  • Access to cPanel or SSH terminal
  • Your requirements.txt file
  • A configured database (SQLite, MySQL, or PostgreSQL)
  • Basic familiarity with Django’s structure (settings.py, manage.py, etc.)

Note: Always test your app locally before deployment. Run python manage.py runserver on your system to confirm everything works fine.

Deployment on Shared Hosting (Using Passenger)

Shared hosting is ideal if you want a simpler setup without server-level configurations.
Here’s how you can deploy Django using cPanel’s Python App Setup tool (powered by CloudLinux Passenger).

Step 1: Log in to the cPanel Account

  • Go to your hosting control panel and open cPanel.
  • Look for Setup Python App under the Software section.
setup python bigcloudy

Step 2: Create a New Python App

  • Click “Create Application”
  • Choose your Python version (for example, 3.9 or 3.10)
  • Set your application root (e.g., /home/user/my_django_app)
  • Define the application URL (e.g., https://example.com)
  • Choose your startup file — for Django, this is typically passenger_wsgi.py
  • Once done, click Create.
python application form Bigcloudy

Passenger automatically creates a virtual environment and manages your app’s process, so you don’t need to configure WSGI manually.

Step 3: Upload Your Django Project

  • Use File Manager or FTP/SFTP to upload your Django project files to the directory you set as your application root.
    For example:
				
					/home/username/my_django_app/
				
			

Make sure your app.py file and Django project folder (e.g., /myproject/) are inside this directory.

Step 4: Access Terminal (SSH)

  • Terminal access is available under Advanced → Terminal in cPanel.
    Use it to activate your virtual environment and install dependencies:
				
					# source /home/username/virtualenv/my_django_app/3.9/bin/activate 

# pip install -r requirements.txt
				
			
python dependencies bigcloudy
Note: If your hosting plan doesn’t include Terminal, ask support to enable SSH access temporarily.

Step 5: Set Up passenger_wsgi.py

In your app’s root folder, make sure you have a file named passenger_wsgi.py containing:

				
					import sys, 
os sys.path.insert(0, os.path.dirname(__file__)) 
os.environ[‘DJANGO_SETTINGS_MODULE’] = ‘myproject.settings’ 
from django.core.wsgi import get_wsgi_application a
pplication=get_wsgi_application()
				
			

Replace myproject.settings with your actual project settings path.

Step 6: Apply Migrations and Collect Static Files

Run the following commands inside the terminal (after activating your virtual environment):

				
					# python manage.py migrate 
# python manage.py collectstatic
				
			

This ensures your database and static assets are properly configured.

Step 7: Restart the App

Go back to cPanel → Setup Python App → click Restart.
Your Django application should now load on your domain.

You’ve successfully deployed Django on shared hosting!

Deployment on VPS (Using Gunicorn and Nginx)

If you’re using a VPS, you’ll have full root access, which means you can configure Django more efficiently using Gunicorn as the application server and Nginx as a reverse proxy.

Step 6: Apply Migrations and Collect Static Files
Step 1: Update Packages

Step 2: Install Required Packages

Step 3: Clone or Upload Your Django Project

Step 4: Create Virtual Environment

Step 5: Run Migrations

				
					# sudo apt update && sudo apt upgrade -y

# sudo apt install python3 python3-pip python3-venv nginx -y

# cd /var/www/
# sudo mkdir myproject && cd myproject
# sudo git clone https://github.com/yourusername/yourproject.git.

# python3 -m venv venv
# source venv/bin/activate
# pip install -r requirements.txt

# python manage.py migrate
# python manage.py collectstatic


				
			

Step 6: Configure Gunicorn
Create a Gunicorn service file:

				
					# sudo nano /etc/systemd/system/gunicorn.service

Add the following:

[Unit]

Description=gunicorn daemon for Django

After=network.target

[Service]

User=root

Group=www-data

WorkingDirectory=/var/www/myproject

ExecStart=/var/www/myproject/venv/bin/gunicorn –workers 
3 –bind unix:/var/www/myproject/myproject.sock myproject.wsgi:application

[Install]

WantedBy=multi-user.target

Save and run:

# sudo systemctl daemon-reload

# sudo systemctl enable gunicorn

# sudo systemctl start gunicorn
				
			

Step 7: Configure Nginx

Edit Nginx configuration:

				
					# sudo nano /etc/nginx/sites-available/myproject 

Add: 
server { 
listen 80; 
server_name yourdomain.com; 
location = /favicon.ico { access_log off; log_not_found off; } 
location /static/ { 
root /var/www/myproject; 
} 

location / 
{ include proxy_params; 
proxy_pass http://unix:/var/www/myproject/myproject.sock; 

 } 
 
} 

Then enable it: 

# sudo ln -s /etc/nginx/sites-available/myproject 
/etc/nginx/sites-enabled # sudo systemctl restart nginx
				
			

Your Django app should now be running on your VPS.

Setting Up a Virtual Environment

Both shared and VPS setups use virtual environments to isolate dependencies.
This avoids conflicts with global Python packages and allows your app to run safely.

Use:

				
					# python3 -m venv venv 

# source venv/bin/activate 

# pip install -r requirements.txt
				
			

Always activate your virtual environment before running Django commands.

Configuring Databases

You can use SQLite, MySQL, or PostgreSQL depending on your plan.
In settings.py, configure your preferred backend:

For MySQL:

				
					DATABASES = {

    ‘default’: {

        ‘ENGINE’: ‘django.db.backends.mysql’,

        ‘NAME’: ‘dbname’,

        ‘USER’: ‘dbuser’,

        ‘PASSWORD’: ‘dbpass’,

        ‘HOST’: ‘localhost’,

        ‘PORT’: ‘3306’,

    }

}

For SQLite (default):

DATABASES = {

    ‘default’: {

        ‘ENGINE’: ‘django.db.backends.sqlite3’,

        ‘NAME’: BASE_DIR / “db.sqlite3”,

    }

}
				
			

Collecting Static and Media Files

Django requires you to collect static files before serving them:

				
					# python manage.py collectstatic 

Then, define where your files should live in settings.py: 

STATIC_URL = ‘/static/’ 

STATIC_ROOT = BASE_DIR / ‘static’ 

MEDIA_URL = ‘/media/’ 

MEDIA_ROOT = BASE_DIR / ‘media’
				
			

Common Deployment Mistakes

  • Forgetting to run collectstatic
  • Not setting DEBUG=False in production
  • Missing ALLOWED_HOSTS entries in settings
  • Not activating the virtual environment
  • Using the wrong Python version
  • Not restarting Passenger or Gunicorn after updates

Troubleshooting Tips

If the app shows 500 Internal Server Error, check the logs:

#  tail -n 50 passenger.log

    • If static files don’t load, confirm paths in settings.pyRestart your app from cPanel or systemctl restart gunicorn on VPS

Conclusion

Deploying Django on shared or VPS hosting is simple when you follow the right steps.
For shared hosting, Passenger handles most of the setup for you, while on VPS, Gunicorn + Nginx gives you full power and flexibility.With virtual environments, terminal access, and proper static file management, your Django app can run smoothly and securely.

Need Help?

If you require assistance at any point while using this guide, our Support Team is here to help:
  • email Email: support@bigcloudy.com
  • website Submit a support ticket

FAQ

Can I deploy Django using Git?

Yes, both cPanel and VPS allow Git integration. You can pull directly from GitHub to your app directory.

How long does deployment take?

Usually less than 10 minutes once your files and dependencies are ready.

Can I switch from shared to VPS later?

Yes, you can migrate your Django app easily using the same structure.

What if I get a 503 error?

It usually means Passenger or Gunicorn isn’t running. Restart your app or check your startup file.

Can I access the Django admin panel?

Yes, once the site is live, just go to /admin and log in with your credentials.

Still stuck? How can we help?

How can we help?

Was this page helpful? Yes No

Powered By BigCloudy

Cloud Hosting

cPanel Hosting
Laravel Hosting
Node.js Hosting
Magento Hosting
Django Hosting
WordPress Hosting
WooCommerce Hosting
Reseller / Agency Hosting

Cloud VPS & Server

Linux VPS Hosting
Windows VPS Hosting
Forex VPS Hosting
SEO VPS Hosting
n8n VPS Hosting
Dedicated Server

Addons

Domain
SSL Certificates
AI Website Builder
Affiliate Program

Company

About Us
Contact Us
Blog
Knowledge Base
Sitemap
Status

Legal

Privacy Policy
Terms of Service
Refund Policy
Affiliate TOS

Follow Us

Facebook X-twitter Instagram Linkedin

Copyright Ⓒ 2026 BigCloudy Internt Services Pvt. Ltd. All Rights Reserved