Trying to test lemmy on my vps ubuntu 20.04. Followed the docs but cant get to configured correctly.

root@*******:/lemmy# docker-compose up -d WARNING: The Hn variable is not set. Defaulting to a blank string. WARNING: The n4WfWc variable is not set. Defaulting to a blank string. Starting lemmy_iframely_1 … done Starting lemmy_pictrs_1 … done Starting lemmy_postgres_1 … done Starting lemmy_lemmy_1 … done Starting lemmy_lemmy-ui_1 … done

i think it has to do with my nginx lemmy.conf. I have replaced proxy pass 0.0.0.0 with my vps ip (is this correct?) but can’t get to working. Installed with letsencrypt and using cloudflare.

frontend

location / {
  # The default ports:
  # lemmy_ui_port: 1235
  # lemmy_port: 8536

  set $proxpass "http://0.0.0.0:1235";
  if ($http_accept = "application/activity+json") {
    set $proxpass "http://0.0.0.0:8536";
  }
  if ($http_accept = "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"") {
    set $proxpass "http://0.0.0.0:8536";
  }
  if ($request_method = POST) {
    set $proxpass "http://0.0.0.0:8536";
  }
  proxy_pass $proxpass;

  rewrite ^(.+)/+$ $1 permanent;

  # Send actual client IP upstream
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header Host $host;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

# backend
location ~ ^/(api|pictrs|feeds|nodeinfo|.well-known) {
  proxy_pass http://0.0.0.0:8536;
  proxy_http_version 1.1;
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection "upgrade";

  # Rate limit
  limit_req zone=lemmy_ratelimit burst=30 nodelay;

  # Add IP forwarding headers
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header Host $host;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}


# Redirect pictshare images to pictrs
location ~ /pictshare/(.*)$ {
  return 301 /pictrs/image/$1;
}

location /iframely/ {
  proxy_pass http://0.0.0.0:8061/;
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header Host $host;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

}

Anonymize IP addresses

https://www.supertechcrew.com/anonymizing-logs-nginx-apache/

map $remote_addr $remote_addr_anon { ~(?P<ip>\d+.\d+.\d+). $ip.0; ~(?P<ip>[:]+:[:]+): $ip::; 0.0.0.0 $remote_addr; ::1 $remote_addr; default 0.0.0.0; }

Please help. Thanks.

  • Dessalines
    link
    fedilink
    43 years ago

    Open up an issue on the github and post your docker compose file and lemmy.hjson.

    • @nutomic@lemmy.mlM
      link
      fedilink
      43 years ago

      I dont really think that github issues are the best place for that, i’d prefer to use them only for bugs or feature requests.

      @9toitoi5@lemmy.ml This seems more like a problem with your docker-compose.yml, did you make any changes to it? Try docker-compose logs.

      • @9toitoi5@lemmy.mlOP
        link
        fedilink
        13 years ago

        root@******:/lemmy# cat docker-compose.yml version: ‘2.2’

        services: postgres: image: postgres:12-alpine environment: - POSTGRES_USER=root - POSTGRES_PASSWORD=mypasswordhere - POSTGRES_DB=lemmy volumes: - ./volumes/postgres:/var/lib/postgresql/data restart: always

        lemmy: image: dessalines/lemmy:0.11.2 ports: - “127.0.0.1:8536:8536” restart: always environment: - RUST_LOG=“warn,lemmy_server=info,lemmy_api=info,lemmy_api_common=info,lemmy_api_crud=info,lemmy_apub=info,lemmy_apub_receive=info,lemmy_db_queries=info,lemmy_db_schema=info,lemmy_db_views=info,lemmy_db_views_actor=info,lemmy_db_views_moderator=info,lemmy_routes=info,lemmy_utils=info,lemmy_websocket=info” volumes: - ./lemmy.hjson:/config/config.hjson depends_on: - postgres - pictrs - iframely

        lemmy-ui: image: dessalines/lemmy-ui:0.11.2 ports: - “127.0.0.1:1235:1234” restart: always environment: - LEMMY_INTERNAL_HOST=lemmy:8536 - LEMMY_EXTERNAL_HOST=mydomain.com - LEMMY_HTTPS=true depends_on: - lemmy

        pictrs: image: asonix/pictrs:v0.2.6-r2 ports: - “127.0.0.1:8537:8080” user: 991:991 volumes: - ./volumes/pictrs:/mnt restart: always

        iframely: image: dogbin/iframely:latest ports: - “127.0.0.1:8061:80” volumes: - ./iframely.config.local.js:/iframely/config.local.js:ro restart: always mem_limit: 500m

        • @Dimber
          link
          13 years ago

          Hi, I’m a new user of Lemmy. I install my new server using ubuntu with docker then run commands step by step. my website URL: https://bimberspot.com

          • I link my domain to the* IP* of ubuntu servers
          • Run you command but no one works, any suggestions

          pictrs_1 | Error: Error in DB, IO error: Permission denied (os error 13) pictrs_1 | pictrs_1 | Caused by: pictrs_1 | IO error: Permission denied (os error 13) pictrs_1 | Error: Error in DB, IO error: Permission denied (os error 13) pictrs_1 | pictrs_1 | Caused by: pictrs_1 | IO error: Permission denied (os error 13) pictrs_1 | Error: Error in DB, IO error: Permission denied (os error 13) pictrs_1 | pictrs_1 | Caused by: pictrs_1 | IO error: Permission denied (os error 13) pictrs_1 | Error: Error in DB, IO error: Permission denied (os error 13) pictrs_1 | pictrs_1 | Caused by: pictrs_1 | IO error: Permission denied (os error 13) pictrs_1 | Error: Error in DB, IO error: Permission denied (os error 13) pictrs_1 | pictrs_1 | Caused by: pictrs_1 | IO error: Permission denied (os error 13) pictrs_1 | Error: Error in DB, IO error: Permission denied (os error 13) pictrs_1 | pictrs_1 | Caused by: pictrs_1 | IO error: Permission denied (os error 13) pictrs_1 | Error: Error in DB, IO error: Permission denied (os error 13) pictrs_1 | pictrs_1 | Caused by: pictrs_1 | IO error: Permission denied (os error 13) pictrs_1 | Error: Error in DB, IO error: Permission denied (os error 13) pictrs_1 | pictrs_1 | Caused by: pictrs_1 | IO error: Permission denied (os error 13) pictrs_1 | Error: Error in DB, IO error: Permission denied (os error 13) pictrs_1 | pictrs_1 | Caused by: pictrs_1 | IO error: Permission denied (os error 13) pictrs_1 | Error: Error in DB, IO error: Permission denied (os error 13) pictrs_1 | pictrs_1 | Caused by: pictrs_1 | IO error: Permission denied (os error 13) pictrs_1 | Error: Error in DB, IO error: Permission denied (os error 13) pictrs_1 | pictrs_1 | Caused by: pictrs_1 | IO error: Permission denied (os error 13) pictrs_1 | Error: Error in DB, IO error: Permission denied (os error 13) pictrs_1 | pictrs_1 | Caused by: pictrs_1 | IO error: Permission denied (os error 13) postgres_1 | The files belonging to this database system will be owned by user “postgres”. postgres_1 | This user must also own the server process. postgres_1 | postgres_1 | The database cluster will be initialized with locale “en_US.utf8”. postgres_1 | The default database encoding has accordingly been set to “UTF8”. postgres_1 | The default text search configuration will be set to “english”. postgres_1 | postgres_1 | Data page checksums are disabled. postgres_1 | postgres_1 | fixing permissions on existing directory /var/lib/postgresql/data … ok postgres_1 | creating subdirectories … ok postgres_1 | selecting dynamic shared memory implementation … posix postgres_1 | selecting default max_connections … 100 postgres_1 | selecting default shared_buffers … 128MB postgres_1 | selecting default time zone … UTC postgres_1 | creating configuration files … ok postgres_1 | running bootstrap script … ok postgres_1 | sh: locale: not found postgres_1 | 2021-08-27 19:42:10.056 UTC [31] WARNING: no usable system locale s were found postgres_1 | performing post-bootstrap initialization … ok postgres_1 | syncing data to disk … ok postgres_1 | postgres_1 | postgres_1 | Success. You can now start the database server using: postgres_1 | postgres_1 | pg_ctl -D /var/lib/postgresql/data -l logfile start postgres_1 | postgres_1 | initdb: warning: enabling “trust” authentication for local connect ions postgres_1 | You can change this by editing pg_hba.conf or using the option -A, or postgres_1 | --auth-local and --auth-host, the next time you run initdb. postgres_1 | waiting for server to start…2021-08-27 19:42:11.478 UTC [36] LO G: starting PostgreSQL 12.8 on x86_64-pc-linux-musl, compiled by gcc (Alpine 10 .3.1_git20210424) 10.3.1 20210424, 64-bit postgres_1 | 2021-08-27 19:42:11.480 UTC [36] LOG: listening on Unix socket “/ var/run/postgresql/.s.PGSQL.5432” postgres_1 | 2021-08-27 19:42:11.546 UTC [37] LOG: database system was shut do wn at 2021-08-27 19:42:11 UTC postgres_1 | 2021-08-27 19:42:11.559 UTC [36] LOG: database system is ready to accept connections postgres_1 | done postgres_1 | server started postgres_1 | CREATE DATABASE postgres_1 | postgres_1 | postgres_1 | /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-i nitdb.d/* postgres_1 | postgres_1 | 2021-08-27 19:42:12.048 UTC [36] LOG: received fast shutdown requ est postgres_1 | waiting for server to shut down…2021-08-27 19:42:12.054 UTC [36 ] LOG: aborting any active transactions postgres_1 | 2021-08-27 19:42:12.059 UTC [36] LOG: background worker “logical replication launcher” (PID 43) exited with exit code 1 postgres_1 | 2021-08-27 19:42:12.060 UTC [38] LOG: shutting down postgres_1 | 2021-08-27 19:42:12.069 UTC [36] LOG: database system is shut dow n postgres_1 | done postgres_1 | server stopped postgres_1 | postgres_1 | PostgreSQL init process complete; ready for start up. postgres_1 | postgres_1 | 2021-08-27 19:42:12.184 UTC [1] LOG: starting PostgreSQL 12.8 on x86_64-pc-linux-musl, compiled by gcc (Alpine 10.3.1_git20210424) 10.3.1 2021042 4, 64-bit postgres_1 | 2021-08-27 19:42:12.184 UTC [1] LOG: listening on IPv4 address “0 .0.0.0”, port 5432 postgres_1 | 2021-08-27 19:42:12.184 UTC [1] LOG: listening on IPv6 address “: :”, port 5432 postgres_1 | 2021-08-27 19:42:12.185 UTC [1] LOG: listening on Unix socket “/v ar/run/postgresql/.s.PGSQL.5432” postgres_1 | 2021-08-27 19:42:12.240 UTC [50] LOG: database system was shut do wn at 2021-08-27 19:42:12 UTC postgres_1 | 2021-08-27 19:42:12.250 UTC [1] LOG: database system is ready to

        • @9toitoi5@lemmy.mlOP
          link
          fedilink
          13 years ago

          i think it has to do with my nginx lemmy.conf. I have replaced proxy pass 0.0.0.0 with my vps ip (is this correct?) but can’t get to working. Installed with letsencrypt and using cloudflare.

          my previous post

      • @9toitoi5@lemmy.mlOP
        link
        fedilink
        13 years ago

        docker-compose logs : seemed to be postgres?? i also replaced postgres username and password in lemmy.hjson

        thread ‘main’ panicked at ‘Error connecting to postgres://root:mychangedpassword@postgres:5432/lemmy’, src/main.rs:43:25

        • @nutomic@lemmy.mlM
          link
          fedilink
          23 years ago

          Seems like your passwork is wrong. Did you change it after first start? In that case its easiest to stop everything (docker-compose down), delete the volumes folder, and start again. You can also start using docker-compose up (without -d) to see the logs from startup.

          • @9toitoi5@lemmy.mlOP
            link
            fedilink
            13 years ago

            thanks connected to postgres but still problems…we need lemmy installation docs for newbies.

            • @nutomic@lemmy.mlM
              link
              fedilink
              13 years ago

              What specifically do you think is missing from the docs? I suggest you try with Ansible, that configures everything automatically so you dont have to touch config files on the server.