Before you begin
- A Linux x86-64 host. The image is published for
linux/amd64only. - Docker or Podman. Every
dockercommand below also works withpodman. - A release version to run, such as
15.0.10-fountain.3. Always use an exact version tag or digest; Fountain does not publish alatesttag. See Fountain versions and upgrades.
Start Fountain
The image is ghcr.io/veighnsche/fountain:VERSION. It listens for HTTP on port 3000 and SSH on port 22, and keeps all persistent state under /data.
FOUNTAIN_VERSION=15.0.10-fountain.3
docker volume create fountain-data
docker run -d --name fountain \
-p 3000:3000 -p 2222:22 \
-v fountain-data:/data \
-e FORGEJO__server__ROOT_URL=http://localhost:3000/ \
-e FORGEJO__server__SSH_PORT=2222 \
ghcr.io/veighnsche/fountain:"$FOUNTAIN_VERSION"
Open http://localhost:3000 and complete Forgejo's initial setup page, including the administrator account. The page writes its choices to /data/gitea/conf/app.ini in the volume.
Set ROOT_URL to the exact address people use in their browsers. Fountain compares the browser's origin with it before forwarding any extension request that changes data, so a mismatched ROOT_URL makes extension saves fail with 403.
The SSH server inside the container always listens on port 22. FORGEJO__server__SSH_PORT only sets the port shown in clone URLs; match it to the host port you publish. To turn the built-in SSH server off, set FORGEJO__server__DISABLE_SSH=true and omit the -p ...:22 mapping.
Run with Compose
services:
fountain:
image: ghcr.io/veighnsche/fountain:15.0.10-fountain.3
restart: unless-stopped
ports:
- "3000:3000"
- "2222:22"
environment:
FORGEJO__server__ROOT_URL: "https://forge.example.com/"
FORGEJO__server__SSH_PORT: "2222"
FORGEJO__extensions__ENABLED: "true"
volumes:
- fountain-data:/data
volumes:
fountain-data:
Start it with docker compose up -d. This example also turns on the extension host; see Enable extensions.
Configure with environment variables
Every start runs the image's setup step, which writes variables of the form FORGEJO__section__KEY into /data/gitea/conf/app.ini. GITEA__section__KEY is accepted as well, and FORGEJO__section__KEY__FILE reads the value from a file, which suits secrets mounted into the container.
-e FORGEJO__database__DB_TYPE=postgres \
-e FORGEJO__database__HOST=db:5432 \
-e FORGEJO__database__NAME=fountain \
-e FORGEJO__database__USER=fountain \
-e FORGEJO__database__PASSWD__FILE=/run/secrets/db_password
Without database settings, Fountain uses SQLite at /data/gitea/gitea.db. Any Forgejo configuration key can be set this way; see Forgejo's configuration cheat sheet. Fountain's own keys live in the [extensions] section and are listed in the Extension configuration reference.
Image layout
| Item | Location in the image |
|---|---|
| Executable | /app/gitea/gitea (the upstream build keeps the name gitea); /app/gitea/forgejo-cli links to it |
| Command wrappers | /usr/local/bin/forgejo and /usr/local/bin/gitea set the work and custom paths to /data/gitea, then run the executable |
| Configuration | /data/gitea/conf/app.ini |
| Work, custom and app data path | /data/gitea |
| Repositories | /data/git/repositories |
| Extension packages and data | /data/gitea/extensions once extensions are enabled |
| Service user | git, UID and GID 1000; change them with USER_UID and USER_GID |
| License | /usr/share/licenses/fountain/LICENSE |
Back up the whole /data volume. It holds the configuration, database (with SQLite), repositories, extension packages and extension data.
Run administrative commands
Run forge commands as the git user inside the running container:
docker exec -u git fountain forgejo admin user list
Commands that change extension packages need the forge stopped, because the running host holds the package store lock. Stop the container and run the command in a one-off container that mounts the same volume:
docker stop fountain
docker run --rm -v fountain-data:/data \
ghcr.io/veighnsche/fountain:"$FOUNTAIN_VERSION" \
su-exec git forgejo extensions list
docker start fountain
Install and manage packages shows the full package workflow.
Verify the result
curl -fsS http://localhost:3000/api/healthz
docker exec fountain forgejo --version
/api/healthz succeeds once the forge is initialized and serving. The version output includes the Fountain release, for example 15.0.10-fountain.3+gitea-1.22.0.
Troubleshooting
| Symptom | What to check |
|---|---|
| The container exits during startup with extensions enabled | Read docker logs fountain. Required packages that cannot be prepared, an unreadable catalog, or two packages claiming the same route stop the host on purpose. See Required packages. |
extension packages are in use: stop Forgejo before changing packages |
A package command ran while the forge was running. Stop the container first. |
| Files in the volume owned by the wrong user | Run commands through su-exec git or docker exec -u git, never as root. If you changed USER_UID, use the same value for every container that mounts the volume. |
Extension pages load but saving fails with 403 |
ROOT_URL does not match the browser's address. |
Continue
Enable extensions to start adding packages, or read Fountain versions and upgrades before your first upgrade.