Learn how to deploy a Django application
Introduction
Install the required dependencies
Create the Django application
Deploy the Django application
Next Steps
Learn how to deploy a Django application
Review frequently asked questions
These FAQs were drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.
The steps use Ubuntu 22.04 LTS. Follow the same instructions whether you connect to a remote Arm server over SSH or use a local Arm VM or machine.
Expect a
myproject directory containing manage.py and a myproject package with __init__.py, asgi.py, settings.py, urls.py, and wsgi.py. The structure matches the tree shown in the steps.Set
ENGINE to django.db.backends.postgresql and provide NAME, USER, PASSWORD, HOST, and PORT. Use localhost or your machine’s IP address for HOST and keep PORT as 5432 unless configured otherwise.Open the PostgreSQL prompt with
sudo -u postgres psql, then create the database and user using the same values you set in settings.py. Ensure the user has the required password and access to the specified database.Configure NGINX after confirming the Django project runs and the PostgreSQL connection works. Proceed to the deployment steps to integrate NGINX with the application.