Back to Blog
team@tinypod.app

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.

databasespostgresqlmysqlsqlite

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

  • Most feature-rich open-source database
  • Excellent JSON support (JSONB)
  • Advanced indexing and full-text search
  • Strong data integrity and ACID compliance
  • Huge ecosystem of extensions (PostGIS, pgvector, TimescaleDB)

  • Resource Usage

  • Minimum: 256 MB RAM
  • Recommended: 512 MB - 2 GB RAM
  • Storage: Depends on data volume

  • Common Apps That Use It

    Gitea, Outline, Plane, Supabase, Hasura, n8n, Mattermost


    MySQL / MariaDB


    Best For

    Web applications, WordPress ecosystem, high-read workloads.


    Strengths

  • Fastest for simple read-heavy queries
  • Huge community and ecosystem
  • Drop-in MariaDB replacement available
  • Well-understood replication
  • WordPress and many PHP apps require it

  • Resource Usage

  • Minimum: 256 MB RAM
  • Recommended: 512 MB - 1 GB RAM
  • Storage: Depends on data volume

  • Common Apps That Use It

    WordPress, Matomo, Invoice Ninja, BookStack


    SQLite


    Best For

    Single-user apps, embedded databases, low-traffic tools.


    Strengths

  • Zero configuration — it's just a file
  • No separate server process
  • Incredibly fast for local reads
  • Perfect for apps with <100 concurrent users
  • Easy to backup (just copy the file)

  • Limitations

  • One writer at a time
  • Not suitable for high-concurrency applications
  • No built-in replication

  • 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.