Deploy PHP in minutes

For plain PHP (no framework), deploy on Darmi Cloud with the Dockerfile preset. The Dockerfile below runs Apache with mod_php and serves your app behind automatic HTTPS. Using Laravel? See the dedicated Laravel guide instead.

Deploy from GitHub Automatic HTTPS subdomain Live build & runtime logs
Step by step

How to deploy PHP

Darmi Cloud doesn't have a dedicated PHP preset yet — but the Dockerfile preset gets you deployed just as fast.

  1. 1

    Add a Dockerfile to your repo

    Commit the Dockerfile below to the root of your PHP repository. Darmi Cloud will build the image from it.

  2. 2

    Sign in with GitHub

    Open darmicloud.tech and sign in with GitHub (or Google). On first sign-in you grant read access so the deploy worker can clone your repositories.

  3. 3

    Import your repository

    Click New Project, pick your PHP repository, and choose the branch to deploy — the default branch is preselected.

  4. 4

    Select the Dockerfile preset

    Choose the Dockerfile preset so Darmi Cloud builds and runs the image from your committed Dockerfile. Set the container port to 80.

  5. 5

    Add environment variables

    Add any environment variables your app needs (database URLs, API keys, secrets). Mark sensitive values as secrets — they are injected into the container and hidden in the UI afterwards.

  6. 6

    Deploy and watch it go live

    Click Deploy. Watch the live build and runtime logs, and your app goes live on an automatic HTTPS subdomain. Every push to your branch redeploys automatically.

Dockerfile for PHP

Copy this into a file named Dockerfile at the root of your repository.

# syntax=docker/dockerfile:1
FROM php:8.3-apache

# Install common extensions (adjust to your app's needs)
RUN docker-php-ext-install pdo pdo_mysql

COPY . /var/www/html/
EXPOSE 80

Tips for PHP on Darmi Cloud

  • Put your entry index.php at the repo root, or set a document root that points at your public directory.
  • Add the PHP extensions your app needs to the docker-php-ext-install line (for example pdo_pgsql, gd, zip).
  • If you use Laravel, follow the Laravel guide — it has a dedicated one-click preset.
FAQ

PHP deployment FAQ

Which preset do I use for plain PHP?

Choose the Dockerfile preset with the php:apache-based Dockerfile above. For Laravel specifically, use the dedicated Laravel preset instead.

How do I add PHP extensions?

Add them to the docker-php-ext-install line in your Dockerfile (for example docker-php-ext-install pdo_pgsql gd) and redeploy.

Can I use my own custom domain?

Yes. Connect an existing domain or buy one inside Darmi Cloud. DNS is configured automatically and every domain gets free SSL via Let's Encrypt.

Is there a free plan?

Yes. The Free plan deploys one project on an automatic HTTPS subdomain with auto-deploy on every push. Paid plans add custom domains, PR preview deployments and more projects.

Deploy other frameworks

Ready to deploy your PHP app?

Connect GitHub and ship in minutes — on a free HTTPS subdomain, or on your own custom domain.

Deploy PHP now