Introduction

Sooner or later, everyone running a homelab ends up needing to poke around inside a database. Maybe Nextcloud is throwing an odd error and you want to check a table directly. Maybe you're building something small with MariaDB and you're tired of typing raw SQL into a terminal window. Whatever the reason, you need a database GUI, and you don't want to install a heavyweight suite just to look at a few tables.

That's exactly the gap Adminer fills. It's a single PHP file, a few hundred kilobytes, that gives you a full web interface for MySQL, MariaDB, PostgreSQL, SQLite, and a handful of other database engines. No installer, no package manager wrestling, no background services beyond a web server you probably already have running somewhere.

This guide walks through installing Adminer inside its own LXC container on Proxmox VE 9.2, using plain Apache and PHP — no Docker involved. Budget about fifteen minutes for the whole thing, most of which is waiting on apt.

What You Will Learn

  • What Adminer actually is and how it differs from phpMyAdmin
  • How to create a lightweight Debian 13 LXC container for it
  • How to install Apache and PHP with the right database extensions
  • How to download and serve the Adminer single-file application
  • How to password-protect it with Apache basic authentication
  • How to connect it to a MySQL, MariaDB, or PostgreSQL server
  • Common errors, troubleshooting steps, and a few security habits worth keeping

What Is This Feature?

Adminer (formerly phpMinAdmin) is an open-source database management tool written entirely in PHP. Unlike most web apps, it ships as one file — adminer.php — that you drop into a web server's document root. Open it in a browser, log in with your database credentials, and you get table browsing, query editing, import and export, user management, and schema editing.

It supports MySQL, MariaDB, PostgreSQL, SQLite, MS SQL, Oracle, and a few others through plugins. For a homelab, the two you'll actually use are MySQL/MariaDB and PostgreSQL, since those back most of the self-hosted apps people run on Proxmox.

If you've used phpMyAdmin before, Adminer will feel familiar but leaner. phpMyAdmin is a whole application with its own configuration file, session storage tables, and a much larger footprint. Adminer trades some of phpMyAdmin's extra features (like a built-in query history browser) for speed and simplicity. Here's roughly how they compare:

AspectAdminerphpMyAdmin
Install size~500 KB, one file~50 MB, hundreds of files
SetupDrop the file in, doneConfig file, optional control tables
Database supportMySQL, PostgreSQL, SQLite, MSSQL, Oracle, more via pluginsPrimarily MySQL/MariaDB
InterfaceSingle page per action, fastMore panels and menus
UpdatingReplace one fileReinstall or use package manager

Neither one is strictly better — phpMyAdmin has a gentler learning curve for absolute beginners, and Adminer is faster to deploy and lighter to run. If you already have phpMyAdmin somewhere and it works for you, there's no urgent reason to switch. If you're setting up a database GUI for the first time, Adminer is the one I'd reach for.

Why Would You Use It?

If you're running Nextcloud, Gitea, WordPress, or any of the dozen other self-hosted apps that need a database, you already have MySQL, MariaDB, or PostgreSQL sitting somewhere in your infrastructure. Most of the time you never touch it directly — the app manages its own tables. But eventually something breaks, or you want to check a value, or you're building your own small project and need a quick way to run queries without SSHing in and typing mysql -u root -p every time.

Running Adminer in its own LXC container keeps it isolated from the apps and databases it connects to. If you ever need to tear it down or rebuild it, nothing else on your Proxmox node is affected. It also means you can point it at multiple database servers — your Nextcloud MariaDB instance, a standalone PostgreSQL container, whatever else you're running — from one place, since Adminer asks for a server address at login rather than being tied to one database.

Honestly, most people don't need this running all the time. It's the kind of tool you spin up, use for ten minutes, and forget about until the next time something needs checking. That's fine — a dedicated LXC container barely costs you anything in resources, and having it ready beats setting it up from scratch every time.

Prerequisites

Before you start, make sure you have:

  • A working Proxmox VE 9.2 installation with access to the web interface
  • A downloaded Debian 13 (trixie) LXC container template — grab it from Datacenter → Storage → local → CT Templates if you don't already have one
  • At least one MySQL, MariaDB, or PostgreSQL server already running somewhere on your network that you plan to connect to
  • Basic comfort with a Linux shell — you'll be typing commands inside the container's console
  • About 512 MB of RAM and 4 GB of disk space free on your Proxmox storage

You don't need Docker for this one. Adminer is small enough that running it directly with Apache and PHP is simpler than wrapping it in a container image, and it skips the whole conversation about enabling nesting on unprivileged LXC containers.

Step-by-Step Tutorial

Step 1: Create the LXC Container

Log into the Proxmox web interface and click Create CT in the top right. Walk through the wizard:

  • General: set the hostname to something like adminer, and set a root password or SSH key
  • Template: choose the Debian 13 standard template
  • Disks: 4 GB is plenty
  • CPU: 1 core is enough
  • Memory: 512 MB, with 512 MB swap
  • Network: assign it to your usual bridge (vmbr0 for most setups), with a static IP if you have a addressing scheme, or DHCP if that's how you normally do things

Leave the container as unprivileged — the default — since Adminer doesn't need any special hardware access or elevated privileges. Finish the wizard and start the container.

Step 2: Update the System and Install Apache with PHP

Open the container's console from the Proxmox UI (click the container, then Console), or SSH into it if you set that up. First, update the package list and installed packages:

apt update && apt full-upgrade -y

Then install Apache, PHP, and the database extensions Adminer needs to talk to MySQL and PostgreSQL:

apt install -y apache2 libapache2-mod-php php-mysqli php-pgsql php-sqlite3 apache2-utils wget

That last package, apache2-utils, isn't for Adminer itself — it gives you the htpasswd command you'll use in a few steps to add a login prompt in front of the whole thing.

Once installation finishes, confirm Apache is running:

systemctl status apache2

You should see active (running) in green. If Apache isn't running for some reason, start it with systemctl enable --now apache2.

Step 3: Download Adminer

Adminer's maintainers publish a URL that always points at the current stable release, which makes updates trivial later. Download it straight into Apache's document root:

wget -O /var/www/html/adminer.php https://www.adminer.org/latest.php

Set the correct ownership so Apache's user can read it:

chown www-data:www-data /var/www/html/adminer.php

At this point you could open http://<container-ip>/adminer.php in a browser and you'd already see the login screen. But before you do, it's worth locking the page down — Adminer's own login form isn't rate-limited, and a raw database login page sitting open on your network isn't something you want to leave unprotected, even on a trusted LAN.

Step 4: Add Basic Authentication

This puts a second password prompt — handled by Apache, not Adminer — in front of the page. It's a simple layer that stops anything on your network from reaching the database login form without a second set of credentials.

Create the password file and add a user (you'll be prompted to type a password twice):

htpasswd -c /etc/apache2/.htpasswd dbadmin

Now create a config snippet that applies this authentication specifically to adminer.php:

nano /etc/apache2/conf-available/adminer-auth.conf

Paste in the following:

<Files "adminer.php">
    AuthType Basic
    AuthName "Restricted Area"
    AuthUserFile /etc/apache2/.htpasswd
    Require valid-user
</Files>

Save the file, then enable it and reload Apache:

a2enconf adminer-auth
systemctl reload apache2

Step 5: Log In and Connect to Your Database

Open http://<container-ip>/adminer.php in your browser. You'll hit the Apache basic auth prompt first — enter the username and password from Step 4. After that, Adminer's own login screen appears, asking for four things:

  • System: MySQL, PostgreSQL, SQLite, and so on — pick whichever database engine you're connecting to
  • Server: the IP address or hostname of your database server (not this container — the one running MySQL or PostgreSQL)
  • Username and Password: credentials for a database user with access to what you want to see

If your database server is another LXC container or VM on Proxmox, use its internal IP. For a MariaDB instance backing something like Nextcloud, that's usually as simple as pointing Adminer at the container's address on port 3306.

One thing that trips people up here: MySQL and MariaDB, by default, only allow connections from localhost unless you've explicitly configured otherwise. If your target database server was set up for a single app talking to it on the same machine, you may need to check its bind-address setting and user grants before Adminer can reach it remotely. That's a change on the database server, not on the Adminer container.

Commands Explained

A quick rundown of what each command from the tutorial actually does:

CommandWhat it does
apt full-upgrade -yUpdates every installed package to its latest version, including ones that need to remove or replace other packages — safer than plain upgrade after a fresh template install
apt install -y apache2 libapache2-mod-php ...Installs the Apache web server plus the PHP module for it, and the specific PHP extensions Adminer uses to talk to MySQL and PostgreSQL
systemctl status apache2Shows whether the Apache service is currently running and shows recent log lines
wget -O /var/www/html/adminer.php ...Downloads a file and saves it under a specific name — here, straight into Apache's default document root
chown www-data:www-dataChanges file ownership to the user Apache runs as, so it's allowed to serve the file
htpasswd -cCreates a new password file (the -c flag means "create") and adds an entry for a username
a2enconf adminer-authEnables an Apache configuration snippet by symlinking it into the active config directory
systemctl reload apache2Applies configuration changes without dropping active connections, unlike a full restart

Common Errors

A few things go wrong often enough that they're worth calling out before you hit them.

The browser shows raw PHP code instead of a page. This means Apache isn't handing .php files off to PHP for processing — almost always because libapache2-mod-php didn't get installed or enabled. Run apt install --reinstall libapache2-mod-php and then systemctl restart apache2.

"Forbidden — You don't have permission to access this resource." Usually a file ownership or permissions issue. Double-check that adminer.php is owned by www-data:www-data and that the file itself is readable (chmod 644 /var/www/html/adminer.php if in doubt).

"SQLSTATE[HY000] [2002] Connection refused" (or similar) after logging in. Adminer reached the container fine, but couldn't reach the database server you typed in. Check that you used the right IP and port, that the database server is actually running, and that nothing (like the Proxmox firewall or the guest's own firewall) is blocking the connection.

"Access denied for user '...'@'...'" The database server rejected the login. This is either a wrong password, or — more often — a MySQL/MariaDB user account that's only granted access from localhost and not from the Adminer container's IP. You'll need to update the user's host grant on the database server itself.

Troubleshooting

If Apache won't start at all, check the error log directly rather than guessing:

journalctl -u apache2 -n 50 --no-pager

A common cause on a fresh container is port 80 already being in use by something else, though that's rare on a container you just created from a clean template.

If the page loads but styling looks broken or half the interface is missing, you probably have an old cached version of adminer.php from before an interrupted download. Delete the file and re-download it:

rm /var/www/html/adminer.php
wget -O /var/www/html/adminer.php https://www.adminer.org/latest.php
chown www-data:www-data /var/www/html/adminer.php

If you can reach the Apache basic auth prompt but the password you set doesn't work, you likely mistyped it during the htpasswd step. Just re-run htpasswd /etc/apache2/.htpasswd dbadmin (without -c, so it doesn't overwrite the file) to reset it.

Container has no internet access and apt update fails outright? Check the container's network config in the Proxmox UI under its Network tab, and confirm the bridge you assigned actually has a route to your router. This is a networking problem with the container, not with Adminer or Apache.

Best Practices

A few habits that will save you trouble down the line:

  • Never expose this container directly to the internet. Keep it reachable only from your local network, or put it behind a VPN like WireGuard or Tailscale if you need remote access.
  • Keep the Apache basic auth layer in place even on a trusted LAN — it's one extra step that costs nothing and stops casual snooping.
  • Update adminer.php periodically. Since it's a single file, updating is just re-downloading it — there's no reason to run a version from a year ago.
  • Use a database user with only the permissions you actually need for day-to-day browsing, and switch to a more privileged account only when you specifically need to run administrative queries.
  • If you only use Adminer occasionally, consider stopping the container (pct stop from the Proxmox host) when you're not using it, rather than leaving a database login page reachable around the clock.

Frequently Asked Questions

Is Adminer safe to expose to the internet?

Not on its own. It has no built-in brute-force protection, so if you need remote access, put it behind a VPN or a reverse proxy with additional authentication rather than opening a port directly to it.

Can Adminer connect to a database running on the Proxmox host itself, not in a container?

Yes, as long as the container can reach the host's IP address and port over the network, and the database server is configured to accept connections from something other than localhost.

Does Adminer work with PostgreSQL, or just MySQL?

Both, along with SQLite and a few others. Just install the matching PHP extension (php-pgsql for PostgreSQL, which the tutorial above already includes) and pick the right system on the login screen.

How do I update Adminer later?

Delete the old file and re-download it from the same URL used during install — it always points to the current stable release. No database migration or config changes needed.

Can I run this without Apache, using something like Nginx instead?

Yes. Adminer just needs PHP-FPM behind whatever web server you prefer. Apache with libapache2-mod-php is the simplest path for a beginner, which is why this guide uses it.

Conclusion

Adminer isn't flashy, and it doesn't need to be. It's a small tool that does one job — giving you a browser-based way into your databases — and does it without asking for much in return. Fifteen minutes and 512 MB of RAM gets you a permanent, password-protected window into every MySQL, MariaDB, or PostgreSQL instance on your network, ready whenever something needs checking.

Keep the container isolated on your LAN, keep the Apache password prompt in front of it, and swap in a fresh copy of adminer.php every so often. That's really the whole maintenance burden.