Using PHP / LAMP Stacks

This guide will walk you through a few settings necessary to make PHP / LAMP contents work out of the box.


There are two different stacks you may want to use:


The PHP stack comes with PHP 7.2 and Apache 2 pre-installed. You may want to use this stack instead of the full LAMP stack if you don't need MySQL, to keep extra resources (like memory, which is limited to 256MB by default) allocated to Apache.


If you need MySQL, no worries! Just choose the LAMP stack. This stack comes with everything in the PHP stack plus MySQL 5.7. You can always increase the sandbox size.

Directory Configuration

The default directory persisted and accessible to the user is /home/nt-user/workspace . Apache loads files from /var/www/html , so you'll want to change the default (first) tracked directory to this one. You'll also want to set the chmod value to be applied to files created in the code editor to +x so that Apache can execute them (since they're technically created by the nt-user user).

You can configure this by clicking Settings Gear > Advanced:

The first directory watched is the one that will load in the code editor.

Web Browser Configuration

By default, the web browser's starting URL is localhost:8080 (the static file proxy running in /home/nt-user/workspace ). Apache runs on port 80, which you can set as the default by clicking the blue sliders at the bottom corner of the web browser component, and then setting the starting URL to {{localhost:80}}/{{entry}} :

Database Persistence

By default, only tracked directories are backed up, which doesn't include the database values.

If database persistence is important to you, please contact us to learn more about the currently available and upcoming options.