Cannot get this to work. #58

Closed
opened 2026-10-05 01:38:19 +02:00 by adam · 3 comments
Owner

I followed the exact steps below.

# Clone repository
git clone https://github.com/RayLabsHQ/gitea-mirror.git
cd gitea-mirror

# Start with simplified setup
docker compose -f docker-compose.alt.yml up -d

I even followed the guide in docker-compose.alt.yml and I even created .env and set the BETTER_AUTH_SECRET.

Docker compose worked fine, pull down the container, launched it, and I managed to create a new account and able to log in.

However, when I use another browser to log in, it says "Invalid origin". Obviously I know the email and password since I just created the account.

Image

And then what's more interesting is that on the browser that I originally created the account, I can't sign out from clicking the top right button and select Logout. Nothing happens. I remain logged in.

As the result I cannot proceed to set up github and gitea since I cannot reliably log in and out of gitea-mirror. Can someone point out what I did wrong?

I followed the exact steps below. ``` # Clone repository git clone https://github.com/RayLabsHQ/gitea-mirror.git cd gitea-mirror # Start with simplified setup docker compose -f docker-compose.alt.yml up -d ``` I even followed the guide in `docker-compose.alt.yml` and I even created `.env` and set the `BETTER_AUTH_SECRET`. Docker compose worked fine, pull down the container, launched it, and I managed to create a new account and able to log in. However, when I use another browser to log in, it says "Invalid origin". Obviously I know the email and password since I just created the account. <img width="366" height="85" alt="Image" src="https://github.com/user-attachments/assets/0de09890-29ab-4645-b4f5-08d64fa68938" /> And then what's more interesting is that on the browser that I originally created the account, I can't sign out from clicking the top right button and select Logout. Nothing happens. I remain logged in. As the result I cannot proceed to set up github and gitea since I cannot reliably log in and out of gitea-mirror. Can someone point out what I did wrong? <!-- github-sync-id:3515184757 -->
adam closed this issue 2026-10-05 01:38:19 +02:00
Author
Owner

Looks like i figured it out. I ended up referring to #63 and added both BETTER_AUTH_URL and BETTER_AUTH_TRUSTED_ORIGINS to .env, and that fixed the problem.

Looks like i figured it out. I ended up referring to #63 and added both `BETTER_AUTH_URL` and `BETTER_AUTH_TRUSTED_ORIGINS` to `.env`, and that fixed the problem. <!-- github-comment-id:3403375625 -->
Author
Owner

Yea I will update the readme and the docker compose to add these vars

Yea I will update the readme and the docker compose to add these vars <!-- github-comment-id:3404183096 -->
Author
Owner

I have updated the docker-compose.alt.yml to better solve this

I have updated the `docker-compose.alt.yml` to better solve this <!-- github-comment-id:3430426153 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/gitea-mirror#58