this post was submitted on 14 Aug 2023
4 points (100.0% liked)

Lemmy Support

4652 readers
1 users here now

Support / questions about Lemmy.

Matrix Space: #lemmy-space

founded 5 years ago
MODERATORS
 

I have been struggling with getting a docker setup of lemmy running on amr64 server and I almost got it going.

docker compose up -d

  • Then i go to my domain.com/setup and try to make my first admin user.
  • When I click Sign Up, I get an error:

SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data

Server:

VPS, 2 cpu cores, 12 GB ram Ubuntu OS Caddy as reverse proxy, but I left nginx in the docker-compose file

Logs

docker-compose.yml https://pastebin.com/XHUbMKJL

docker compose logs https://pastebin.com/TzZyK1kN

Caddyfile https://pastebin.com/CjJWthSe

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (3 children)

These aren't really what you are looking for in the Firefox console. They tell you the line of code with the error, but not which page has the JSON missing itself.

I notice your server says Lemmy 0.18.0 - the current is 0.18.4 - any reason you are attempting an older version?

/api/v3/user/register

those are the kind of paths you are looking for that can't be reached and your proxy likely isn't forwarding correctly to the lemmy_server Rust app.

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago) (2 children)

I am running this on an arm64 server and there isn't an official docker build for arm.

I figured out how to get past that screen.

I added this to my Caddyfile after reading this https://caddy.community/t/caddy-v2-how-to-proxy-websoket-v2ray-websocket-tls/7040/9

tw.arkadi.one {
        import caddy-common
        reverse_proxy   http://localhost:1234

        @websockets {
                header Connection Upgrade
                header Upgrade websocket
        }

        handle @lemmy {
                reverse_proxy @websockets   http://lemmy_lemmy_1:8536
}

I got my instance running. Thanks for the suggestions.

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

Lemmy 0.18.x doesn't use websockets that I know, so I'm not sure why this helped.

I mentioned you are trying to use arm on GitHub... https://github.com/LemmyNet/lemmy/issues/3102

[–] [email protected] 2 points 1 year ago

Thanks! I was going to post something on the documentation github about my hack. I'm not sure why it worked but adding that worked.

Maybe it is something to do with Caddy and Nginx not working well together?

We really need an ARM build of this though.