Self-Hosted - Use PostgreSQL Instead of SQLite (Optional, AI Guide)

Last updated: November 2026

Djangify uses SQLite by default. It needs no setup and suits most small digital shops, so if you are happy with it, you do not need anything on this page. If you would rather use PostgreSQL, this page shows you how simple that is: download one file, hand it to your AI assistant, and let it walk you through your own server.

How it works

  1. Download the file. It is called djangify-postgres-setup.md and it is included in your self-hosted download.
  2. Hand it to your AI assistant. Upload it to Claude, ChatGPT, Gemini or whichever AI you use for your site, and say: "Please follow this guide to switch my Djangify site to PostgreSQL."
  3. Answer its questions. It will ask about your server, whether your shop is already live, and whether you want PostgreSQL on the same server or from a hosting provider.
  4. Follow it one step at a time. It will give you the commands for your own setup, check each result with you, and fix problems as they appear.

What your AI will do with you

  • Check how your site is set up before changing anything.
  • Make you back up your database, media folder and .env file (including your ENCRYPTION_KEY) first.
  • Install PostgreSQL and create your database and user.
  • Install the database driver and point your site at the new database.
  • Move your existing shop data across, if you already have one.
  • Run through a checklist, including a test purchase, before you rely on it.
  • Set up PostgreSQL backups, and show you how to go back to SQLite if you want to.

Good to know

  • Keep your secrets private. The guide tells your AI not to ask for your passwords or encryption key. Type them into your own files on your server, not into the chat.
  • Allow for memory. PostgreSQL runs as an extra program, so 2 GB of RAM (the recommended spec) is a better fit than the 1 GB minimum.
  • You can switch back. Removing the DATABASE_URL line from your .env file returns your site to SQLite.
  • This page is for information only. The file does the work, and your AI does the walking through. Please do not try to do the steps on your own if you are not sure what you are doing.

Not sure which database you need? Read the blog post SQLite versus Postgres in Plain Language.