Skip to content

Feature: Hetzner Servers - Add support for Hetzner firewalls and internal networks when creating the Server#9646

Open
JanThiel wants to merge 1 commit intocoollabsio:nextfrom
JanThiel:feat/hetzner-firewalls-and-internal-networks
Open

Feature: Hetzner Servers - Add support for Hetzner firewalls and internal networks when creating the Server#9646
JanThiel wants to merge 1 commit intocoollabsio:nextfrom
JanThiel:feat/hetzner-firewalls-and-internal-networks

Conversation

@JanThiel
Copy link
Copy Markdown

Changes

Creating a Hetzner Server is straight forward in Coolify. Yet it lacks some essential features of the Hetzner Cloud. Primarily the ability to assign Firewalls and Internal Networks at the time of server creation. To do that you have to switch to the Hetzner console afterwards and assign them manually.
This PR introduces these two options to the Coolify Create Hetzner Server Dialog. You can select as many pre-existing firewalls and internal networks that are assigned to the Server at Hetzner when creating it.

Issues

Category

  • Bug fix
  • Improvement
  • New feature
  • Adding new one click service
  • Fixing or updating existing one click service

Preview

Hetzner Server Create new options in Coolify:
Bildschirmfoto 2026-04-17 um 18 19 08

Proof at Hetzner Console:
Screenshot 2026-04-17 181631
Screenshot 2026-04-17 181717

AI Assistance

  • AI was NOT used to create this PR
  • AI was used (please describe below)

If AI was used:

  • Tools used: Codex with GPT-5.4 "High" Reasoning on an OpenAI "Plus" paid account with exclusion of data usage enabled for trainings.
  • How extensively:
    • Codex was instructed to add the ability to select and use the Hetzner Firewall + Internal Network via API and
    • to extend the UI based on the existing patterns for the SSH Keys.

All code written by AI was manually reviewed and locally tested using PHPStorm.

Testing

Hetzner:

  • Server -> Add -> Hetzner
  • Select a valid Token for a Hetzner Cloud Project with a Firewall and Internal Networks present
  • Checked for all relevant items being present in the Select in the Coolify UI
  • Selected a number of both and verified they were assigned to the new Server using the Hetzner Console UI

Contributor Agreement

Important

  • I have read and understood the contributor guidelines. If I have failed to follow any guideline, I understand that this PR may be closed without review.
  • I have searched existing issues and pull requests (including closed ones) to ensure this isn't a duplicate.
  • I have tested all the changes thoroughly with a local development instance of Coolify and I am confident that they will work as expected when a maintainer tests them.

Copilot AI review requested due to automatic review settings April 19, 2026 04:17
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds first-class support for selecting existing Hetzner Firewalls and Internal Networks during Hetzner server creation in Coolify (UI + API), addressing #9619.

Changes:

  • Extend Hetzner server creation flow (Livewire) to load, display, and submit selected firewall/network IDs.
  • Add new API endpoints to fetch Hetzner firewalls and networks for a given Hetzner cloud provider token.
  • Expand Hetzner server creation API to accept hetzner_firewall_ids and hetzner_network_ids and forward them to Hetzner.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/Feature/HetznerServerCreationTest.php Adds a Livewire-oriented test ensuring firewalls/networks are loaded (plus a small dedupe test).
tests/Feature/HetznerApiTest.php Adds API coverage for new GET endpoints and asserts firewalls/networks are passed to Hetzner on create.
routes/api.php Registers new Hetzner read endpoints for firewalls and networks.
resources/views/livewire/server/new/by-hetzner.blade.php Adds multi-select UI controls for Firewalls and Internal Networks.
app/Services/HetznerService.php Adds getFirewalls() and getNetworks() wrappers.
app/Livewire/Server/New/ByHetzner.php Loads firewalls/networks, filters location-compatible networks, and passes IDs to Hetzner create-server payload.
app/Http/Controllers/Api/HetznerController.php Implements /hetzner/firewalls + /hetzner/networks and forwards firewall/network IDs during server creation.

Comment thread tests/Feature/HetznerServerCreationTest.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants