arcane icon indicating copy to clipboard operation
arcane copied to clipboard

🐞 Bug: Arcane cannot redeploy itself when managing its own compose project

Open deqiying opened this issue 7 months ago • 3 comments

Bug Description

Arcane can restart itself, but cannot redeploy itself when it is managed as its own compose project.

On redeploy, Arcane detects the target as a compose-managed container and switches to project-based redeploy, then immediately shuts itself down and never comes back automatically. Manual docker compose up -d is required to recover.

Steps To Reproduce

Environment

  • Arcane version: v1.17.4
  • Install method: Docker Compose
  • Database: SQLite
  • Projects directory: /opt/docker/stacks
  • Arcane is included under the projects directory and is managed as its own compose project
  • Reverse proxy is used in front of Arcane, but this issue appears to be specifically about self-redeploy rather than proxy access

Compose setup

services:
  arcane:
    image: ghcr.io/getarcaneapp/arcane:1.17.4
    container_name: arcane
    restart: always
    ports:
      - "${ARCANE_PORT}:3552"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ${ARCANE_DATA_DIR}:/app/data
      - /opt/docker/stacks:/opt/docker/stacks
    environment:
      APP_URL: ${APP_URL}
      ENCRYPTION_KEY: ${ENCRYPTION_KEY}
      JWT_SECRET: ${JWT_SECRET}
      PUID: ${PUID}
      PGID: ${PGID}
      LOG_LEVEL: ${LOG_LEVEL}
      LOG_JSON: ${LOG_JSON}
      OIDC_ENABLED: ${OIDC_ENABLED}
      DATABASE_URL: ${DATABASE_URL}
      UI_CONFIGURATION_DISABLED: "true"
      PROJECTS_DIRECTORY: /opt/docker/stacks
      DISK_USAGE_PATH: /opt/docker/stacks
    networks:
      - apps
    healthcheck:
      test: ["CMD-SHELL", "curl -fsS http://127.0.0.1:3552/api/health || exit 1"]
      interval: 10s
      timeout: 5s
      retries: 3
      start_period: 10s

networks:
  apps:
    external: true
    name: apps

Steps to reproduce

  1. Install Arcane with Docker Compose
  2. Set the Projects Directory to /opt/docker/stacks
  3. Move the Arcane compose project itself into that directory (for example /opt/docker/stacks/arcane)
  4. Let Arcane discover and manage its own compose project
  5. Open the Arcane project page for the arcane service
  6. Click Redeploy

Observed logs

Sanitized logs:

arcane | {"level":"INFO","msg":"RedeployContainer: detected compose container, using project-based redeploy","project":"arcane","service":"arcane"}
arcane | {"level":"INFO","msg":"Received shutdown signal"}
arcane | {"level":"INFO","msg":"Received interrupt signal. Shutting down…"}
arcane | {"level":"INFO","msg":"Scheduler stopped"}
arcane | {"level":"ERROR","msg":"Server forced to shutdown","error":"context deadline exceeded"}
arcane | {"level":"ERROR","msg":"Failed to run Arcane","error":"failed to run services: context deadline exceeded"}

After that, Arcane is no longer available until I manually run:

docker compose up -d

Then Arcane starts normally again.

Additional related logs after manual recovery:

arcane | {"level":"INFO","msg":"Arcane is starting","version":"v1.17.4"}
arcane | {"level":"INFO","msg":"Resolved database migration state","provider":"sqlite","currentVersion":45,"requiredVersion":45,"dirty":false}
arcane | {"level":"INFO","msg":"Database schema is up to date","provider":"sqlite","migrationVersion":45,"dirty":false}
arcane | {"level":"INFO","msg":"Database initialized successfully"}
arcane | {"level":"INFO","msg":"Starting HTTP server","addr":":3552","port":"3552","tls_enabled":false}

Notes

  • This does not appear to be a general startup issue, because Arcane starts fine when manually brought up with docker compose up -d
  • This does not appear to be a simple restart issue, because Restart works
  • The issue seems specific to self-redeploy when Arcane manages its own compose project
  • I also see repeated warnings like this, though I am not sure whether they are directly related:
WARNING: Error loading config file: open /root/.docker/config.json: permission denied

Question

Is self-redeploy of Arcane currently unsupported, or is this a bug in the project-based redeploy flow when the target project is Arcane itself?

Expected Behavior

When Arcane manages itself as a compose project, clicking Redeploy should recreate and start the new Arcane container successfully, or at minimum complete the redeploy flow without requiring manual recovery.

Actual Behavior

  • Restart works
  • Redeploy stops Arcane
  • Arcane does not come back automatically
  • Manual docker compose up -d is required to recover

Screenshots

No response

Arcane Version

v1.17.4

Installation Method

Docker Compose (Recommended)

Environment Type

Local Docker (Single instance)

Database Type

SQLite (Default)

Operating System

Linux

Docker Version

29.3.0

Browser & Version

No response

Relevant Logs or Error Messages


Docker Compose Configuration


Environment Configuration (.env file)


Additional Context

No response

deqiying avatar Apr 13 '26 14:04 deqiying

I also see a similar warning about config.json... seems benign, but I would like to know if there is an environment issue that needs attention.

bucky2780 avatar Apr 13 '26 23:04 bucky2780

I also see a similar warning about config.json... seems benign, but I would like to know if there is an environment issue that needs attention.

I'm not sure about this warning either, but arcane can't redeploy itself.

deqiying avatar Apr 14 '26 06:04 deqiying

I have this issue

JMarcosHP avatar Apr 14 '26 16:04 JMarcosHP