163 Commits
Author SHA1 Message Date
Andras BacsaiandClaude Opus 5.5 fae2752346 fix(databases): show custom configuration only to admins (#12353)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 22:34:47 +01:00
Andras Bacsai 1242353511 Merge remote-tracking branch 'origin/main' 2026-10-27 17:24:19 +01:00
Andras Bacsai bb1fada600 fix(clone): replace the clone suffix instead of adding one for each clone
Cloning a clone added another "-clone-<id>" to the name, so after about
seven clones the name was longer than 255 characters and the insert failed.

Closes #9976
2026-10-27 17:06:52 +01:00
Andras BacsaiandClaude Opus 5.5 1082b598c4 fix(api): return logs of stopped containers like the UI
The log endpoints found containers with `docker ps -a`, then rejected
every container that was not running. Remove that check, so failed
deployments can be diagnosed through the API. Without service_name,
the application endpoint prefers a running container. The old error
stays when no container exists.

Closes #9972

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 17:03:52 +01:00
Andras Bacsai e78659dfed fix(api): preserve omitted env var values and flags on PATCH (#12240) 2026-10-27 17:00:56 +01:00
Andras BacsaiandClaude Opus 5.5 80df5431dc fix(api): document database and resource list responses in OpenAPI
Add a Database schema and use it for GET /databases and
GET /databases/{uuid}, type the GET /resources items, and stop
requiring both environment_name and environment_uuid on create
endpoints. KeyDB now returns database_type like the other engines.

Closes #10449

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 14:42:29 +01:00
Andras Bacsai 1a2a5362ad fix(security): secure remote command secrets and clone volume data 2026-10-27 09:47:18 +01:00
Andras Bacsai 435645ce15 fix(api): write file storage content to server on PATCH (#12248) 2026-10-26 12:54:11 +01:00
Andras Bacsai 0c9f89fafd fix(api): hide DB URLs in create responses without sensitive access (#12297) 2026-10-24 22:45:39 +02:00
Andras BacsaiandClaude Opus 5.5 d8d33c69ce fix(auth): hide locked and admin-only secrets in forms, compose, and the API
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 21:46:58 +02:00
Andras Bacsai e0b6ac1121 fix(api): accept settings that the UI can change but the API rejected
- Applications: is_container_label_readonly_enabled (turning it back on
  regenerates labels), include_coolify_default_variables, and
  dockerfile_target_build on create.
- Databases: save is_log_drain_enabled on update instead of dropping it,
  include_coolify_default_variables, and disable_local_backup on backups
  (only with save_s3).
- Services: include_coolify_default_variables, and redirect on service
  applications (www/non-www needs both hosts).
- Servers: wildcard_domain, server_timezone,
  backup_compression_cpu_percentage, and the proxy error page.

Closes #11092
2026-10-24 00:40:19 +02:00
Andras BacsaiandClaude Opus 5.5 fdb77415a0 fix(api): scope database backup endpoints to the database type
Closes #12279

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 22:21:01 +02:00
Andras BacsaiandClaude Opus 5.5 a82d32c946 chore: merge main into release/v4.5
Resolve conflicts between main's security fixes and v4.5 features:
- Keep v4.5 features (log redaction, multi-S3 backups, transfer flow,
  scheduled task modal, sidebar) and port main's fixes into them.
- Reuse RequiresDeployAbility for the Hostinger create endpoint.
- Align MCP tool abilities and descriptions with main's new deploy
  requirements, and use deploy tokens in the affected MCP tests.
- Drop the duplicate DockerCleanupJobTest helper and tests, and the
  exportBundle test for a method v4.5 removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 10:00:05 +02:00
Andras Bacsai 7fe40f4cf6 fix(api): require deploy ability for server side effects
Require deploy permission for API changes that trigger server side effects, including resource deletion, storage access, provider operations, and database imports. Also escape Docker cleanup filters and sanitize log drain server names.
2026-10-19 09:07:42 +02:00
e3d4411ff2 chore: merge main into release/v4.5 (#12192)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Furox <177975472+Furox-Art@users.noreply.github.com>
Co-authored-by: johandenhollander <johan.den.hollander@finalist.nl>
Co-authored-by: João Cruz <161638790+SrJooJ@users.noreply.github.com>
Co-authored-by: Saim Hashmi <hashmisaim037@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-18 23:43:20 +02:00
Andras Bacsai 4294856685 fix(api): apply redis_password and instant_deploy on database update 2026-10-15 23:05:19 +02:00
Andras Bacsai 448dc8ea0a feat(logging): strengthen secret redaction and add admin controls (#12151) 2026-10-13 20:43:19 +02:00
Andras BacsaiandClaude Opus 5.5 d4d8bba514 docs(backups): add multi-destination S3 planning notes (#11789)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:10:34 +02:00
Andras Bacsai 055f5c0622 fix(api): accept numeric resource limits when creating databases 2026-10-06 12:56:50 +02:00
Andras Bacsai 86d84e21c0 perf(databases): load Redis-family passwords once for database lists
Connection URLs of KeyDB, Dragonfly and Redis queried their password
variables once per database, so the database list API ran extra queries
for every database.

- Read REDIS_PASSWORD and REDIS_USERNAME from the loaded relation
- Load the variables once per type in the database list and the
  environment details API
2026-10-06 06:59:22 +02:00
Andras Bacsai edfaa5c381 fix(api): enforce validation and deploy ability on database create
The create endpoint checked $validator->failed(), which is always empty,
so its validation rules never ran. The start step also read
instant_deploy loosely, so a write-only token could send "false" and
still start the database.

- Use $validator->fails() so invalid input returns 422
- Read instant_deploy with $request->boolean() for the gate and the start
2026-10-05 17:04:05 +02:00
Andras Bacsai 35c38b1dde fix(database): reject blocked starts before queueing operations
Check start prerequisites in database and deploy APIs and MCP controls.
Return HTTP 422 for blocked API starts and restarts. Show restart notices
and open UI logs only after an operation is queued.

Add API regression tests for blocked ClickHouse starts and restarts.
2026-10-05 14:59:59 +02:00
Andras Bacsai 88efc0716e fix: enforce resource team isolation and preserve ClickHouse data
Scope resource permissions and related records to the owning team across
team switches, cloning, deployments, and resource operations.

Merge ClickHouse volume mounts, preserve anonymous data volumes on stop,
and require adopting current data before starting or restarting.

Fix file storage deletion checks and add regression coverage.
2026-10-05 14:23:04 +02:00
Andras Bacsai 4227ec6ebf fix(storage): require deploy permission for external host writes
Require deploy or root token access when creating managed mounts outside
resource directories or changing their file contents through the API.

Synchronize KeyDB and Dragonfly passwords with local and shared
REDIS_PASSWORD values while preserving secret manager resolution.
2026-10-05 12:03:37 +02:00
Andras Bacsai 554bd354bf fix: support host storage paths and clean up cancelled deployments
Allow validated host file and directory mounts outside resource directories
while protecting external paths from deletion.

Clean up cancelled deployment containers and clear tracked process IDs.
Preserve legacy KeyDB and Dragonfly password parsing, accept server backup
paths without extension restrictions, and allow Compose variable proxy ports.
2026-10-05 11:08:52 +02:00
Andras Bacsai 3575234b38 fix(docker-cleanup): clean after a resource stop only when the disk needs it
A stop or delete no longer queues a full cleanup each time. It skips the
cleanup when one finished on the server in the last hour, and the queued
run only cleans when disk usage is at or above the server cleanup
threshold. The docker_cleanup API flag keeps its default of true.
2026-10-03 21:25:17 +02:00
Andras BacsaiandClaude Opus 5.5 0b581454cf fix(api): match database backup configs by database type and id
Different database types can share an id, so the database list showed
backup configs of other databases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 16:01:00 +02:00
Andras Bacsai fed15ff1b0 fix(backups): back up every SQLite file unless the user picks some
New SQLite backup schedules copied the database's file list at creation,
so files added later were never backed up. Schedules created in the UI
or the API without an explicit file list now store none, and the backup
job resolves the current files at run time. An explicit choice is still
stored. Existing schedules are not changed.
2026-10-01 20:31:00 +02:00
Andras Bacsai 99c840922c fix(notifications): throttle repeated notifications per resource
High disk usage notifications were sent every ~10 minutes on Coolify Cloud
because the cache rate limiter did not hold across Sentinel-triggered checks.

- Add a notification_throttles table and NotificationThrottle helper that
  atomically records when a notification was sent for a resource.
- Add the ThrottledNotification contract; Team::notify() skips a throttled
  notification that was already sent within its interval.
- High disk usage: configurable per-server interval
  (server_disk_usage_notification_interval_hours, default 24h) in
  Server > Advanced and the servers API.
- Container restarted (coolify-proxy, database TCP proxy): at most one
  notification per hour per server/database during a restart loop.
- Move the unreachable and missing-backup markers into the new table and
  migrate existing data (servers.unreachable_notification_sent and
  scheduled_database_backups.missing_backup_notification_sent_at).
- Regenerate OpenAPI files.
2026-09-29 11:29:39 +02:00
Andras Bacsai af983a29d8 refactor(docker): identify containers by resource UUID instead of numeric id
Container ownership labels now use UUIDs: coolify.applicationUuid,
coolify.serviceUuid, coolify.service.subUuid and coolify.databaseUuid.
Numeric ids differ between Coolify instances, so after a server transfer
the target could not find existing containers: redeploys left the old
container running and service statuses were wrong.

Containers are matched by UUID label first, then by the compose project
(Swarm: stack namespace), which is the resource UUID since July 2024, and
last by the older numeric id label. Existing containers keep working
without a redeploy and get the UUID labels on the next deploy or restart.
2026-09-29 09:57:56 +02:00
Andras BacsaiandClaude Opus 5.5 739d9e9d23 fix(permissions): show logs and task output only to admins and read:sensitive tokens
Container logs and scheduled-task commands and output are now shown only to
users who can edit the resource. The API returns them only to tokens with
the read:sensitive or root ability, the same as the MCP tools.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 13:20:59 +02:00
peaklabs-dev 2aef5ab459 feat(database): let docker compose applications mount the sqlite volume 2026-09-27 18:00:34 +02:00
peaklabs-dev a52cafb2db Merge branch 'main' into feat/add-sqlite-database 2026-09-26 23:22:49 +02:00
Andras BacsaiandClaude Opus 5.5 8246492bb9 fix(databases): stop and clean up interrupted or stale imports
- Imports store their cleanup data (names and paths, no credentials)
  on the activity. When Coolify fails an import after a restart or as
  stale, it queues a stop of the restore inside the database container
  (only processes of that operation and their children, bottom-up so
  the database server is not affected) and the normal cleanup.
- The cleanup runs once per import, and a stopped CoolifyTask does
  not run again when the queue retries it.
- The stop message stays on the activity: RunRemoteProcess saves the
  process id at start from the stored properties and keeps a stop
  status at the end, and CoolifyTask::failed() keeps the message.
- Regenerate the OpenAPI spec (409 for database start, restart, and
  import, plus earlier API changes that were missing).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 22:18:17 +02:00
🏔️ Peak edcb884266 Merge branch 'main' into feat/add-sqlite-database 2026-09-26 21:32:43 +02:00
Andras BacsaiandClaude Opus 5.5 fbfe342f89 fix(databases): reserve start and restart atomically
Two parallel start requests both passed the in-progress check and got
200, because the start activity is created later by the queued action.
A per-database reservation (Cache::add, 600 s) is now taken before the
check, so the second request gets 409. The action releases it when it
creates its activity, skips, or fails. Restart, import, the deploy
API, MCP, and Livewire use the same reservation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 21:19:14 +02:00
peaklabs-dev 0687d1f55f feat(database): unlink applications from sqlite and protect connected volumes 2026-09-26 20:39:07 +02:00
Andras BacsaiandClaude Opus 5.5 a8117f9114 fix(databases): unblock interrupted imports and prevent double starts
- A Coolify restart now fails queued or running database imports, so
  they no longer block all later imports with 409.
- An import without progress for the SSH command timeout plus 30
  minutes (at least 2 hours) is stale and no longer blocks.
- The import sets its operation property when the activity is created,
  so a worker cannot save the activity without it.
- Start and restart refuse a second operation while a start, restart,
  or import is in progress, in the UI, the API (409), and actions.
- DatabaseStartJob runs only while its activity is still queued and
  the newest one, and holds a lock per database during the commands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 10:40:53 +02:00
peaklabs-dev 5261785c69 Merge remote-tracking branch 'origin/next' into feat/add-sqlite-database 2026-09-25 22:47:29 +02:00
peaklabs-dev 032ea6498c feat(api): support sqlite databases in the databases API 2026-09-24 22:15:08 +02:00
Andras Bacsai 87685d1e09 chore: align control-plane behavior 2026-09-24 15:46:04 +02:00
Andras Bacsai 40b31b4a57 Align API deployment permissions 2026-09-24 08:19:02 +02:00
Andras Bacsai 99dd634ba3 Improve file storage handling 2026-09-22 21:13:39 +02:00
Andras Bacsai ebfd4d0c1c Merge remote-tracking branch 'origin/main' into pr-11443-next
# Conflicts:
#	app/Actions/Server/StartSentinel.php
#	app/Livewire/Server/Sentinel.php
#	resources/views/livewire/project/shared/storages/all.blade.php
#	resources/views/livewire/project/shared/storages/show.blade.php
2026-09-18 12:00:04 +02:00
Andras Bacsai 128939b062 fix(storages): remove host path from storage configuration 2026-09-16 14:24:52 +02:00
Andras Bacsai 2c1744fbd2 Merge remote-tracking branch 'origin/next' into pr-11784-automation/sync-main-to-next 2026-09-14 13:30:17 +02:00
Andras Bacsai 7d11bc92f7 feat(logs): accept all for log lines and keep -1
API log endpoints and the GetLogs UI now treat `all` as unbounded
output, with `-1` remaining as a compatibility alias. MCP still
falls back to a positive default. Traefik version checks run from
CheckForUpdatesJob instead of a weekly schedule.
2026-09-13 15:25:20 +02:00
Andras Bacsai b5ca99c69d fix(api): return invalid token for database import endpoints
Import upload/create/show now return invalidTokenResponse() when the
access token has no team, matching the rest of the database API.
2026-09-09 13:09:31 +02:00
Andras Bacsai ab3b3926aa feat: add database import API and Cloudflare DNS management
Queue database imports from upload, S3, or server paths via REST, and
manage Cloudflare DNS records from integration tokens and domain UIs.
2026-09-09 11:14:22 +02:00
Andras Bacsai 0b462f6a58 feat(backups): alert when scheduled backups are missing (#11433) 2026-09-07 14:09:42 +02:00