Categories

Intermediate

Self-hosted databases and storage with Docker

The data layer of your infrastructure: PostgreSQL, MariaDB and Redis; S3 object storage with MinIO; sync and backups with Syncthing, Duplicati and Seafile, plus web database managers.

  • 8 resources
  • ~68 min read
  1. How to Install PostgreSQL with Docker

    PostgreSQL is the most advanced open-source relational database, and in Docker you bring it up with a single docker-compose.yml file. You define a persistent volume, the superuser password and a pg_isready healthcheck, and within seconds you have a server on port 5432 ready for other containers to connect to it by the service name.

    • 9 min
  2. How to Install MariaDB with Docker

    MariaDB is an open-source relational database, a fork of MySQL and compatible with it, that in Docker runs as a single container with a persistent volume. With this docker-compose.yml you set the root password, the database and the initial user through environment variables, and you keep your data even if you recreate the container.

    • 8 min
  3. How to Install Redis with Docker

    Redis is an in-memory key-value data store used as a cache, a job queue and a session manager. With Docker you bring it up from a single docker-compose.yml file, with persistence on a volume, a mandatory password and a healthcheck. This guide covers the installation, how to secure it and how it differs from Valkey.

    • 8 min
  4. How to Manage Databases with Adminer and pgweb in Docker

    Adminer and pgweb are two web-based database managers that run in Docker with a single container each. Adminer is one PHP file that handles MySQL, PostgreSQL and six other engines; pgweb is a Go explorer dedicated to PostgreSQL. This guide brings a ready-to-copy docker-compose.yml and explains how to secure them properly.

    • 8 min
  5. How to Install MinIO with Docker

    MinIO is an object storage server compatible with the Amazon S3 API that you can self-host with Docker. With a single docker-compose.yml you bring up the API on port 9000 and the console on 9001, create buckets and access keys with the mc client, and use it as an S3 backend for backups, attachments and photos.

    • 8 min
  6. How to Install Syncthing with Docker

    Syncthing is a free peer-to-peer file synchronisation tool: it keeps folders identical across your devices without going through the cloud and with all traffic encrypted. With Docker you bring it up from a single docker-compose.yml using host networking, PUID/PGID for permissions and a persistent volume. This guide covers the installation, device pairing and the ports you need.

    • 9 min
  7. How to Install Seafile with Docker

    Seafile is an open-source file sync and storage platform that keeps data in blocks, Git style, which makes it very fast when you handle lots of files. With Docker it comes up in four containers (server, a MariaDB database, a Redis cache and a Caddy proxy) from a single docker-compose.yml file.

    • 9 min
  8. How to Install Duplicati with Docker

    Duplicati is a free backup tool that encrypts your data with AES-256 before sending it and only uploads the blocks that have changed. With Docker you bring it up from a single docker-compose.yml, mount your folders read-only and schedule encrypted backups to S3, MinIO, B2 or SFTP. This guide covers installation, encryption, retention and restore.

    • 9 min