To deploy Laravel to Hetzner, create a Hetzner Cloud server, connect it to a deploy tool over SSH, and deploy your repo from there. With CloudPloy that is three steps: a fresh Ubuntu server on Hetzner, one SSH connection, and a deploy your AI agent can run for you. You skip installing PHP, Nginx and a certificate by hand.

Hetzner isn’t a built-in CloudPloy integration. It works because CloudPloy accepts any server you can reach over SSH, so the Hetzner side is plain: you create the machine and you pay Hetzner for it.

How do I deploy Laravel to Hetzner?

  1. Create a fresh server in the Hetzner Cloud Console, with your SSH key added.
  2. Connect that server to CloudPloy over SSH.
  3. Connect your agent to CloudPloy over MCP and ask it to deploy the repo with the Laravel preset.
  4. Add your domain and let CloudPloy issue the certificate.

The rest of this guide walks through each step.

What do I need before I start?

  • A CloudPloy account. The Free plan covers one server and one app, with a hard cap of 2 vCPU and 2 GB RAM.
  • A Laravel repo on GitHub, GitLab or Bitbucket.
  • A Hetzner Cloud account.
  • An AI agent that supports MCP, such as Claude Code or Cursor.

How do I create the Hetzner server?

In the Hetzner Console, open your project, choose Servers, then Add server. Four choices matter here, and the Hetzner docs describe each field:

  • Image: pick plain Ubuntu 22.04, 24.04 or 26.04 LTS, or Debian 12 or newer. CloudPloy supports those, per its existing-server docs. Don’t pick one of Hetzner’s “Apps” images. Those preinstall software, and CloudPloy needs a server with nothing on it.
  • Type: choose a size your CloudPloy plan allows. CloudPloy checks vCPU and memory before it installs anything.
  • SSH key: add your public key now. Hetzner says you can’t add an SSH key through the Console after the server exists.
  • Networking: keep a public IPv4 address, since CloudPloy connects to the server over the internet.

If you attach a Hetzner Cloud Firewall, allow ports 80 and 443 plus your SSH port. Otherwise the site won’t load, even after a good deploy.

Copy the server’s IP address when it is ready.

How do I connect the server to CloudPloy?

In CloudPloy, go to Servers, choose Add server, then Connect existing server. Enter a short lowercase name, the IP address, the SSH port (22 by default) and the SSH user, which must be root or have passwordless sudo. Confirm the server is fresh.

Then pick how CloudPloy signs in. The recommended way is to add the CloudPloy public key to that user’s ~/.ssh/authorized_keys and choose Connect. You can also paste a private key once; CloudPloy signs in, installs its own key and discards yours.

CloudPloy then runs its setup script. It creates the ploy user, installs Docker, and opens ports 80, 443 and your SSH port in the server’s firewall. The progress page shows each step. The full steps are in the docs.

How do I deploy the Laravel app from my agent?

Add the MCP server to your agent once. In Claude Code:

claude mcp add --transport http cloudploy https://brain.cloudploy.com/mcp

Sign in when the browser opens. Cursor, Codex and ChatGPT use the same address, and the Claude Code guide has the setup for each. Then ask in plain English:

Connect my GitHub account to CloudPloy, then create an app from my-org/my-laravel-app with the Laravel preset on my Hetzner server, and deploy it.

The agent returns a sign-in link for your Git provider, so you never paste a token into the chat. It creates the app, builds it with Nixpacks and deploys it. Releases switch with zero downtime.

Set your production settings the same way. Ask the agent to set APP_KEY, APP_ENV=production and your database variables with set_env_vars. Point the database variables at a database you run yourself. This guide doesn’t cover running one.

To redeploy on every push, ask the agent to turn on auto-deploy for main. If a release goes wrong, ask it to roll back.

How do I add a domain and HTTPS?

Ask the agent to add your domain. It returns the DNS record to create at your registrar, or creates it for you if you connected Cloudflare. Once the DNS is right, it provisions the SSL certificate. See the MCP permission docs for the full tool list.

How is this different from the manual route?

The official Hetzner community tutorial for Laravel was published on 2019-03-15. It has seven steps for Ubuntu 18.04 with Apache, MySQL and PHP 7.1. It’s still useful for seeing what a server needs, but those versions are old now. Here is how the two routes compare:

Manual on HetznerCloudPloy on Hetzner
ServerHetzner Cloud, you pick the imageHetzner Cloud, fresh Ubuntu or Debian
Web server and PHPYou install and patch themBuilt by Nixpacks
HTTPSYou set up certificates yourselfIssued by CloudPloy after you add a domain
DeploysA script or SSH session you maintainYour agent, or auto-deploy on push
Zero downtimeYou build it yourselfIncluded
CostHetzner server billHetzner server bill, plus a CloudPloy plan (Free, or $9.99 to $39 a month)

Once the app is live, the Laravel performance guide covers what to tune first. If you need a control panel with server-level tooling, see the best Laravel Forge alternatives. For a wider look at deploying Laravel by hand, read the complete Laravel deployment guide.

When is CloudPloy the wrong choice?

If you want to tune Nginx, PHP-FPM or the OS yourself, a manual setup or a panel that manages the stack on the server gives you more control. CloudPloy builds in containers and doesn’t hand you a server panel. It also doesn’t host your database. Free-tier users should check the 2 vCPU and 2 GB RAM cap against the app’s needs.

What does it cost?

Hetzner bills you for the server. CloudPloy has a Free plan for one server and one app, and paid plans from $9.99 to $39 a month. See the pricing page for what each plan includes.

FAQ

Can I deploy Laravel to Hetzner Cloud?

Yes. Create a fresh Ubuntu or Debian server in Hetzner Cloud, then connect it to CloudPloy over SSH and deploy with the Laravel preset. CloudPloy treats Hetzner as any other SSH server.

Does CloudPloy integrate with Hetzner directly?

No. You create the server in Hetzner yourself and connect it by IP address and SSH. CloudPloy doesn’t create or bill Hetzner servers for you.

Do I need Laravel Forge to use Hetzner?

No. Forge can link Hetzner as a server provider, but you can also deploy by hand, from a CI pipeline over SSH, or with a tool such as CloudPloy.

Can Claude Code or Cursor deploy my Laravel app to Hetzner?

Yes. Once the server is connected, any MCP client can create the app, set environment variables, deploy and roll back through CloudPloy’s MCP server.

What size Hetzner server do I need?

It depends on your app. Pick a size your CloudPloy plan allows. The Free plan caps a server at 2 vCPU and 2 GB RAM. You can move up in the Hetzner Console later.

Can I use an existing Hetzner server?

Only if it is fresh. A web server, database or control panel already on the machine can conflict with what CloudPloy installs, so CloudPloy asks you to confirm the server is clean before it connects.

Ready to try it? Sign up, connect your Hetzner server, and add the MCP server to your agent.

Updated November 23, 2026.