Skip to content

Tianji Docker instance failing to start service #249

Open

Description

@SKJoy

Tianji won't start

Been trying for days, with latest and other prior releases, with completely fresh instances, and severly failed to bring Tianji up and running.

I will miss Tianji for sure :(

Container log loop

> tianji@1.31.13 start:docker:db /app/tianji
> cd src/server && pnpm db:migrate:apply && pnpm ch:migrate:apply
2026/02/14 12:17:07 Send request error: Post "http://localhost:12345/serverStatus/report": dial tcp 127.0.0.1:12345: connect: connection refused
> @tianji/server@ db:migrate:apply /app/tianji/src/server
> prisma migrate deploy
2026/02/14 12:17:12 Send request error: Post "http://localhost:12345/serverStatus/report": dial tcp 127.0.0.1:12345: connect: connection refused
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "tianji", schema "public" at "tianji_postgres:5432"
2026/02/14 12:17:17 Send request error: Post "http://localhost:12345/serverStatus/report": dial tcp 127.0.0.1:12345: connect: connection refused
79 migrations found in prisma/migrations
No pending migrations to apply.
2026/02/14 12:17:22 Send request error: Post "http://localhost:12345/serverStatus/report": dial tcp 127.0.0.1:12345: connect: connection refused
> tianji@1.31.13 start:docker /app/tianji
> pnpm start:docker:db && pnpm start
> tianji@1.31.13 start:docker:db /app/tianji
> cd src/server && pnpm db:migrate:apply && pnpm ch:migrate:apply
> @tianji/server@ db:migrate:apply /app/tianji/src/server
> prisma migrate deploy
2026/02/14 12:17:35 Start reporting...
2026/02/14 12:17:35 Mode: http
2026/02/14 12:17:35 Version: 1.0.0
2026/02/14 12:17:40 Send request error: Post "http://localhost:12345/serverStatus/report": dial tcp 127.0.0.1:12345: connect: connection refused

Environment

  • Infrastructure: Linux LxC under Proxmox VE
  • Operating system: Alpine
  • Deployment: Docker
  • Reverse proxy: NginX Proxy Manager on anoterh LxC with SSL enabled

Docker compose

  tianji-redis:
    image: redis:latest
    restart: unless-stopped
    volumes:
      - ./Tianji/Redis/Data:/data
      - ./Tianji/Redis/Configuration:/usr/local/etc/redis

  tianji_postgres:
    image: postgres:15.4-alpine
    restart: unless-stopped
    environment:
      POSTGRES_DB: tianji
      POSTGRES_USER: tianji
      POSTGRES_PASSWORD: tianji
    volumes:
      - ./Tianji/Postgres:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
      interval: 5s
      timeout: 5s
      retries: 5

  tianji:
    image: moonrailgun/tianji:latest
    restart: unless-stopped
    tmpfs:
      - /tmp
    depends_on:
      - tianji-redis
      - tianji_postgres
    environment:
      PUBLIC_URL: ""
      ALLOW_REGISTER: false
      EMAIL_SERVER: "** REDACTED **"
      EMAIL_FROM: "** REDACTED **"
      JWT_SECRET: "** REDACTED **"
      CUSTOM_TRACKER_SCRIPT_NAME: "tianji.js"
      AMAP_TOKEN: "** REDACTED **"
      MAPBOX_TOKEN: "** REDACTED **"
      AUTH_CUSTOM_TYPE: "oidc"
      AUTH_CUSTOM_NAME: "** REDACTED **"
      AUTH_CUSTOM_ISSUER: "** REDACTED **"
      AUTH_CUSTOM_ID: "** REDACTED **"
      AUTH_CUSTOM_SECRET: "** REDACTED **"
      AUTH_GITHUB_ID: ""
      AUTH_GITHUB_SECRET: ""
      AUTH_GOOGLE_ID: ""
      AUTH_GOOGLE_SECRET: ""
      DISABLE_AUTO_CLEAR: false
      DISABLE_ANONYMOUS_TELEMETRY: true
      ALLOW_OPENAPI: true
      ENABLE_FUNCTION_WORKER: true
      DATABASE_URL: postgresql://tianji:tianji@tianji_postgres:5432/tianji
      REDIS_URL: redis://tianji-redis:6379
    ports:
      - 0.0.0.0:12345:12345

Activity

  1. dows commented on Feb 17, 2026

    @dows

    Same here. Sometimes it spins up after a couple redepolys and restarts

  2. marked Tianji does not start #248 as a duplicate of this issue on Feb 18, 2026
  3. moonrailgun commented on Mar 13, 2026

    @moonrailgun
    Contributor

    Hi, thanks for reporting this.

    From your logs, the database migration completes fine, but the server process seems to get killed silently right after — no error message at all. This usually means the system ran out of memory (OOM).

    Tianji needs more memory during the first startup because it runs database migrations. Once the server is up and running, it uses much less. We recommend at least 2 GB RAM for the initial startup.

    If your server doesn't have that much physical memory, you can add swap space as a workaround:

    sudo fallocate -l 2G /swapfile
    sudo chmod 600 /swapfile
    sudo mkswap /swapfile
    sudo swapon /swapfile

    You can also run docker stats while the container is starting to see if memory usage is hitting the limit.

  4. SKJoy commented on Mar 18, 2026

    @SKJoy
    Author

    Hi, thanks for reporting this.

    From your logs, the database migration completes fine, but the server process seems to get killed silently right after — no error message at all. This usually means the system ran out of memory (OOM).

    Tianji needs more memory during the first startup because it runs database migrations. Once the server is up and running, it uses much less. We recommend at least 2 GB RAM for the initial startup.

    If your server doesn't have that much physical memory, you can add swap space as a workaround:

    sudo fallocate -l 2G /swapfile
    sudo chmod 600 /swapfile
    sudo mkswap /swapfile
    sudo swapon /swapfile
    You can also run docker stats while the container is starting to see if memory usage is hitting the limit.

    You are absolutely correct. I ran a few tests and verified the following;

    • At least 2 GB memory; 4 GB recommended
    • At least 1 core CPU; 2 core CPU recommended

    I tried it on a Proxmox VE LXC with 0.5 CPU limit and it failed, even with adequate memory!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ 换网址