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
Who is this for?
This is an introductory topic for engineers who want to deploy a Django based application on Arm machines.
What will you learn?
Upon completion of this Learning Path, you will be able to:
- Create a simple Django application
- Deploy the Django application using Nginx and PostgreSQL
- Verify that the Django application is working correctly
Prerequisites
Before starting, you will need the following:
- One of either an Arm based instance from a cloud service provider, an on-premises Arm server, or a Linux virtual machine on your Arm device
- Sudo access to install dependencies and to modify system configuration files
- Familiarity with SSH and Linux terminal, and basic system administration tasks
- Both NGINX and PostgreSQL installed
Summary
This summary was 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.
You’ll create a minimal Django project on an Arm-based Linux machine and prepare it for deployment with PostgreSQL and NGINX. You’ll initialize the project, verify the development server, and configure the PostgreSQL backend and matching database user. Then, you’ll connect the application to NGINX. By the end, you’ll have a working Django application backed by PostgreSQL and deployed on Ubuntu 22.04 LTS.
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.