Self-host Swagger UI with Levelrail
Renders an OpenAPI description as interactive API documentation you can try from the browser. It is static, has no login and no database.
- Authorswagger-api
- LicenceApache-2.0
- Memory64 MiB
- Services1
How to self-host Swagger UI
-
Pull the images
One image is pulled on your server.
Show images
swaggerapi/swagger-ui:v5.34.1
-
Create the app
One service starts in a single Compose app, on port 8080.
-
Fill in the secrets
1 setting is preset, you do not have to fill in anything.
-
Open it
Without a domain the app gets an sslip.io address; add --domain SERVICE=HOST to use your own.
Swagger UI requirements
- Memory
- About 64 MiB
- Architectures
- amd64 unknown, arm64 unknown
- Ports
- 8080
- Domain
- Optional, an sslip.io address is used without one
- Settings
- none to fill in
- License
- Apache-2.0, permissive license
- Listed. It is in the catalog but not verified. Back up the data volume before changing an image tag.
Install Levelrail first
On a server with Levelrail running, run the command above, or open the dashboard: Apps, New app, Browse templates, then Swagger UI. New to Levelrail? Install it on a fresh VPS first.
docker pull ghcr.io/glincker/levelrail:latest Then levelrail-cli login --device. See Getting started and the Swagger UI docs page.
Deploy Swagger UI your way
Every format below deploys the same pinned images. Pick the one that fits how you work.
Deploy Swagger UI from the CLI
levelrail-cli templates deploy swagger-ui --name my-swagger-ui Deploy Swagger UI with the API
curl -X POST -H "Authorization: Bearer $TOKEN" \
https://levelrail.example.com/api/v1/service-templates/swagger-ui/deploy Swagger UI configuration
Swagger UI services
| Service | Image | Ports | Volumes |
|---|---|---|---|
| swagger-ui | swaggerapi/swagger-ui:v5.34.1 | 8080 | none |
Swagger UI environment variables
| Variable | Service | Value |
|---|---|---|
| URL | swagger-ui | Preset by the template |
Ports and volumes
- Ports
- 8080
- Volumes
- none
Swagger UI FAQ
How much memory does Swagger UI need?
The catalog lists about 64 MiB of memory for Swagger UI.
Does Swagger UI run on arm64?
For Swagger UI, arm64 support is not confirmed; amd64 is unknown.
What licence is Swagger UI under?
Swagger UI is licensed under Apache-2.0, which is permissive, with few conditions on reuse.
Does Swagger UI need configuration before it starts?
No. The template fills in its own defaults.
Which ports does Swagger UI use?
Swagger UI listens on port 8080 inside the stack.
Can I deploy Swagger UI on Dokploy or Dokku?
The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for Swagger UI, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image swaggerapi/swagger-ui:v5.34.1 is what you deploy there.