Back to Blog
team@tinypod.app

PostgreSQL vs MySQL vs SQLite: Database Comparison for Self-Hosting

Which database should your self-hosted apps use? PostgreSQL for features, MySQL for familiarity, SQLite for simplicity.

postgresqlmysqlsqlitedatabasecomparison

The Short Answer


  • SQLite: Single-user apps, low traffic, simplest setup
  • PostgreSQL: Most versatile, best for new projects
  • MySQL/MariaDB: WordPress and PHP ecosystems

  • SQLite


    What It Is

    A file-based database. No server process. The entire database is a single file.


    Strengths

  • Zero configuration
  • No separate process to manage
  • Very fast for reads
  • Perfect for single-user applications
  • Backup = copy the file

  • Weaknesses

  • One writer at a time (concurrent writes are slow)
  • No network access (file must be local)
  • Limited to ~1 TB practical size

  • Best For

    Small apps, personal tools, development, mobile apps, read-heavy workloads.


    Self-Hosted Apps Using SQLite

    Vaultwarden, Uptime Kuma, Actual Budget, Paperless-ngx.


    PostgreSQL


    Strengths

  • Most SQL-standard compliant
  • Advanced features (JSON, full-text search, CTEs, window functions)
  • Excellent concurrency handling
  • Extensions (PostGIS, pg_vector, timescaledb)
  • Strong data integrity

  • Weaknesses

  • Uses more resources than SQLite
  • More complex configuration
  • Higher memory baseline

  • Best For

    Multi-user apps, complex queries, applications that need relational integrity.


    Self-Hosted Apps Using PostgreSQL

    Nextcloud, Gitea, Grafana, PostHog, Outline, Mattermost.


    MySQL / MariaDB


    Strengths

  • Fastest for simple queries
  • Huge ecosystem (WordPress, Drupal, etc.)
  • Wide hosting support
  • Well-known, widely understood

  • Weaknesses

  • Weaker SQL standards compliance
  • Limited JSON and full-text search (compared to PostgreSQL)
  • Replication can be fragile

  • Best For

    WordPress, PHP applications, legacy applications.


    Self-Hosted Apps Using MySQL

    WordPress, BookStack, Matomo, Ghost (also supports MySQL).


    Resource Usage


    | Database | Minimum RAM | Idle RAM | Concurrent Users |

    |----------|------------|----------|------------------|

    | SQLite | 0 MB (in-app) | 0 MB | 1 writer |

    | PostgreSQL | 256 MB | 50-100 MB | Hundreds |

    | MySQL | 256 MB | 100-200 MB | Hundreds |


    TinyPod's Approach


    TinyPod offers shared PostgreSQL and MySQL instances. Apps that support both default to PostgreSQL. Apps that require SQLite use it directly in their container.