Database Basics for Self-Hosting: PostgreSQL vs MySQL vs SQLite
Most self-hosted apps need a database. Here's how to pick between PostgreSQL, MySQL, and SQLite, and when each one makes sense.
Every App Needs a Database
Whether it's a blog, a project management tool, or a password manager, almost every self-hosted application stores data in a database. Understanding the differences helps you make better choices.
PostgreSQL
Best For
Complex applications, data integrity, advanced queries, JSON data.
Strengths
Resource Usage
Common Apps That Use It
Gitea, Outline, Plane, Supabase, Hasura, n8n, Mattermost
MySQL / MariaDB
Best For
Web applications, WordPress ecosystem, high-read workloads.
Strengths
Resource Usage
Common Apps That Use It
WordPress, Matomo, Invoice Ninja, BookStack
SQLite
Best For
Single-user apps, embedded databases, low-traffic tools.
Strengths
Limitations
Common Apps That Use It
Vaultwarden, Uptime Kuma, many lightweight tools
How to Choose
1. Check what your application supports. Many apps only work with one database.
2. If the app supports multiple databases, choose PostgreSQL. It's the safest default.
3. For lightweight, single-user tools, SQLite is perfectly fine.
4. Only use MySQL if the application requires it.
Shared Databases on TinyPod
TinyPod runs shared PostgreSQL, MySQL, and Redis instances on each server. When you deploy an app that needs a database, we automatically create a dedicated database within the shared instance. This is more resource-efficient than running a separate database server for each app.