Hello, I've been trying to host my own lemmy instance for a little while now but have yet to be successful.
I recently had my lemmy instance running but i could not find other communities, so i decided to remove everything and try again. Now however when i try to create an account or log in i get the error 404 for the file /api/v3/user/loginand nothing happens.
I've tried removing everything again and starting again but it is still not working
in the lemmy docker container i get the following error
2023-07-06T12:27:55.845049Z WARN lemmy_server::root_span_builder: couldnt_find_that_username_or_email: Record not found
1: lemmy_server::root_span_builder::HTTP request
0: lemmy_api::local_user::login::perform
at crates/api/src/local_user/login.rs:16
with http.method=POST http.scheme="http" http.host=lemmy.emphisia.nl http.target=/api/v3/user/login otel.kind="server" request_id=7896c156-ba9f-42cd-8f1a-c0233c3018a7
LemmyError { message: Some("couldnt_find_that_username_or_email"), inner: Record not found, context: SpanTrace [{ target: "lemmy_api::local_user::login", name: "perform", fields: "self=Login { username_or_email: Sensitive, password: Sensitive, totp_2fa_token: None }", file: "crates/api/src/local_user/login.rs", line: 16 }, { target: "lemmy_server::root_span_builder", name: "HTTP request", fields: "http.method=POST http.scheme=\"http\" http.host=lemmy.emphisia.nl http.target=/api/v3/user/login otel.kind=\"server\" request_id=7896c156-ba9f-42cd-8f1a-c0233c3018a7", file: "src/root_span_builder.rs", line: 16 }] }
with self=Login { username_or_email: Sensitive, password: Sensitive, totp_2fa_token: None }
at src/root_span_builder.rs:16
edit: i just managed to log in, however the federation does not seem to be working. None show up in the communities tab and if i look for any communities i get no results and this in the log
2023-07-06T14:09:32.699162Z WARN lemmy_server::root_span_builder: couldnt_find_object: Failed to resolve actor via webfinger
0: lemmy_apub::fetcher::search::search_query_to_object_id
at crates/apub/src/fetcher/search.rs:19
1: lemmy_apub::api::resolve_object::perform
with self=ResolveObject { q: "!asklemmy", auth: Sensitive }
at crates/apub/src/api/resolve_object.rs:21
2: lemmy_server::root_span_builder::HTTP request
with http.method=GET http.scheme="http" http.host=lemmy.emphisia.nl http.target=/api/v3/resolve_object otel.kind="server" request_id=34386e88-9099-4d83-a6a2-360ee7924064
at src/root_span_builder.rs:16
LemmyError { message: Some("couldnt_find_object"), inner: Failed to resolve actor via webfinger, context: SpanTrace [{ target: "lemmy_apub::fetcher::search", name: "search_query_to_object_id", file: "crates/apub/src/fetcher/search.rs", line: 19 }, { target: "lemmy_apub::api::resolve_object", name: "perform", fields: "self=ResolveObject { q: \"!asklemmy\", auth: Sensitive }", file: "crates/apub/src/api/resolve_object.rs", line: 21 }, { target: "lemmy_server::root_span_builder", name: "HTTP request", fields: "http.method=GET http.scheme=\"http\" http.host=lemmy.emphisia.nl http.target=/api/v3/resolve_object otel.kind=\"server\" request_id=34386e88-9099-4d83-a6a2-360ee7924064", file: "src/root_span_builder.rs", line: 16 }] }
it doesn't matter what i search, this always happens
23 Comments
moira@femboys.bar · 1 pts · 3y
Hey, could you provide more details about setup? Are you using ansible or docker? Using any other reverse proxy?
youpie_temp@reddthat.com · 1 pts · 3y
im using an nginx reverse proxy with the template provided by lemmy.(this one) Im using the docker install the website is lemmy.emphisia.nl
ActuallyRuben@actuallyruben.nl · 2 pts · 3y
I'm surprised the docker guide still isn't fixed, the Ansible template got updated to use 2 nginx configs. Take a look at the second one: https://raw.githubusercontent.com/LemmyNet/lemmy-ansible/main/templates/nginx_internal.conf
It splits traffic between the UI and the backend.
youpie_temp@reddthat.com · 1 pts · 3y
I am actually already running that config in the internal nginx, but i've never changed anything about it. what do i need to specify when they say "# this needs to map to the lemmy (server) docker service hostname" do they want the name of the docker container, and do they want the internal or external port?
ActuallyRuben@actuallyruben.nl · 1 pts · 3y
Yes, the hostname of a docker container is the name you set in the docker-compose file. IIRC the port should be the internal port.
Andreas@feddit.dk · 1 pts · 3y
I don't use NGINX as my proxy server, but it's a bit strange that you would need two configs for this while mine runs perfectly with one config and two open ports (:8536 for Lemmy-BE and :1234 for Lemmy-UI). And why are you using different versions of Lemmy-BE (18.1-rc9) and Lemmy-UI (18.1-rc4)?
If you are using the default
docker-compose.ymlon the Lemmy repo, that part of the NGINX config uses https:// + the name of the Docker containers. And you always give NGINX the external port (the number on the right side of the colon defined inports:, like 1234 in1234:5678). The port on the left is only known to the container the port is defined for.If it's still broken after you correct the NGINX config, what are your
docker-compose.ymlandconfig.hjsonlike? There's several versions of them floating around and you might have combined incompatible versions with each other.youpie_temp@reddthat.com · 1 pts · 3y
I am using two nginx servers because one nginx server is used by lemmy to give me one port to access. And the other one i use to set up my reverse proxy so that i can host more than one service on my server.
I dont know why i have different versions of the ui and backend. I am just using the latest version avalible on the docker website.
My docker compose file looks like this and the lemmy config file looks like this i got this config from here because i was looking for a way to correctly set-up my email because de documentation about the config file is really bad. But when using the default config file (found here).
Andreas@feddit.dk · 1 pts · 3y
Yeah, the config file on the documentation sucks. I had to poke through several discussions on /c/selfhosting to find a config that wasn't the extremely minimal one linked in the documentation. Your
config.hjsonis fine from what I can tell, although I'm not sure why you censored thehostnamethere as it's supposed to belemmy.emphisia.nland not anything confidential.Honestly, I don't have enough understanding of NGINX to debug its config, so I'll just share my docker-compose.yml for leddit.danmark.party which worked correctly and federated out of the box, with a few adjustments to match your deployment. Note that you'll have to tear down your existing deployment if you want to use this docker-compose.yml because they use the same ports.
::: spoiler I should probably self-host my own pastebin
:::
youpie_temp@reddthat.com · 1 pts · 3y
thank you very much for your config file, however on pasting it and running it, i get the error
youpie_temp@reddthat.com · 1 pts · 3y
is this one for the internal Lemmy nginx or the reverse proxy?edit: the name makes that quite clear