Self-hosting phpMyAdmin the easy way

Self-hosting phpMyAdmin the easy way

Yulei Chen - Content-Engineerin bei sliplane.ioYulei Chen
4 min

phpMyAdmin is one of the most popular web-based tools for managing MySQL and MariaDB databases. It gives you a clean UI for browsing tables, running SQL queries, importing/exporting data, and managing users - all from your browser. It's free, open-source, and has been around for over 25 years.

Sliplane is a managed container platform that makes self-hosting painless. With one-click deployment, you can get phpMyAdmin up and running in minutes - no server setup, no reverse proxy config, no infrastructure to maintain.

Prerequisites

Before deploying, ensure you have a Sliplane account (free trial available).

Quick start

Sliplane provides one-click deployment with presets.

SliplaneDeploy phpMyAdmin >
  1. Click the deploy button above
  2. Select a project
  3. Select a server (If you just signed up you get a 48-hour free trial server)
  4. Click Deploy!

About the preset

The one-click deploy above uses Sliplane's phpMyAdmin preset. Here's what it includes:

  • LinuxServer image (lscr.io/linuxserver/phpmyadmin) for a well-maintained, regularly updated base
  • Pinned to version 5.2.3 for stability
  • Persistent storage mounted to /config for your phpMyAdmin configuration
  • PMA_ARBITRARY enabled so you can connect to any MySQL or MariaDB server
  • PMA_ABSOLUTE_URI auto-configured to your Sliplane domain for correct URL handling

Next steps

Once phpMyAdmin is running, open the domain Sliplane assigned (e.g. phpmyadmin-xxxx.sliplane.app). You'll see the phpMyAdmin login screen.

Connecting to a database

Since PMA_ARBITRARY is enabled, the login page shows a Server field where you enter the hostname of your MySQL or MariaDB instance. If your database runs on the same Sliplane server, use its internal service name (e.g. mysql.internal or mariadb.internal). Then enter your database username and password.

If you don't have a database yet, you can deploy MySQL or MariaDB from Sliplane's presets on the same server, and phpMyAdmin will be able to reach them over the internal network.

Environment variables

You can customize the setup through environment variables in your service settings:

VariableDefaultDescription
PMA_ARBITRARY1Set to 1 to allow connecting to any server, or 0 to restrict
PMA_ABSOLUTE_URIhttps://$SLIPLANE_DOMAINThe full URL where phpMyAdmin is accessible
PMA_HOST(not set)Set this to lock phpMyAdmin to a specific database host
PMA_PORT(not set)Custom port for the database connection (default: 3306)
TZEurope/BerlinTimezone for the container

Logging

phpMyAdmin logs go to STDOUT by default, which works well with Sliplane's built-in log viewer. For tips on working with container logs, check out our guide on how to use Docker logs.

Cost comparison

You can also self-host phpMyAdmin with other cloud providers. Here is a pricing comparison for the most common ones:

ProvidervCPURAMDiskMonthly CostNote
Sliplane22 GB40 GB€9 (~$10.65)Flat rate, 1 TB bandwidth, SSL included
Fly.io22 GB40 GB~$18Disk and bandwidth billed separately
Render12 GB40 GB~$35100 GB bandwidth, Disk billed separately
Railway22 GB40 GB~$67 + $20 planPro plan floor, usage-based, bandwidth billed separately
Click here to see how these numbers were calculated.

(Assuming an always-on instance running 730 hrs/month)

  • Sliplane: flat €9/month for the Base server. Unlimited services on the same server, 1 TB egress and SSL included.
  • Fly.io: shared-cpu-2x 2 GB = $11.83/mo + 40 GB volume × $0.15/GB = $6 -> ~$17.83/mo. Egress billed separately ($0.02/GB in EU).
  • Render: closest match is Standard ($25, 1 vCPU / 2 GB) plus 40 GB disk × $0.25/GB = $10 -> ~$35/mo. Stepping up to Pro (2 vCPU / 4 GB) costs $85/mo + disk.
  • Railway (Pro plan): CPU 2 × $0.00000772/s × 2,628,000 s = $40.57; RAM 2 × $0.00000386/s × 2,628,000 s = $20.29; volume 40 × $0.00000006/s × 2,628,000 s = $6.31 -> ~$67/mo compute, plus the $20/mo Pro plan floor and $0.05/GB egress.

Bandwidth costs can add up fast on usage-based providers. Use our bandwidth cost comparison tool to see what your egress would cost on each platform.

FAQ

Can I use phpMyAdmin to manage remote databases?

Yes. With PMA_ARBITRARY=1 (enabled by default in the preset), you can connect to any MySQL or MariaDB server by entering its hostname on the login screen. This works for databases on the same Sliplane server, other Sliplane services, or external database hosts.

How do I lock phpMyAdmin to a specific database?

Set the PMA_HOST environment variable to your database server's hostname (e.g. mysql.internal) and set PMA_ARBITRARY to 0. This removes the server field from the login page and always connects to the specified host.

How do I update phpMyAdmin?

Change the image tag in your service settings to the newer version and redeploy. Check Docker Hub for the latest stable version. Your configuration in /config is persisted, so updates are seamless.

Are there alternatives to phpMyAdmin?

Yes. Adminer is a lightweight single-file alternative. DBeaver is a desktop app that supports many database types. For a web-based option that works with more than just MySQL, check out NocoDB which turns your database into a spreadsheet-like interface, or Drizzle Gateway for a modern database GUI.

Is phpMyAdmin safe to expose to the internet?

phpMyAdmin itself is safe as long as your database credentials are strong. The preset runs behind Sliplane's SSL-enabled reverse proxy, so traffic is encrypted. For extra security, you can restrict access using Sliplane's allow-list feature to limit which IP addresses can reach your instance.

Self-host phpMyAdmin now - It's easy!

Sliplane gives you everything you need to run phpMyAdmin without server hassle.