▶️Hetzner with Coolify (Docker)
How to deploy your Webstudio Project to Hetzner using Coolify.
In this tutorial, you will learn how to export your Webstudio Project and use Coolify to deploy it to Hetzner.
Prerequisites
1. Create a GitHub repository
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.
2. Export Webstudio Project
Use the CLI to export your Project and select the "Docker" option.
3. Push to GitHub
Now that the site code is local, push it to GitHub.
4. Setup Hetzner Server
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.
5. Configure Coolify to use your server
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.
6. Setup a Project on Coolify
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.
7. Sync, build, and push new changes
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.
Last updated
Was this helpful?