How to Self-Host Adminer with Docker Compose
What Is Adminer?
Adminer is a lightweight, single-file database management tool that supports MySQL, MariaDB, PostgreSQL, SQLite, MS SQL, Oracle, Elasticsearch, and MongoDB from a single interface. It replaces tools like phpMyAdmin with a cleaner UI and broader database support. Adminer is open source and available at adminer.org.
Updated February 2026: Verified with latest Docker images and configurations.
Prerequisites
- A Linux server (Ubuntu 22.04+ recommended)
- Docker and Docker Compose installed (guide)
- 512 MB of free RAM (minimum)
- An existing database server or one deployed alongside Adminer
Docker Compose Configuration
Create a docker-compose.yml file:
services:
adminer:
image: adminer:5.4.2
container_name: adminer
restart: unless-stopped
ports:
- "8080:8080"
environment:
# Pre-fill the server field on the login page
ADMINER_DEFAULT_SERVER: db
# UI theme (options: nette, galkaev, dracula, etc.)
ADMINER_DESIGN: dracula
# Enable plugins (space-separated)
ADMINER_PLUGINS: tables-filter
networks:
- adminer-net
# Example: MySQL database (optional — remove if connecting to an existing DB)
db:
image: mysql:8.4
container_name: adminer-mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: change-this-root-password
MYSQL_DATABASE: myapp
MYSQL_USER: appuser
MYSQL_PASSWORD: change-this-app-password
volumes:
- mysql_data:/var/lib/mysql
networks:
- adminer-net
volumes:
mysql_data:
networks:
adminer-net:
Start the stack:
docker compose up -d
Initial Setup
- Open
http://your-server-ip:8080in your browser - Select your database system from the dropdown (MySQL, PostgreSQL, SQLite, etc.)
- Enter the server hostname — if using the included MySQL container, enter
db - Enter the username and password configured in your database
- Click Login to access your databases
No account creation or setup wizard is required. Adminer connects directly to your database servers.
Configuration
Themes
Set ADMINER_DESIGN to change the UI theme. Popular options:
| Theme | Style |
|---|---|
dracula | Dark theme |
nette | Clean, modern |
galkaev | Material design |
hever | Minimalist |
pepa-linha | Colorful |
Browse all available themes at github.com/vrana/adminer/tree/master/designs.
Plugins
Enable plugins via the ADMINER_PLUGINS environment variable (space-separated):
environment:
ADMINER_PLUGINS: tables-filter tinymce file-upload
Useful plugins:
| Plugin | Purpose |
|---|---|
tables-filter | Filter tables by name in the sidebar |
tinymce | Rich text editor for text fields |
file-upload | Upload SQL files directly |
dump-alter | Show ALTER queries for table changes |
dark-switcher | Toggle dark mode |
Connecting to Multiple Databases
Adminer can manage multiple database servers from a single instance. Leave ADMINER_DEFAULT_SERVER unset to show the server field on every login, or change it between sessions.
To connect to a PostgreSQL database alongside MySQL:
services:
postgres:
image: postgres:17-alpine
container_name: adminer-postgres
restart: unless-stopped
environment:
POSTGRES_USER: pguser
POSTGRES_PASSWORD: change-this-pg-password
POSTGRES_DB: myapp
volumes:
- pg_data:/var/lib/postgresql/data
networks:
- adminer-net
Then select PostgreSQL from the Adminer dropdown and enter postgres as the server.
Reverse Proxy
Place Adminer behind a reverse proxy for HTTPS access. Example Nginx Proxy Manager configuration:
- Domain:
db.yourdomain.com - Scheme:
http - Forward Hostname:
adminer(container name) - Forward Port:
8080 - Enable SSL with Let’s Encrypt
For detailed setup, see Reverse Proxy Setup.
Security warning: Adminer has no built-in authentication beyond the database login. Always place it behind a reverse proxy with HTTPS, and consider adding HTTP basic auth or restricting access by IP.
Backup
Adminer itself stores no persistent data — all data lives in your database servers. Back up your databases directly:
- MySQL:
docker exec adminer-mysql mysqldump -u root -p myapp > backup.sql - PostgreSQL:
docker exec adminer-postgres pg_dump -U pguser myapp > backup.sql
For a comprehensive backup approach, see Backup Strategy.
Troubleshooting
Login fails with “No tables” or empty database
Symptom: You log in successfully but see no tables. Fix: Verify you selected the correct database from the dropdown after logging in. The default view shows the first database, which may be an empty system database.
Cannot connect to database on another host
Symptom: “Connection refused” when connecting to a database outside the Docker network.
Fix: Ensure the external database allows connections from the Adminer container’s IP. Check firewall rules and the database’s bind-address configuration. Use the host’s IP or Docker gateway address, not localhost.
Adminer shows “Access denied” for root user
Symptom: MySQL root login fails even with correct password.
Fix: MySQL 8+ defaults to caching_sha2_password authentication. Either create a user with mysql_native_password or ensure your MySQL client libraries support the newer auth method. Adminer 5.x supports caching_sha2_password natively.
Resource Requirements
- RAM: ~20-30 MB (extremely lightweight)
- CPU: Minimal
- Disk: ~30 MB for the Docker image, no persistent storage needed
Verdict
Adminer is the best lightweight database management tool for self-hosters managing multiple database types. Its single-container deployment, multi-database support, and tiny resource footprint make it ideal for homelab environments. Choose pgAdmin if you need advanced PostgreSQL-specific features like query plans and monitoring. Choose phpMyAdmin if you exclusively use MySQL and need more advanced import/export tools. For most self-hosters, Adminer covers everything you need.
Frequently Asked Questions
Which databases does Adminer support?
Adminer supports MySQL, MariaDB, PostgreSQL, SQLite, MS SQL, Oracle, Elasticsearch, and MongoDB — all from a single PHP file. This multi-database support is its biggest advantage over tools like phpMyAdmin (MySQL/MariaDB only) or pgAdmin (PostgreSQL only).
Is Adminer safe to expose to the internet?
Not without a reverse proxy with authentication. Adminer itself has a login screen, but it authenticates against the database server directly — meaning anyone can attempt to log into your database through the Adminer UI. Always put it behind a reverse proxy with an additional authentication layer (basic auth, Authelia, or IP whitelisting) for any internet-facing deployment.
How does Adminer compare to phpMyAdmin?
Adminer is a single PHP file (~500 KB) supporting multiple database types. phpMyAdmin is a larger application (~70 MB) focused exclusively on MySQL/MariaDB with more advanced features like query profiling, visual query builder, and detailed server monitoring. For quick database tasks across multiple database types, Adminer wins. For deep MySQL administration, phpMyAdmin offers more.
Can I use Adminer with Docker containers?
Yes, and it’s the most common use case for self-hosters. Connect Adminer to any database container on the same Docker network using the service name as the hostname. For example, if your PostgreSQL container is named postgres, enter postgres as the server in Adminer’s login form, along with the database credentials.
Does Adminer support importing and exporting databases?
Yes. Adminer can export databases and tables in SQL, CSV, or TSV format. Import supports SQL files up to the PHP upload limit (default 2 MB in the Docker image — increase with upload_max_filesize and post_max_size PHP settings). For very large databases, use pg_dump/mysqldump from the command line instead.
Can I customize the Adminer interface?
Yes. Adminer supports themes via CSS and plugins via PHP. The Docker image includes the default theme, but you can mount a custom CSS file or use the Adminer Editor variant for a simplified, table-focused interface designed for less technical users.
Related
Get self-hosting tips in your inbox
Get the Docker Compose configs, hardware picks, and setup shortcuts we don't put in articles. Weekly. No spam.
Comments