Deploy Dango blog to Vultr

vultr django

Worth experiencing the long way

1. ​ Change settings…Separate development environment settings and product environment settings

Create “” in your project folder where sits.


Write “DEBUG = True” “SECRET_KEY” on

2. VULTR registration…

  • Add SSH key,
  • Firewall settings,
  • Deploy new instance,

3. SSH login…

  1. Add user, Update Ubuntu (sudo apt update/ sudo apt upgrade),
  2. Install (sudo apt install nginx python3-pip python3-venv),
  3. Make a folder (mkdir src),
  4. Remote-SSH: Connect to Host – Add new SSH host


4. GitHub + Visual Studio Code

  1. Copy CODE,
  2. cd src: git clone <git CODE url>,
  3. Open copied folder on VSC,
  4. Virtual env (python3 -m venv myvenv),
  5. Activate env (source myvenv/bin/activate)

Visit Github:

5. Deploy…

  1. Update (pip3 install –upgrade pip setuptools),
  2. Install requirements (pip3 install -r requirements.txt): local and myvenv,
  3. Make a directory for static (sudo mkdir /usr/share/nginx/html/static),
  4. Make a directory for media (sudo mkdir /usr/share/nginx/html/media),
  5. Make .env file for environment variable (write: SECRET_KEY=xxxxx/ ALLOWED_HOSTS=,
  6. Migrate (python3 migrate),
  7. Collectstatic (sudo python3 collectstatic),
  8. Change settings of nginx (sudo nano /etc/niginx/sites-available/default)…Rewrite server (vultr IP),
  9. Check the settings (sudo nginx -t),
  10. Add vultr IP to .env
  11. Runserver: (python3 runserver
  12. Enter vultr IP
  13. Stop server
  14. Check gunicorn (gunicorn –bind project.wsgi:application)
  15. —> Enter IP on browser
  16. Register system ctl cmd for start/stop/restart server
  17. —> (sudo nano /etc/systemd/system/project.service)
  18. —>WorkingDirectory=/home/yamaco/src/project
  19. —>ExecStart=/home/yamaco/src/project/myvenv/bin/gunicorn –bind project.wsgi:application
  20. Start server (sudo systemctl start project)
  21. —>Check status (sudo systemctl status project)
  22. —>Stop server (sudo systemctl stop project)
  23. —>Restart server (sudo systemctl restart project)

6. Domain acquisition… 

  1.      —>Name server settings (
  2.      —>Vultr: Add domain to DNS
  3.      —>Add domain to .env
  4.      —>Restart server (sudo systemctl restart project)


7. HTTPS conversion

  1.      —>Stop server (sudo systemctl stop nginx)
  2.      —>Get a certificate (sudo apt-get install letsencrypt)
  3.      —>Get a certificate (sudo letsencrypt certonly –standalone -d
  4.      —>Change settings of nginx (sudo nano /etc/nginx/sites-available/default)
  5.      —>Check status (sudo nginx -t)
  6.      —>Start nginx (sudo systemctl start nginx)
  7.      —>Restart gunicorn (sudo systemctl restart project)


VSC error message: Import “django.db” could not be resolved from source