Having a really hard time self hosting #10

Closed
opened 2026-04-05 16:18:41 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @freedbygrace on 3/28/2026

I am close to getting this working, but I have tried the QuickStart script and I have tried manually defining a docker compose from scratch. I must be missing something important to get this going. I worked through the errors and copied the output and used AI to summarize the issues below.

OneUptime Upstream Issues — Docker Self-Host Is Broken

Collected while attempting to self-host via Docker Compose.
Ref: https://github.com/OneUptime/oneuptime/issues/2195


1. Published Docker Images Have No Frontend

Both release and test tags of oneuptime/app ship with only 3 FeatureSets:

  • BaseAPI
  • Identity
  • Notification

The frontend FeatureSets (Accounts, Dashboard, AdminDashboard, StatusPage, PublicDashboard) are completely absent from the built image. App/Index.ts only imports the three above — no frontend routes are registered.

Result: Every UI route returns 404 {"message":"Page not found"}:

GET /accounts/login  -> 404
GET /dashboard       -> 404
GET /status-page     -> 404

Only /status (health check) and raw API endpoints work.


2. Dockerfile.tpl Generates a Backend-Only Dockerfile

App/Dockerfile.tpl uses gomplate conditionals to optionally include frontend FeatureSets, but the production path through CI does not enable them. The generated Dockerfile for release/test tags contains:

  • No COPY for any frontend FeatureSet directories
  • No npm install for frontend FeatureSet dependencies
  • No npm run build-frontends:prod step
  • Index.ts has no imports for frontend route handlers

The source code has consolidated all services into the App container, but the CI pipeline has not caught up — it still builds a backend-only image.


3. Building From Source Fails — TypeScript Errors

Building locally with docker build -f App/Dockerfile . fails at npm run compile (tsc) due to upstream type errors in main:

Common/Server/API/TelemetryAPI.ts(796,13): error TS2375
Common/Server/Services/ProfileAggregationService.ts(295,53): error TS2379
FeatureSet/PublicDashboard/src/Pages/DashboardView/DashboardVariableSelector.tsx(20,23): error TS2339
FeatureSet/PublicDashboard/src/Pages/DashboardView/DashboardViewPage.tsx(373,11): error TS2322

Root causes:

  • exactOptionalPropertyTypes: true in tsconfig vs sloppy property assignments in TelemetryAPI
  • PublicDashboard references properties (currentValue, options, dashboardMode) that don't exist on the current type definitions

Workaround: RUN npm run compile || true — JS files are still emitted since noEmitOnError is not set, but this should not be necessary.


4. Ingress Container Has Broken Nginx Config

The oneuptime/nginx (Ingress) container ships with:

  • Hardcoded resolver 127.0.0.11 — Docker's embedded DNS, which fails in many network configurations
  • Upstream references to service names (app, telemetry) that assume Docker Compose service discovery with specific network aliases
  • No configurable DNS — no env var to override the resolver
  • Ports 80/443 assumed available — common conflict on hosts already running a reverse proxy

For anyone running an edge proxy (Nginx, Traefik, Caddy), the Ingress is redundant and adds a broken layer. The only backends are:

Path Backend
/accounts, /dashboard, /api, /status-page, etc. App:3002
/telemetry, /probe-ingest, OTLP Telemetry:3403 (+ 4317/4318)

5. No Working Self-Host Path Exists

Approach Result
release tag No frontend — 404 on all UI routes
test tag No frontend — 404 on all UI routes
Ingress container Broken DNS resolver, port conflicts
Build from source Fails on TypeScript errors without || true hack
Build from source + hack Builds, but Index.ts still only registers 3 backend FeatureSets — frontend still 404

The fundamental issue: App/Index.ts does not import or register any frontend route handlers, regardless of whether the frontend assets are built and present in the image.


Summary

  1. CI must build the App image with frontend FeatureSets included — the Dockerfile.tpl production path needs to COPY and build all frontend FeatureSets
  2. App/Index.ts must import and register frontend route handlers (Accounts, Dashboard, StatusPage, AdminDashboard, PublicDashboard)
  3. TypeScript errors on main must be fixed — the codebase doesn't compile cleanly
  4. Ingress nginx config needs a configurable DNS resolver or should be deprecated in favor of documenting direct App/Telemetry exposure
  5. Docker tags need to be rebuilt once the above are fixed — current release and test tags are non-functional for self-hosting
*Originally created by @freedbygrace on 3/28/2026* I am close to getting this working, but I have tried the QuickStart script and I have tried manually defining a docker compose from scratch. I must be missing something important to get this going. I worked through the errors and copied the output and used AI to summarize the issues below. # OneUptime Upstream Issues — Docker Self-Host Is Broken Collected while attempting to self-host via Docker Compose. Ref: https://github.com/OneUptime/oneuptime/issues/2195 --- ## 1. Published Docker Images Have No Frontend Both `release` and `test` tags of `oneuptime/app` ship with **only 3 FeatureSets**: - `BaseAPI` - `Identity` - `Notification` The frontend FeatureSets (`Accounts`, `Dashboard`, `AdminDashboard`, `StatusPage`, `PublicDashboard`) are **completely absent** from the built image. `App/Index.ts` only imports the three above — no frontend routes are registered. **Result:** Every UI route returns `404 {"message":"Page not found"}`: ``` GET /accounts/login -> 404 GET /dashboard -> 404 GET /status-page -> 404 ``` Only `/status` (health check) and raw API endpoints work. --- ## 2. Dockerfile.tpl Generates a Backend-Only Dockerfile `App/Dockerfile.tpl` uses gomplate conditionals to optionally include frontend FeatureSets, but the **production path through CI does not enable them**. The generated Dockerfile for `release`/`test` tags contains: - No `COPY` for any frontend FeatureSet directories - No `npm install` for frontend FeatureSet dependencies - No `npm run build-frontends:prod` step - `Index.ts` has no imports for frontend route handlers The source code has consolidated all services into the App container, but the CI pipeline has not caught up — it still builds a backend-only image. --- ## 3. Building From Source Fails — TypeScript Errors Building locally with `docker build -f App/Dockerfile .` fails at `npm run compile` (tsc) due to **upstream type errors in `main`**: ``` Common/Server/API/TelemetryAPI.ts(796,13): error TS2375 Common/Server/Services/ProfileAggregationService.ts(295,53): error TS2379 FeatureSet/PublicDashboard/src/Pages/DashboardView/DashboardVariableSelector.tsx(20,23): error TS2339 FeatureSet/PublicDashboard/src/Pages/DashboardView/DashboardViewPage.tsx(373,11): error TS2322 ``` Root causes: - `exactOptionalPropertyTypes: true` in tsconfig vs sloppy property assignments in TelemetryAPI - `PublicDashboard` references properties (`currentValue`, `options`, `dashboardMode`) that don't exist on the current type definitions **Workaround:** `RUN npm run compile || true` — JS files are still emitted since `noEmitOnError` is not set, but this should not be necessary. --- ## 4. Ingress Container Has Broken Nginx Config The `oneuptime/nginx` (Ingress) container ships with: - **Hardcoded `resolver 127.0.0.11`** — Docker's embedded DNS, which fails in many network configurations - **Upstream references to service names** (`app`, `telemetry`) that assume Docker Compose service discovery with specific network aliases - **No configurable DNS** — no env var to override the resolver - **Ports 80/443 assumed available** — common conflict on hosts already running a reverse proxy For anyone running an edge proxy (Nginx, Traefik, Caddy), the Ingress is redundant and adds a broken layer. The only backends are: | Path | Backend | |------|---------| | `/accounts`, `/dashboard`, `/api`, `/status-page`, etc. | App:3002 | | `/telemetry`, `/probe-ingest`, OTLP | Telemetry:3403 (+ 4317/4318) | --- ## 5. No Working Self-Host Path Exists | Approach | Result | |----------|--------| | `release` tag | No frontend — 404 on all UI routes | | `test` tag | No frontend — 404 on all UI routes | | Ingress container | Broken DNS resolver, port conflicts | | Build from source | Fails on TypeScript errors without `\|\| true` hack | | Build from source + hack | Builds, but `Index.ts` still only registers 3 backend FeatureSets — **frontend still 404** | The fundamental issue: **`App/Index.ts` does not import or register any frontend route handlers**, regardless of whether the frontend assets are built and present in the image. --- ## Summary 1. **CI must build the App image with frontend FeatureSets included** — the Dockerfile.tpl production path needs to COPY and build all frontend FeatureSets 2. **`App/Index.ts` must import and register frontend route handlers** (Accounts, Dashboard, StatusPage, AdminDashboard, PublicDashboard) 3. **TypeScript errors on `main` must be fixed** — the codebase doesn't compile cleanly 4. **Ingress nginx config needs a configurable DNS resolver** or should be deprecated in favor of documenting direct App/Telemetry exposure 5. **Docker tags need to be rebuilt** once the above are fixed — current `release` and `test` tags are non-functional for self-hosting
MrUnknownDE added the bugbug labels 2026-04-05 16:18:41 +02:00
Sign in to join this conversation.
No Label bug bug
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/oneuptime#10