Hetzner with Coolify (Docker)
How to deploy your Website Project to Hetzner using Coolify.
Last updated
Was this helpful?
How to deploy your Website Project to Hetzner using Coolify.
Last updated
Was this helpful?
In this tutorial, you will learn how to export your Webstudio Project and use Coolify to deploy it to Hetzner.
Coolify is a PaaS that makes it easy to deploy and manage applications on your own server, giving you control over your infrastructure without the complexity. You can self-host Coolify or use their Cloud.
Create a repository where you will add the Webstudio Project code in the following steps.
Be sure to clone the repository to your local machine.
Use the CLI to export your Project and select the "Docker" option.
Now that the site code is local, push it to GitHub.
You do not need to install dependencies.
Create a new server.
Select your preferred region.
Select the Ubuntu image with a version that is supported by Docker.
Select the type; a shared CPU is sufficient and the minimum recommended RAM is 2 GB.
Add an IPv4.
All other defaults suffice, though you can optionally modify them.
Click "Create and Buy Now". Wait as your server is provisioned then copy the IPv4 address.
Create a Coolify account or log in to your existing account.
Navigate to the "Servers" tab.
Add a new server and provide your server’s IP address then click “Continue”.
Click “Validate Server & Install Docker Engine“ and Coolify will install all necessary components on your server automatically. Once completed, you should see a green “Proxy Running” status.
Go to Projects and create a new one.
Add a Resource to the project.
Select the source of your code, likely a private repository.
Add a GitHub app and provide it access to your repository with the site.
Change the Build Pack to Dockerfile.
Click Deploy and wait several minutes while it deploys. You can click “Show debug logs” to see more details.
If all goes well, you should see “Deployment is Finished.”
If the deployment fails, one possibility is that the server does not have enough resources.
(Optional) If you are loading images from third-party domains, add them to your environment variables with the key DOMAINS
and a comma-separated list of the third-party domains.
At the top, there is a "links" button which will take you to the live site.
When you are ready to publish your latest changes again, follow these steps:
Click "Publish" in the builder (even though you aren't publishing to the cloud, it's necessary to generate the latest build data).
Run webstudio sync
Run webstudio build --template docker
Push the changes to GitHub
Coolify will automatically detect the changes and trigger a new deployment.
Now, you should have a website built on Webstudio that is hosted on Hetzner using Coolify, giving you full control over your infrastructure.