Deploy phpMyAdmin
phpMyAdmin web GUI for MySQL and MariaDB: browse tables and run SQL.
phpMyAdmin
Just deployed
Deploy and Host phpMyAdmin on Railway
![]()
phpMyAdmin is the classic web interface for MySQL and MariaDB, used by millions of developers and bundled with almost every PHP hosting panel for over 25 years. This template runs phpMyAdmin on Railway with a public HTTPS URL and a login screen that can connect to any MySQL or MariaDB server, including databases on Railway's private network. Desktop clients like TablePlus cost $99 per device and need setup on every machine. phpMyAdmin on Railway costs about $1–3/month and works from any browser, for your whole team.
What This Template Deploys
| Service | Purpose |
|---|---|
| phpMyAdmin | The LinuxServer.io phpMyAdmin image (currently phpMyAdmin 5.2.3) on port 80, served over HTTPS on your Railway domain. |
| Arbitrary server login | PMA_ARBITRARY=1 adds a Server field to the login screen, so you can sign in to any MySQL or MariaDB host you can reach. |
It's a single stateless service with no database of its own, so it deploys in seconds. Add it to a project that already has MySQL or MariaDB, and it can reach them over Railway's private network without exposing the database to the internet.
About Hosting phpMyAdmin
Railway's built-in Data panel is great for quick looks, but day-to-day database work (bulk edits, imports, exports, user management, running long SQL scripts) is easier in a full client. Installing a desktop tool on every teammate's machine means licences, config and sharing database credentials around. A shared web tool is often simpler.
phpMyAdmin has been the default MySQL admin tool on shared hosting for decades, so most developers already know it. It covers it all in the browser: browse and edit rows, design tables and indexes, run SQL with syntax highlighting, import SQL or CSV files, export backups, and manage users and privileges. On Railway you get HTTPS automatically. Because it runs in the same project as your database, it can connect through the private network (mysql.railway.internal:3306) instead of a public TCP proxy.
Keep it locked down. The login page is public, and your database credentials are what protect it. Use strong database passwords. To restrict phpMyAdmin to one server, add PMA_HOST with your database's private hostname and remove PMA_ARBITRARY. You can also delete the public domain when you're not using it and add it back when you need it.
Typical cost: ~$1–3/month on Railway, since phpMyAdmin only uses resources while someone is working in it. A TablePlus licence is $99 per device.
Deploy phpMyAdmin in Under 2 Minutes
- Click Deploy on Railway, ideally into the project that holds your MySQL or MariaDB service. It starts in under a minute.
- Open your Railway URL to reach the phpMyAdmin login screen.
- In Server, enter your database's private hostname, for example
mysql.railway.internal, or a public host and port. - Enter the database username and password (for Railway MySQL,
MYSQLUSERandMYSQLPASSWORD). - Browse tables, run SQL, import data or export a backup.
No desktop installs. No per-seat licences. No public database port needed.
Common Use Cases
- Web GUI for Railway MySQL. Manage your Railway database from the browser over the private network.
- Shared admin tool for teams. One URL for everyone, instead of a desktop client licence per person.
- Data imports. Load SQL dumps and CSV files into tables without the command line.
- Backups and migrations. Export databases or single tables as SQL, CSV or JSON.
- User and privilege management. Create MySQL users and grant exactly the access each app needs.
- WordPress and PHP app databases. Inspect and fix WordPress, Laravel or WooCommerce data directly.
- Schema design. Create tables, indexes and foreign keys with a visual editor.
- Query debugging. Run and EXPLAIN slow queries, then add the right index.
- Client support. Give a freelancer or client temporary, scoped access to one database without sharing your Railway account.
- Teaching and workshops. A ready-made SQL playground that students open in the browser, with nothing to install.
Configuration
| Variable | Required | Description |
|---|---|---|
PMA_ARBITRARY | ✅ Set | 1. The login screen asks for a server, so you can connect to any MySQL or MariaDB host. |
PORT | ✅ Set | 80, the port Railway routes your domain to. |
PMA_HOST | Optional | Add it to lock phpMyAdmin to one server, such as mysql.railway.internal. |
PMA_PORT | Optional | The database port, if it isn't 3306. |
UPLOAD_LIMIT | Optional | Raise the import size limit for large SQL dumps, for example 256M. |
Finding your database's private hostname. Open your MySQL or MariaDB service in Railway and look for MYSQLHOST or the private networking address ending in .railway.internal. Use that as the Server on the login screen. Both services must be in the same project and environment.
Importing a large SQL dump. phpMyAdmin's upload limit depends on PHP settings. Set UPLOAD_LIMIT (for example 512M) and redeploy before importing big files. For multi-gigabyte dumps, the mysql command line over a TCP proxy is faster.
Creating a read-only user for analysts. Under User accounts, Add user account, create a user, then grant only SELECT on the databases they need. Share those credentials instead of the root password, so nobody can change data by accident.
Connecting to a database outside Railway? Enter its public host and port in the Server field. Make sure that database allows connections from Railway's IP range and uses TLS where possible.
phpMyAdmin on Railway vs. Alternatives
| phpMyAdmin on Railway | Adminer | TablePlus | DBeaver Community | |
|---|---|---|---|---|
| Monthly cost | ~$1–3 usage | Free (you host it) | $99 one-time per device | Free |
| Self-hosted | ✅ Yes | ✅ Yes | ❌ Desktop app | ❌ Desktop app |
| Runs in a browser | ✅ Yes | ✅ Yes | ❌ No | ❌ No |
| Shared by the whole team | ✅ One URL | ✅ One URL | ❌ Licence per device | ⚠️ Installed per machine |
| Reach Railway private network | ✅ Yes | ✅ If hosted on Railway | ❌ Needs public proxy | ❌ Needs public proxy |
| Import, export and user management | ✅ Full | ✅ Basic | ✅ Full | ✅ Full |
| License | ✅ GPL-2.0 | ✅ Apache-2.0 or GPL-2.0 | ❌ Proprietary | ✅ Apache-2.0 |
Dependencies for phpMyAdmin Hosting
- Railway account. The Hobby plan ($5/month including $5 of usage) is plenty.
- A MySQL or MariaDB database to manage, on Railway or anywhere reachable.
- Database credentials with the privileges you need.
Deployment Dependencies
- phpMyAdmin Documentation: features and configuration
- phpMyAdmin website: releases and security notices
- LinuxServer.io phpMyAdmin image: image variables
- Railway Private Networking: connecting services internally
Implementation Details
The LinuxServer.io image runs phpMyAdmin on nginx and PHP-FPM, and the Railway domain routes to port 80. The service has no volume. That keeps it stateless: redeploys pull the latest image with the newest phpMyAdmin security fixes. phpMyAdmin's own UI preferences reset on redeploy, but your databases are never stored here and are never affected.
To pin a version, set the image tag in the service settings (for example linuxserver/phpmyadmin:5.2.3). Watch phpMyAdmin's security announcements and redeploy to update.
Frequently Asked Questions
What is phpMyAdmin? A free, open-source web app for managing MySQL and MariaDB databases: browsing data, running SQL, importing and exporting, and managing users and privileges.
How much does it cost compared to TablePlus or other paid clients? About $1–3/month on Railway for everyone on your team. TablePlus is $99 per device, and DBeaver Community is free but has to be installed on each computer.
Why can't phpMyAdmin connect to my Railway MySQL database?
Use the private hostname (for example mysql.railway.internal) and port 3306, and make sure both services are in the same project and environment. Check the user and password from the MySQL service's variables.
Does phpMyAdmin store my data? No. It only connects to your databases. Nothing is stored in the phpMyAdmin service, so redeploying it never affects your data.
Is a public phpMyAdmin safe?
It's as safe as your database credentials. Use strong passwords, set PMA_HOST to limit it to one server, and remove the public domain when you're not using it.
Does it work with MariaDB and databases outside Railway? It works with MySQL 5.5 and newer and with MariaDB. For external hosts, enter their public hostname and port. Some hosts require TLS settings or allow-lists.
Why Deploy and Host phpMyAdmin on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying phpMyAdmin on Railway, you get a shared, browser-based admin panel for your MySQL and MariaDB databases that connects over the private network, for a dollar or two a month.
Template Content
phpMyAdmin
linuxserver/phpmyadmin