Run on a single host
Run dropshelf as one Docker container beside Postgres, on local files or a bucket, without Kubernetes.
Run dropshelf as one container on a single host, without Kubernetes. Use this for a small team or a trial on a server you already run.
What you give up
A single host trades these against a Helm install:
- One replica. A restart or an upgrade takes the instance down until the container is back.
- No shared store with the
fsdriver. Every drop's files sit on this host's disk, so the instance cannot grow past one container. - Backups are yours. Back up Postgres and the files directory together, on your own schedule.
Prerequisites
- A Linux host with Docker.
- Postgres 14 or later that the host can reach, with an empty database.
- An OIDC client at your identity provider, with
https://drop.example.com/auth/callbackas its redirect URI. - A reverse proxy or load balancer in front of the host that holds the wildcard certificate for
drop.example.comand*.drop.example.com. The container speaks plain HTTP.
Requirements has the detail on each.
What the image expects
The image ghcr.io/dropshelf/dropshelf is distroless: it has no shell and runs as UID 65532. It is
built to run with a read-only root filesystem. It writes to these directories:
| Directory | Setting | Holds | Survives a restart |
|---|---|---|---|
/tmp/dropshelf | server.spoolDir | Uploads until they are stored | No, emptied at startup |
/var/cache/dropshelf | cache.dir | Files the server serves, refilled from storage | No, emptied at startup |
/data/blobs | storage.fs.root | Every drop's files, with the fs driver | Yes |
It listens on two ports: 8080 for the dashboard, the API and every drop, and 9090 for /metrics.
Publish 8080 to your proxy only, and keep 9090 for your metrics scraper.
The server empties the spool and the cache directory at every startup. Never put the files directory inside either one, and never let the two overlap: the server refuses to start if they do.
Run on Postgres and local files
This shape keeps every drop's files in a directory on the host, with storage.driver: fs.
-
Create the three directories, owned by the container's user:
sudo mkdir -p /srv/dropshelf/spool /srv/dropshelf/cache /srv/dropshelf/blobs sudo chown 65532:65532 /srv/dropshelf/spool /srv/dropshelf/cache /srv/dropshelf/blobsGive the cache directory more space than
cache.maxBytes, which is 1GB by default, with at least 20 percent to spare. -
Save the configuration file as
/srv/dropshelf/config.yaml:server: baseDomain: drop.example.com publicBaseURL: https://drop.example.com trustedProxies: ["<proxy-address>/32"] storage: driver: fs auth: provider: oidc oidc: issuer: <issuer-url> clientId: <client-id> admins: emails: [admin@example.com]<proxy-address>is the address your reverse proxy connects from, so the logs record client addresses. The directories keep their defaults, which do not overlap. Every key is in the configuration reference. -
Save the secrets as
/srv/dropshelf/secrets.env, readable by root only:DROPSHELF_DATABASE_URL=postgres://dropshelf:<password>@<postgres-host>:5432/dropshelf?sslmode=require DROPSHELF_AUTH_OIDC_CLIENT_SECRET=<client-secret> DROPSHELF_AUTH_SESSION_SECRETS=<session-secret>For
<session-secret>, use the output ofopenssl rand -hex 32. Each session secret must be at least 32 bytes. -
Start the container, replacing
<version>with a release such as0.1.0:docker run -d --name dropshelf --restart unless-stopped --read-only \ -v /srv/dropshelf/config.yaml:/etc/dropshelf/config.yaml:ro \ -v /srv/dropshelf/spool:/tmp/dropshelf \ -v /srv/dropshelf/cache:/var/cache/dropshelf \ -v /srv/dropshelf/blobs:/data/blobs \ -e DROPSHELF_CONFIG=/etc/dropshelf/config.yaml \ --env-file /srv/dropshelf/secrets.env \ -p 127.0.0.1:8080:8080 -p 127.0.0.1:9090:9090 \ ghcr.io/dropshelf/dropshelf:v<version>The container migrates the database at startup and serves on port 8080.
-
Point your reverse proxy at
127.0.0.1:8080for both names. Keep request bodies up to at least 110 MB and timeouts at 15 minutes, so the largest deploys get through.
To keep files in a bucket instead, set storage.driver to s3, gcs or azure and leave out the
/data/blobs mount. Object storage covers each driver.
Start from the Compose stack
The repository's deploy/compose/docker-compose.yaml runs MinIO, Postgres and one dropshelf
container. It is a development stack, and also a working single host once you change these:
- The image. Remove the
buildstanza and name a release,ghcr.io/dropshelf/dropshelf:v<version>. - The addresses. Set
server.baseDomainandserver.publicBaseURLindeploy/compose/config.yaml. - Sign-in. The default profile runs with
auth.provider: none, which is open access. Usedeploy/compose/config.dex.yamlas the shape of an OIDC configuration. - Every credential. The MinIO, Postgres and session secrets in the file are development values.
- The cache. The stack mounts a 128 MB
tmpfsfor a laptop. Givecache.dira disk directory. - TLS. Put a reverse proxy in front, and set
server.trustedProxiesto its address.
MinIO and Postgres keep their data in named volumes with no backup. For anything that matters, point the instance at a managed database and a real bucket.
Confirm it worked
Ask the container for readiness:
curl http://127.0.0.1:8080/readyzreadyThen open https://drop.example.com and sign in as an address from auth.admins.emails.
Next steps
Last updated .