I've had my Gitea-Mirror container running for a few months. yesterday I needed to migrated the host to a new network, so re-ip'd the host, brought docker and all my containers backup. Everything worked except Gitea-Mirror.
Here's the console logs:
No custom CA certificates found in /app/certs
System CA bundle mounted, configuring Node.js to use it...
NODE_EXTRA_CA_CERTS set to: /etc/ssl/certs/ca-certificates.crt
Using previously generated ENCRYPTION_SECRET
ENCRYPTION_SECRET has been set to a secure random value
Database already exists, Drizzle will check for pending migrations on startup...
Setting application version: 3.14.2
Checking for environment configuration...
No GitHub/Gitea environment variables found, skipping env config initialization.
✅ Environment configuration loaded successfully
Running startup recovery...
Running startup recovery using compiled script...
Successfully connected to SQLite database using Bun's native driver
🔄 Checking for pending migrations...
✅ Database migrations completed successfully
=== Gitea Mirror Startup Recovery ===
Timeout: 30000ms
Force recovery: false
Checking if recovery is needed...
✅ No jobs need recovery. Startup can proceed.
✅ Startup recovery completed successfully
Running repository status repair...
Running repository repair using compiled script...
Successfully connected to SQLite database using Bun's native driver
🔄 Checking for pending migrations...
✅ Database migrations completed successfully
Checking 1361 repositories for status inconsistencies...
Request timeout: 15000ms | Progress interval: every 100 repositories
⚠️ Skipping repo1; Gitea was slow/unreachable during lookup
⚠️ Skipping repo2; Gitea was slow/unreachable during lookup
⚠️ Gitea lookup issue for mshields/repo3: Unable to connect. Is the computer able to access the url?
⚠️ Skipping repo3; Gitea was slow/unreachable during lookup
ℹ️ Additional slow/unreachable lookup warnings suppressed; progress logs will continue
⚠️ Gitea lookup issue for mshields/repo4: Unable to connect. Is the computer able to access the url?
⚠️ Gitea lookup issue for mshields/repo5: Unable to connect. Is the computer able to access the url?
And here's my portainer stack/docker compose(started with the basic compose example):
Originally created by @mattboston on GitHub (Apr 8, 2026).
Original GitHub issue: https://github.com/RayLabsHQ/gitea-mirror/issues/260
I've had my Gitea-Mirror container running for a few months. yesterday I needed to migrated the host to a new network, so re-ip'd the host, brought docker and all my containers backup. Everything worked except Gitea-Mirror.
Here's the console logs:
```
No custom CA certificates found in /app/certs
System CA bundle mounted, configuring Node.js to use it...
NODE_EXTRA_CA_CERTS set to: /etc/ssl/certs/ca-certificates.crt
Using previously generated ENCRYPTION_SECRET
ENCRYPTION_SECRET has been set to a secure random value
Database already exists, Drizzle will check for pending migrations on startup...
Setting application version: 3.14.2
Checking for environment configuration...
No GitHub/Gitea environment variables found, skipping env config initialization.
✅ Environment configuration loaded successfully
Running startup recovery...
Running startup recovery using compiled script...
Successfully connected to SQLite database using Bun's native driver
🔄 Checking for pending migrations...
✅ Database migrations completed successfully
=== Gitea Mirror Startup Recovery ===
Timeout: 30000ms
Force recovery: false
Checking if recovery is needed...
✅ No jobs need recovery. Startup can proceed.
✅ Startup recovery completed successfully
Running repository status repair...
Running repository repair using compiled script...
Successfully connected to SQLite database using Bun's native driver
🔄 Checking for pending migrations...
✅ Database migrations completed successfully
Checking 1361 repositories for status inconsistencies...
Request timeout: 15000ms | Progress interval: every 100 repositories
⚠️ Skipping repo1; Gitea was slow/unreachable during lookup
⚠️ Skipping repo2; Gitea was slow/unreachable during lookup
⚠️ Gitea lookup issue for mshields/repo3: Unable to connect. Is the computer able to access the url?
⚠️ Skipping repo3; Gitea was slow/unreachable during lookup
ℹ️ Additional slow/unreachable lookup warnings suppressed; progress logs will continue
⚠️ Gitea lookup issue for mshields/repo4: Unable to connect. Is the computer able to access the url?
⚠️ Gitea lookup issue for mshields/repo5: Unable to connect. Is the computer able to access the url?
```
And here's my portainer stack/docker compose(started with the basic compose example):
```
services:
gitea-mirror:
image: ghcr.io/raylabshq/gitea-mirror:latest
container_name: gitea-mirror
restart: unless-stopped
ports:
- "${PORT:-4321}:4321"
volumes:
- gitea-mirror-data:/app/data:rw
environment:
- BETTER_AUTH_SECRET={redacted} # Min 32 chars, required for sessions
- BETTER_AUTH_URL=${BETTER_AUTH_URL:-http://localhost:4321}
- BETTER_AUTH_TRUSTED_ORIGINS=${BETTER_AUTH_TRUSTED_ORIGINS:-http://localhost:4321}
- NODE_ENV=production
- DATABASE_URL=file:data/gitea-mirror.db
- HOST=0.0.0.0
- PORT=4321
- PUBLIC_BETTER_AUTH_URL=${PUBLIC_BETTER_AUTH_URL:-http://localhost:4321}
- MIRROR_ISSUE_CONCURRENCY=${MIRROR_ISSUE_CONCURRENCY:-3}
- MIRROR_PULL_REQUEST_CONCURRENCY=${MIRROR_PULL_REQUEST_CONCURRENCY:-5}
- GITEA__log__MODE=console
- GITEA__log__LEVEL=Debug
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=3", "--spider", "http://localhost:4321/api/health"]
interval: 30s
timeout: 10s
retries: 5
start_period: 15s
networks:
- gitea-mirror
volumes:
gitea-mirror-data: # Database volume
networks:
gitea-mirror:
driver: bridge
```
From the logs, it looks like Gitea Mirror is starting up fine — the problem is it can't reach your Gitea instance anymore because the URL saved in the config still points to your old IP.
The easiest fix: just open the Gitea Mirror web UI, go to Settings, and update your Gitea URL to the new IP address. Once that's saved, everything should reconnect and work as before.
To make things more resilient for future network changes, a couple of tips:
Use a Docker service name instead of an IP — If your Gitea container is on the same Docker network, you can use something like http://gitea:3000 as the URL. Docker DNS handles the rest, so IP changes won't matter.
Set GITEA_URL in your docker-compose — Adding GITEA_URL=http://<your-gitea-address>:3000 as an environment variable means the config gets applied on startup, making it easier to change in one place next time.
Let me know if that sorts it out!
<!-- gh-comment-id:4212248363 -->
@arunavo4 commented on GitHub (Apr 9, 2026):
Hey @mattboston
From the logs, it looks like Gitea Mirror is starting up fine — the problem is it can't reach your Gitea instance anymore because the URL saved in the config still points to your old IP.
The easiest fix: just open the Gitea Mirror web UI, go to **Settings**, and update your Gitea URL to the new IP address. Once that's saved, everything should reconnect and work as before.
To make things more resilient for future network changes, a couple of tips:
- **Use a Docker service name instead of an IP** — If your Gitea container is on the same Docker network, you can use something like `http://gitea:3000` as the URL. Docker DNS handles the rest, so IP changes won't matter.
- **Set `GITEA_URL` in your docker-compose** — Adding `GITEA_URL=http://<your-gitea-address>:3000` as an environment variable means the config gets applied on startup, making it easier to change in one place next time.
Let me know if that sorts it out!
Previously the Gitea url was set with the gui. I added GITEA_URL in my docker-compose and that fixed it. Thanks
<!-- gh-comment-id:4214759372 -->
@mattboston commented on GitHub (Apr 9, 2026):
Previously the Gitea url was set with the gui. I added `GITEA_URL` in my docker-compose and that fixed it. Thanks
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @mattboston on GitHub (Apr 8, 2026).
Original GitHub issue: https://github.com/RayLabsHQ/gitea-mirror/issues/260
I've had my Gitea-Mirror container running for a few months. yesterday I needed to migrated the host to a new network, so re-ip'd the host, brought docker and all my containers backup. Everything worked except Gitea-Mirror.
Here's the console logs:
And here's my portainer stack/docker compose(started with the basic compose example):
@arunavo4 commented on GitHub (Apr 9, 2026):
Hey @mattboston
From the logs, it looks like Gitea Mirror is starting up fine — the problem is it can't reach your Gitea instance anymore because the URL saved in the config still points to your old IP.
The easiest fix: just open the Gitea Mirror web UI, go to Settings, and update your Gitea URL to the new IP address. Once that's saved, everything should reconnect and work as before.
To make things more resilient for future network changes, a couple of tips:
Use a Docker service name instead of an IP — If your Gitea container is on the same Docker network, you can use something like
http://gitea:3000as the URL. Docker DNS handles the rest, so IP changes won't matter.Set
GITEA_URLin your docker-compose — AddingGITEA_URL=http://<your-gitea-address>:3000as an environment variable means the config gets applied on startup, making it easier to change in one place next time.Let me know if that sorts it out!
@mattboston commented on GitHub (Apr 9, 2026):
Previously the Gitea url was set with the gui. I added
GITEA_URLin my docker-compose and that fixed it. Thanks