AI AdminPanel Documentation

Git Deployment

Git Deploy clones a repository, builds its application and starts containers. Use it when your project needs a build; Compose Deploy expects pre-built images.

Start a Git deploy

Open Services → Deploy Service → Deploy your own app and paste the repository URL. The form, its optional Let AI check it switch, branch selection, environment variables, private repositories and the addresses the panel refuses are described in Deploy your own app. The old /services/deploy/git address opens that form. This page describes what the panel does with a Git service once you click Deploy. The API (POST /api/v1/services/git) did not change.

Private GitHub repositories: set up Connect GitHub first. Such a service redeploys on every push to its branch without a webhook; see Redeploy on push.

The app starts private

Like every app, a Git-deployed service starts private: only a browser signed in to the panel can open its address, and the service page shows Make public. Making it public recreates its container from the image of the last build; nothing is cloned or built. A service that runs several containers (built from a Compose file in the repository) is made public by building it again, which only a platform operator can start. Push webhooks are not affected: they are delivered to the panel, not to the app. See App Access.

What the panel keeps

The repository URL, branch (or tag) and build method are stored with the service, and the deploy key is stored encrypted. The service's Overview tab shows them in the Git source card: repository, branch, build method and whether a deploy key is stored. The key itself is never shown again.

A platform operator can change them with Edit on that card; other users see the source without an editor. Leave the key field empty to keep the stored key. Saving does not deploy anything; use Redeploy afterwards, at the top of the service page next to Restart and Stop. A rebuild that is already waiting when the source is saved builds the new source.

Every container of the app keeps at most five log files of 10 MB. A repository's Compose file can change that within limits; see Container logs.

A single-container app (Dockerfile or Railpack) keeps the folders its image declares with VOLUME (for example VOLUME /data in the Dockerfile) in volumes of the service. Each redeploy mounts the same volumes again, so what the app wrote there is still there; they are included in the service's backups and removed when the service is deleted. Other folders of the container start fresh on every redeploy. A deploy stops, leaving the running app as it was, when the image declares more than 32 VOLUME folders or one that is not an absolute path or contains : or ,.

Automatic build detection

The worker checks the repository root in this order:

  1. docker-compose.yml, docker-compose.yaml, compose.yml, compose.yaml.
  2. Dockerfile.
  3. Railpack when neither is present.

Railpack

Railpack builds an image from source without a Dockerfile: it detects the language and framework (Node, Python, Go, PHP, Ruby, Java, Rust, Deno, Bun, Elixir and more), installs the versions the repository asks for and sets the start command. A static or single-page build, such as a Vite app, is served by Railpack's built-in Caddy on PORT, including deep links. To change what Railpack does, add a railpack.json to the repository; see Railpack's documentation.

Railpack is the successor to Nixpacks, which its maker has put in maintenance mode, and it replaced Nixpacks in the panel. A service that was built with Nixpacks builds with Railpack from its next rebuild on. Railpack may choose a different start command or port than Nixpacks did: after the first rebuild, check that the app answers, and set Application port or a railpack.json if it does not. An API request or template that asks for nixpacks is refused with "Nixpacks was replaced by Railpack; use railpack or auto".

Railpack builds run in the panel's build builder, like a Dockerfile build (see Where Git builds run), and each service's build caches (npm, pip and the like) are kept apart from other services'. Before Railpack runs, the panel checks the whole repository for symbolic links: one that points outside the repository stops the deploy with "… is a symbolic link that points outside the repository", because Railpack reads the repository's files inside the panel.

Dockerfile builds and the build: services of a repository's Compose file are kept apart the same way. Every one of them is read by the panel's pinned Dockerfile frontend, docker/dockerfile:1.28.0 (fixed by its digest): a # syntax= line at the top of a Dockerfile is ignored, so a repository cannot choose the program that reads its own Dockerfile. Build cache mounts (RUN --mount=type=cache, with or without an id=, in any sharing= mode) belong to the service: a rebuild of the same service reuses them, while no other service's build can read or change them, even with the same id=. The containers of one Compose app share their app's caches. The deploy log says so in one line before each build. What this means for a Dockerfile:

  • A Dockerfile that needs a newer Dockerfile feature than 1.28.0 fails with BuildKit's own error; remove the feature or ask the operator to update the panel.
  • After a panel restart or update, the first build of each service starts with empty cache mounts; the build builder clears the old ones on its own.
  • The first Dockerfile build on a server downloads the frontend image from Docker Hub (docker.io/docker/dockerfile), like any FROM image.

Railpack needs Docker's containerd image store, the default of Docker 29 and of every server installed with this version of the installer. A server installed earlier keeps Docker's classic image store, because the installer used to set it; there a Railpack deploy stops with "Railpack needs Docker's containerd image store; reinstall or switch Docker's storage, see docs". Compose and Dockerfile deploys work on both. To use Railpack on such a server, reinstall it, or switch Docker to the containerd image store: see Switch an existing server to the containerd image store.

A repository may contain symbolic links (files that point to another path). For the files the panel reads itself, the Compose file in the repository root and the top-level Dockerfile, a link may point inside the repository, never outside: docker-compose.yml -> deploy/compose.prod.yml works, while a deploy whose Compose file or Dockerfile links to a path outside the repository fails with "… is a symbolic link that points outside the repository". That holds for a detected and for an explicitly selected build method, and the panel does not fall back to another method. A link to a file that does not exist is skipped. This check does not cover a Dockerfile inside the build directory of a Compose service, nor what docker build reads on its own during the build. For Railpack the whole repository is checked (see above).

An explicit build-method selection overrides detection. In the repository Compose path, the worker builds declared build contexts and pulls declared images. This differs from pasted Compose, which rejects build:. The Git form has no standalone monorepo Build Context field; organize build paths in the repository's Dockerfile/Compose configuration.

The services of a repository's Compose file reach each other by their Compose names, as with Compose Deploy: a web service connects to db:5432. Other apps of the same customer reach them by the longer <project>-<service> name described in App Access; apps of other customers cannot reach them at all.

A repository's Compose file is read with the same rules as pasted Compose. Each service keeps its image/build, command, entrypoint, environment, healthcheck, inline configs: (with content:; the file is written into the container), cap_drop, logging and shm_size. A service listed under depends_on with condition: service_healthy is started first, and the service that needs it waits until its healthcheck passes, for at most three minutes. Every container restarts automatically unless it is stopped, whatever the file's restart: says.

These keys are ignored, as they are for pasted Compose and templates: restart, user, working_dir, read_only, tmpfs, ulimits, sysctls, extra_hosts, devices, labels, secrets, security_opt, and configs: that point to a file. Published host ports are never opened. A file that asks for privileged, network_mode: host, cap_add, pid: host, ipc: host, the Docker socket or a system path such as /dev or /proc is refused before anything is built.

Compose file mounts

The volumes: of a repository's Compose file are mounted as in Compose Deploy: named volumes and project folders (./data:/app/data) become persistent volumes of the service, kept across redeploys and included in its backups; a server folder or a path outside the repository is refused. A project folder starts empty, so the panel checks the clone first: when the repository has files at that path (./healthchecks:/healthchecks, ./nginx.conf:/etc/nginx/nginx.conf), or the path is a link, the deploy stops before anything is built and names the mount. Copy those files into the image with COPY in a Dockerfile and use build:, or remove the mount. A folder that is missing, empty, or holds only .gitkeep, .keep or .gitignore is a data folder and is mounted.

Base images come from a registry

The images the panel builds for services stay on this server, next to every other service's images. A build never sees them: every Git build (Dockerfile, Compose build: and Railpack) runs in the panel's own build builder, which has no access to the server's images (see Where Git builds run). So FROM, COPY --from=<image>, RUN --mount=…,from=<image>, a Dockerfile frontend and the images of a Railpack plan (including any a repository's railpack.json adds) always come from the image's registry. A base image that exists only on this server fails the build with pull access denied. Use a stage of the same Dockerfile (FROM … AS base) or an image you push to a registry instead. Builds also run with --pull, so each build checks the registry for the current base image; builds need to reach those registries, as on a first build.

A repository's Compose file may not run such an image either. An image: that names one the panel keeps for a service (aap-git-… or a snapshot's aap-snap-…, in any spelling, such as docker.io/library/aap-git-…) or an image ID (sha256:… or a hexadecimal ID prefix) is refused before anything is built, with a message naming the service. Name a registry image or build it with build:.

Private registries. A base image from a private registry works when the panel's Docker client is logged in to that registry (docker login for the user the panel runs docker as). The build builder stores no credentials: for each build, the panel's client hands it the credentials of that registry. A private base image that was only pulled on the server by hand, without credentials the panel can use, fails with 401 Unauthorized; log the panel in to the registry. A registry Docker lists under insecure-registries is used the same way by the builder (HTTPS without certificate checks, then plain HTTP). List it by name or address (10.0.0.5:5000): an address range such as 10.0.0.0/8 applies to Docker's own pulls only, and the builder checks that registry's certificate. The builder runs in a container of its own, so a registry it should use must be reachable from a container: localhost:5000 means the builder itself, so name the registry by the server's address instead, and list that address under insecure-registries if the registry has no trusted certificate. Build steps use BuildKit's own network, 10.10.0.0/16; a registry or package mirror in that range cannot be reached from a build.

Offline servers. A server without internet access works through a registry mirror or a private registry that holds the base images. The panel gives the builder the registry-mirrors of Docker's daemon.json (for Docker Hub images), so set the mirror there and restart Docker; the next build creates a builder with the new mirrors. The builder's own image (moby/buildkit, see below), the Dockerfile frontend and Railpack's images must also be available through the mirror or registry. A server that has no registry at all and only images loaded with docker load cannot build Git services, because every build resolves its base images from a registry. Repository Compose image: services are pulled as before: an image that is already on the server is used without a pull.

Where Git builds run

Git builds do not run in the Docker daemon's own builder, which can read every image on the server. The panel runs one BuildKit for them in a container of its own (Docker's docker-container builder), and loads each finished image into Docker. What an operator sees:

  • A container buildx_buildkit_aap-git-builder-<id>0 with the volume buildx_buildkit_aap-git-builder-<id>0_state, which holds the build cache. The panel creates both on the first Git build, starts the container again if it was stopped, and creates it again if it was removed. The first Git build after an install or an update downloads moby/buildkit (about 110 MB) and starts with an empty build cache.
  • Limits. The container may use half of the server's memory (at least 1 GiB, no swap) and every CPU but one. A build that needs more fails with an out-of-memory error inside the builder; the rest of the server keeps running.
  • Disk. The build cache stays under 20 % of the disk, and BuildKit removes old cache to keep 15 % of the disk free. It keeps at least 2 GB. The panel's Docker disk cleanup does not touch this cache.
  • Updates. <id> is derived from the builder's settings: its BuildKit version, limits and registry mirrors. When a panel update or a change of Docker's mirrors changes them, the next build creates a new builder, and the panel removes its earlier builders together with their cache volumes. It never touches other builders on the server.
  • Rolling back to a version before 2.27.1 leaves the builder container running and its cache volume in place; those versions build in Docker's own builder and do not use them. Remove both with docker rm -f buildx_buildkit_aap-git-builder-<id>0 and docker volume rm buildx_buildkit_aap-git-builder-<id>0_state, or keep them: updating again reuses them.
  • One builder for all services. Builds of different services stay apart inside it as they did in Docker's own builder: every build step runs in its own sandbox and network namespace, and build cache mounts are private to each service (see above). The builder runs only the panel's pinned Dockerfile frontend and Railpack's frontend.
  • Privileged. Docker runs this BuildKit container with --privileged, as it does for every docker-container builder. A build step that broke out of BuildKit's sandbox would reach the server, just as one in Docker's own builder would. Do not remove or restart it during a build.

After Deploy the panel opens the service's page at once. Its Deploy section shows the build as it runs, across the full width of the page (the summary column on the right steps aside until the deploy ends, and is back as soon as it ends, also after a reload): one line on top ("Deploying: step 3 of 6, Build Docker Image"), the six steps as a horizontal bar, the output of the running step below it (click a finished step in the bar to see its output instead) and the build output, which follows new lines until you scroll up or click into it. On a phone the bar becomes one line ("Step 3 of 6: Build Docker Image") with a thin progress bar. When the build ends, the same section says Deployed or shows why it failed. Deployed means the app stayed running: the last step, Check it stays running, fails the deploy when the container keeps restarting, exits with an error or reports unhealthy, and shows the last lines of its log; the container is kept so Logs still shows it (see Deploy your own app). Finished steps stop spinning, including steps whose initial progress event was missed. A recreate from the last image or a rollback skips cloning and building; those steps stay unstarted. The Address refreshes when the deployment ends, so a new automatic address appears without reloading the page. Running notifications use the service name when it is available in the page or list cache. Then verify the application at its service URL. DNS and certificates have their own prerequisites; see Domains and DNS.

The Deploy section of a service while it deploys: the headline "Deploying: step 5 of 10, Build Docker Image", six steps in a horizontal bar with Build Docker Image running, and the build step's output below.

The chapter reloads bounded, redacted captured output, then merges new lines by deployment and sequence. Follow new output pauses when you focus the log or scroll up; Refresh reads stored output again. Notices say when older output was omitted or some output is missing. History's View log opens retained output in its own drawer; log access requires services.view_logs.

Step progress itself is not replayed. As later steps arrive, the panel infers earlier steps as complete; a terminal success reconciles the displayed steps. Pure transcript lines never change the progress percentage or complete a step.

Tested stacks

The panel is tested with public example apps, one per stack: public GitHub repositories named aap-example-<stack> in the aiadminpanel organization. Each one is deployed through the API, made public, and must answer with its marker text. You can fork them, or compare one with your own project to see why a deploy fails. The results below are from 2026-10-15, on a panel built from main with automatic build detection.

StackExampleResult
Static HTMLaap-example-staticWorks
Node.js + Expressaap-example-node-expressWorks
npm workspaces monorepoaap-example-monorepoWorks
Python FastAPIaap-example-fastapiWorks
Python Django + Gunicornaap-example-djangoWorks
Goaap-example-goWorks
Own Dockerfileaap-example-dockerfileWorks
Vite + React (Lovable/Bolt style)aap-example-vite-reactFails: the build gets Node.js 18, and current Vite needs a newer Node.js
Next.js (v0 style)aap-example-nextjsFails: Next.js 16 needs Node.js 20.9 or newer, and the build gets Node.js 18
SvelteKit (Node adapter)aap-example-sveltekitFails: the same Node.js 18 problem
Bunaap-example-bunFails: the builder tries to install Node.js 18, which is no longer available
Astro (static output)aap-example-astroFails: "No start command could be found" (static build output is not served)
Compose: web + Postgresaap-example-compose-multiDeploys and answers, but the web container cannot reach db by name

Until these are fixed, a repository with its own Dockerfile is the dependable way to deploy a Vite, Next.js, SvelteKit, Bun or Astro app. Operators can run the same test against their own panel with scripts/real-app-deploy-test.sh (see docs/runbooks/real-app-deploy-test.md in the repository).

Webhook redeployment

For Git services, the Overview sidebar includes webhook controls. Create a webhook, copy its URL and signing secret into the Git provider's webhook configuration, and select the matching provider. Preserve the secret securely; inspect webhook results and deployment progress after a push.

A service deployed from a connected GitHub account has no webhook controls: the GitHub App's own webhook redeploys it on every push to its branch, under the same one-minute spacing. See Redeploy on push. The API refuses to create a manual webhook for such a service (HTTP 409), and binding a service to a GitHub repository deletes the manual webhook it had, so a push never deploys it twice and no second secret is left behind. The deletion is in the audit log as webhook.deleted. To use a manual webhook again, switch the Git source back to a repository URL and create a new one.

A correctly signed delivery is answered with HTTP 200 and a status:

statusMeaning
acceptedA rebuild was queued. With notBefore, it was scheduled for that time (see "Limits" below).
already_queuedA rebuild of this service is already waiting. It clones when it starts, so it builds this push too. A waiting recreate (see "Redeploy" below) does not count: it builds nothing, so the push is accepted and built.
ignoredNot a push to the stored branch: a ping, another event type, or a push to another branch or tag. Nothing is built.
duplicateThis delivery was accepted before (GitHub and GitLab webhooks). Nothing is built.

A delivery with a wrong signature is answered 401; a service without a stored repository 409 (see below); a body larger than 5 MiB 413 (see "Limits" below).

A webhook requests a rebuild/redeployment. This guide does not promise a rolling restart or zero downtime. Plan a recovery path before enabling automatic changes to an important service.

Limits on what a webhook can start

A build runs on the shared host, so the panel bounds what deliveries can start:

  • One rebuild per service is queued at a time. Several deliveries of one push, or several pushes in a row, are one build. If a build is already running when a push arrives, one more is queued behind it, because the running build may have cloned before that push. Only one of them runs at a time. A waiting job looks every 30 seconds whether it may start, so it does not start the moment the first one ends; with more than one job waiting (a rebuild and a recreate, say) their order is not fixed and the last of them can start a minute or more later.
  • At most one rebuild start per minute and service. A push inside that minute is not dropped; its rebuild is scheduled for the end of it.
  • A delivery is accepted once. For GitHub the signed body identifies a delivery, so "Redeliver" in GitHub's webhook log is answered duplicate; use Redeploy to build the same commit again. For GitLab the event's ID, or the body, identifies it. Deliveries are remembered for 90 days.
  • A delivery body is at most 5 MiB. The address is public and the signature can only be checked after the body was read, so the panel stops reading at 5 MiB and answers 413 with the code payload_too_large, before the signature check. A push event is a few kilobytes. The limit is fixed.
  • A generic webhook has no replay check. Its body may be the same every time (a CI job posting {}) and carries no signed timestamp, so the panel can't tell a replay from a new trigger. A captured delivery can therefore start a rebuild of the stored repository and branch again, within the two limits above. Treat the signing secret and captured requests accordingly, and rotate the secret (delete and re-create the webhook) if one leaked.
  • A GitLab webhook authenticates with a token, not a signature. Whoever holds the token can send any delivery. The same limits apply.

Redeploy

Redeploy is at the top of the service page, next to Restart and Stop, for everyone with the Deploy services permission (services.deploy). It asks for confirmation first. While a deploy is running it is greyed out, and its tooltip says it is available again once that deploy finishes. A failed service shows Fix and deploy again there instead, which does the same.

What Redeploy does for a Git service depends on who clicks it. The button's tooltip and confirmation say which of the two you get.

  • A platform operator: rebuild. The stored repository is cloned and built again, as for a push. For a service deployed from a connected GitHub account, the rebuild is refused (409 github_connection_unusable, nothing queued) while the Git source card shows any state but Connected, with the card's message, for example Needs a new GitHub connection after a disconnect or an uninstall on GitHub. See Connect GitHub.

  • Everyone else who manages the service (a reseller, an organization admin): recreate. The container is replaced by a new one from the same image the running container uses. Nothing is cloned or built. Use it to restart cleanly or to pick up changed environment variables; to deploy new code, push to the repository (if a webhook is set up) or ask a platform operator to redeploy.

    A recreate is refused, and the running service is left alone, when the image of the last build is no longer on the host (it was removed, or the last rebuild failed while it was replacing the containers) and for a service that is built from a Compose file in its repository, whose container definitions live in the repository. That holds for a Compose file with a single service too: the panel reads what the running container was created from, not an image name that an earlier build may have left on the host. The failed entry in the deployment history says so. A platform operator's Redeploy builds the service again.

Starting a build by hand is limited to platform operators for the same reason creating a Git service is: a build runs whatever the repository holds, on the host all customers share. The tenant MCP tool redeploy_service follows the same rule: for a Git service it queues a recreate, bound to the customer whose agent asked, and its answer says that nothing is cloned or built.

Moving a Git service onto its customer's own network

A Git service deployed before tenant network isolation still shares a Docker network with other customers' services (see Upgrade). Either kind of Redeploy moves it: the new containers join the customer's own network and nothing else, and the reverse proxy joins that network.

  • A service with one container moves with a recreate or a rebuild.
  • A service built from a Compose file in its repository moves only with a rebuild, so a platform operator redeploys it. It needs the stored repository; a service deployed before the panel kept it shows "No stored repository" until an operator enters it again (see below).

Moving a Git service to another customer and changing its subdomain are refused, and a secret rotation does not recreate it: those operations rebuild a service from a stored Compose file, which a Git service does not have. Redeploy picks up rotated secrets.

What a rebuild does

A push webhook and a platform operator's Redeploy do the same thing. Before anything is cloned, the panel asks whether the reverse proxy may join the customer's network at all; on a server where it may not (see "Proxy and gateway containers" in Upgrade) the rebuild is refused at once, with nothing built and nothing changed. Then:

  1. Clone the repository and branch that are stored when the rebuild starts. If the Git source was changed while a rebuild was waiting, the new source is built. The repository address is checked again at this point, not only when it was saved.
  2. Build the image (or the Compose file's images) and inspect it.
  3. Under the service's operation lock again: check that the service is still what was built (see "While a rebuild is building" below), then everything else that can still refuse while the service runs: the secret references in its environment, and whether the reverse proxy may join the customer's network (see "Proxy and gateway containers" in Upgrade). The proxy is attached here.
  4. Remove the service's current containers and start the new ones.

If step 1, 2 or 3 fails (the repository is unreachable, the build breaks, an image is refused, a secret is missing, the proxy may not join), nothing was removed: the service keeps running what it ran and keeps its status, and the deployment is marked failed with the reason. The image the service runs keeps its name in that case, so a recreate still works; what the refused rebuild built is removed. A failed rebuild is not repeated automatically. Fix the repository and push again, or redeploy.

From step 4 on the service is down until the new containers start. If creating or starting them fails, the service is shown as error, not as running, and the image that was just built is kept, so a recreate can start the service from it once the cause is fixed. Further operations on it are then refused with "service operation active or awaiting reconciliation" until an administrator clears the service's operation claim; the procedure is the one under "Changing a subdomain" in Domains and DNS. Note that a customer's push can cause this: a commit that builds but whose container can't be created or started leaves the service down until an administrator steps in.

A rebuild may take up to 40 minutes in total (5 for the clone, 20 for one build). A rebuild that is cut off by that limit, or by a restart of the panel, is recorded as failed with the reason "interrupted". If it was cut off during steps 1 to 3, the service is as it was and the next push or Redeploy can run at once; if during step 4, the service is shown as error as described above.

While a rebuild is building

A rebuild takes the same per-service lock as deploy, restart, stop, secret rotation, subdomain change and customer reassignment, so two of them never change one service at the same time. It holds that lock when it starts (to record the rebuild; the service shows deploying) and again for steps 3 and 4. It does not hold it during steps 1 and 2: the panel can run only a few locked operations at once on the whole server, and a build may take many minutes.

So while a service is being built you can still stop it, rotate its secrets, change its subdomain, reassign it or remove it, and every other service on the server is unaffected by the build. Before step 3 the rebuild looks at the service again and starts the new build only if all of this still holds:

  • the Git source (repository, branch, build method, deploy key) is the one the build was cloned with;
  • the service belongs to the same customer;
  • the service still shows deploying, that is, no other operation has finished on it since the rebuild began.

Otherwise the rebuild ends as failed and says which of the three it was. Nothing is removed or started, and the service keeps the state the other operation left it in (a service you stopped stays stopped). The same happens when the service was removed meanwhile, or when another operation failed on it and left it awaiting reconciliation.

The image the service runs is kept as well. A build gets an image tag of its own, and the service's tag moves to the new image only when the containers are replaced, so a recreate still works after a refused rebuild.

To get the new code deployed after a refused rebuild, it has to be built again. Who can do that:

  • Anyone who can push to the repository, if a webhook is set up: push again (an empty commit is enough).
  • A platform operator: click Redeploy.
  • A reseller or organization admin: your Redeploy recreates the container from the image the service already runs and builds nothing, so it does not bring the new code. Push again, or ask a platform operator.

One more case ends a rebuild this way without anyone having done anything: the panel's own status check runs once a minute, and if it corrects the status of the service in the instant a rebuild begins, the rebuild finds the status changed and is refused. This is rare; push again or have a platform operator redeploy.

A rebuild that finds another operation running when it starts waits for it, for up to 50 minutes; after that it is recorded as failed with the reason that another operation did not finish. A second Git job of the same service (a rebuild queued behind a running one, or a recreate) waits in the same way. A rebuild that finds the service blocked by an earlier operation that failed (its claim is "in doubt") does not wait: waiting can't clear that claim. It is recorded as failed at once, with the reason "git deploy refused: an earlier operation on this service failed or was interrupted and may have changed it, so the service is blocked until an administrator checks it and clears its operation claim; nothing was changed".

A Compose file in the repository may use the panel's generated secrets (${AAP_...}) in environment values. They are filled in at step 3, not during the build, so they can't be part of a service name, an image name or a build context; a rebuild whose Compose file does that is refused before anything is removed.

A rebuild appears in the deployment history when it starts, not when it is queued.

What a build and an app can no longer reach

The RUN lines of a repository's Dockerfile are the customer's code, executed on the panel's host while the image is built. With the container egress guard on (Turn on the container egress guard):

  • Cloud metadata addresses. Neither a build step nor the running app can send to 169.254.0.0/16, 168.63.129.16 or 100.100.100.200, where clouds hand out start-up data and sometimes credentials. DNS on port 53 to those addresses still works.
  • The server's own ports. A build step (on the network of the panel's BuildKit builder) and the running app (on its customer's network) reach the server itself only on TCP 80, 443 and port 53, plus any ports the operator listed in AAP_EGRESS_GUARD_TENANT_HOST_PORTS. A build that downloads packages from the internet is not affected.

Since 2.27.1, builds run in the panel's own BuildKit builder container. Each build step gets its own network on the builder's bridge, and the builder is limited to half the server's memory (no swap) and all CPUs but one. See Where Git builds run.

Services deployed before the repository was stored

Git services created with a panel version older than this change have no stored repository. For those:

  • The Git source card shows No stored repository. A platform operator sees Enter repository there; everyone else sees who to ask.
  • A platform operator's Redeploy is refused with a message that says so. Nothing is stopped. Everyone else's Redeploy still works: it recreates the container from the last built image and needs no repository.
  • A push webhook is refused with HTTP 409 (git_source_missing), which is what the Git provider's delivery log shows. Nothing is written to the deployment history for it.

To repair one, a platform operator opens the service, chooses Enter repository on the Git source card, enters the repository URL, branch and (for a private repository) the deploy key, saves, then clicks Redeploy. The panel does not guess the repository: it was never stored, so it has to be entered again.

Troubleshooting

The clone failed

When the repository cannot be cloned, the Deploy section of the service page names the cause and the next step instead of a generic error. The Reason reported by the panel below it is the text the Deployments tab shows.

CauseWhat to do
Branch not foundThe repository has no branch or tag of that name. The reason names its default branch and lists some branches. Pick one and deploy again.
Repository not foundThe repository does not exist, or it is private. Git hosts answer both the same way. Check the address; a private repository needs a deploy key.
Access refusedThe Git host refused the deploy key. Add it to the repository with read access.
Repository address redirectsThe panel does not follow redirects. Enter the final address, as your browser shows it.
Address not allowedThe address points to a private or local network. Only public Git hosts are cloned.
Git host not reachableThe host did not answer. Check the address and try again later.

When this was the service's first deploy, the panel removes the new service again, with everything created for it, so no dead entry stays in the service list. The page then says This deploy failed and nothing was kept, with the reason. Fix and retry opens the deploy form filled in with what you entered; correct the branch or address and deploy again. The deploy key is never kept in the browser, so a private repository needs it entered again.

The deploy's output and reason are kept for 14 days after the service is removed, so the page shows the log of the failed deploy, also after a reload or when the failure was faster than the page. Only someone who may read the logs of that customer's services sees them. The page stops asking for the removed service as soon as the panel answers that it is gone. When no output was kept (a deploy older than 14 days, or one from before the panel kept it) the page says so, and the reason comes from the audit log entry service.git_deploy_failed (a user without permission to read the audit log sees a general sentence instead). The form is kept only in this browser tab's history: after a reload the page shows the failure without Fix and retry. Opening the address of a removed service whose output was not kept shows "Service not found", with a note that a failed first deploy is removed and a link to the activity log. A failed redeploy of a service that has run keeps the service and its running version.

Image refused: reserved labels

After the build, the panel inspects every image the deployment will run. An image that ships a label whose name starts with traefik. or aiadminpanel. (upper or lower case) is refused, and there is no override. Those labels control public routing and service ownership, and Docker copies an image's labels onto its container, so only the panel may set them.

What to do: remove the LABEL traefik... or LABEL aiadminpanel... lines from the repository's Dockerfile (or choose a base image without them), push, and deploy again. For an image you do not build yourself, rebuild or re-tag it without those labels, or use a different image. The service's deployment history names the image and the labels.

The check runs before any container is stopped, so a service that was already running keeps running and keeps its status; only the deployment is marked failed. You never need routing labels: the panel generates the route from the Application port and the service's domains.

App fails with "Operation not permitted" or a sudo error

Every container the panel starts runs with a hardening baseline, and containers built from a Git repository get the strictest one:

  • No raw or packet network sockets (NET_RAW removed), no creating device nodes (MKNOD), no writing kernel audit records (AUDIT_WRITE). Eleven capabilities remain, including the ones needed to change file ownership, switch user and bind a port below 1024.
  • no-new-privileges: a setuid program cannot raise privileges. sudo and su do not work for a process that is not already root.

The deployment itself reports success, because the container was created and started. The application then fails in its own log (the Logs tab). These are the messages, captured from containers running under the baseline:

In the application logCause
sudo: The "no new privileges" flag is set, which prevents sudo from running as root.The image runs as a non-root user and calls sudo at start
arping: socket(AF_PACKET,2,0): Operation not permitted (or socket: Operation not permitted from your own code)The application opens a raw or packet socket
mknod: /tmp/x: Operation not permittedThe application creates a device node
ping: permission denied (are you root?)Some ping builds use a raw socket. Others use an unprivileged ICMP socket and keep working

Two entrypoint shapes work and cover almost every image:

  • Start as root, then drop. The entrypoint runs as root, prepares files (chown -R app /data) and then hands over with gosu, su-exec or setpriv: exec gosu app your-server. This is what the official PostgreSQL image does.
  • Run as a non-root user from the start (USER app in the Dockerfile) with no sudo or su step. A non-root process can still listen on port 80.

There is no override for a service and no setting that switches the baseline off. A cap_drop in a repository's Compose file is honoured and can only remove more; its security_opt may only contain no-new-privileges (anything else, such as seccomp=unconfined, is refused). Every other Compose key is honoured, refused or ignored with a warning; see the table of Compose keys.

The baseline applies to the running container. It does not restrict the build: the RUN lines of your Dockerfile execute during the image build with Docker's default capabilities.