NEW Bare Metal Servers with 20G Dedicated Unmetered Bandwidth 20G Dedicated Unmetered Servers Read more STATUS

Install a LAMP Stack in One Click

Sep 28, 2026 3 min read

LAMP is the classic stack: Apache, MySQL and PHP on one machine. It's the quickest way to host a traditional PHP site with its database right beside it. The MySQL root password is generated for you and kept in the machine's credential vault.

New or rebuilt machines only. LAMP can't be added to a machine you're already running. It installs during the next rebuild (cloud) or reinstall (bare metal), and both erase the disk first, so the machine comes back as a fresh Ubuntu system with LAMP on top. Use it on a new machine or one you're ready to wipe, and back up anything you want to keep first. To add LAMP to a server that already holds your data, install it by hand instead.

What gets installed

  • Apache with mod_php, enabled at boot.
  • MySQL server, enabled at boot, with a generated root password stored as LAMP — MySQL root password.
  • PHP with the MySQL extension.

Rebuild or reinstall with Ubuntu. The installer uses the mysql-server package, which Ubuntu provides.

The card lists 80, 443 and 3306. Apache answers on 80 right away; 443 needs a certificate first (see below). MySQL listens on localhost by default, so 3306 isn't reachable from outside until you change that.

Install it

On a cloud instance, open its Apps tab, click Install on next rebuild on the LAMP card, then rebuild with an Ubuntu image. On a bare-metal server it's Install on next reinstall, then a reinstall with the App: LAMP post-install script ticked. The App Library guide covers the details, the status you'll see, and what to do if it fails.

The LAMP card in the App Library on a cloud instance's Apps tab, with its Debian / Ubuntu label and the Install on next rebuild button
The card on the Apps tab. The label shows which operating system it needs.
After clicking Install on next rebuild: a message that LAMP is staged and the VM must be rebuilt to install it, and lamp listed as queued under Installs on this machine
Clicking the button only stages the app. The message tells you to rebuild and says the MySQL root password will be waiting in the credential vault, and names the operating system to pick.
The Rebuild tab: a notice that 1 staged app will install during this rebuild (lamp), above the Rebuild VM card warning that all data on the VM will be erased
The Rebuild tab lists the staged app above the warning that the rebuild erases the VM. Nothing is installed until you go ahead.

First steps once it's ready

Your site goes in /var/www/html. For the database, sign in with the root password from the vault and create a user for your site:

mysql -u root -p
CREATE DATABASE site;
CREATE USER 'site'@'localhost' IDENTIFIED BY 'choose-a-long-one';
GRANT ALL PRIVILEGES ON site.* TO 'site'@'localhost';

For HTTPS, point your domain at the server, then:

apt install certbot python3-certbot-apache
certbot --apache -d example.com

Questions we get

  • Where's the MySQL root password? In the Credentials vault on the machine's Apps tab.
  • Should I open 3306? Usually not. Keep MySQL local and let the site talk to it on the same machine. If something remote truly needs it, allow just that address in the firewall.
  • Want WordPress? Use the WordPress app instead; it sets this stack up with WordPress on top.

Still stuck?

Open a support ticket with the machine and paste the install log from the Apps tab if it failed. We can see the install from our side.

Built for production

Why teams stay with Netrouting

We connect you to the Internet using network engineers (and not order takers) and hardware and infrastructure that is built to last, so we can pick up where you left off when you need us.

  • Expert-Level Support Our staff is available 24 hours a day, 7 days a week to handle network administration and systems management issues as they occur.
  • Scalable Solutions Build whatever depth or breadth your infrastructure needs and then scale as required.
  • Enhanced Security Enable 2-factor authentication and also limit by IP address from the control panel to secure your account.
  • Cost-Efficient Infrastructure You will always receive the best value from your investment as you will be optimized for budget without any compromise on Quality.