standardnotes / server

Server ecosystem for Standard Notes; fully self-hostable.
https://standardnotes.com/help/self-hosting/docker
GNU General Public License v3.0
267 stars 62 forks source link

App and web keep asking me for login (self-hosted) #1060

Closed lfloresbatista closed 4 months ago

lfloresbatista commented 4 months ago

I'm testing standard notes server with all the configuration, everything going well, but when i login to sync with my server the app (web and desktop) still asking me for login constantly, im sharing you the docker-compose file, and the logs of the different containers:

compose file:

version: '3.7'

services:
  server:
    image: standardnotes/server
    container_name: sersnotes_server
#    hostname: snotes
    restart: unless-stopped
    ports:
      - 3000:3000
      - 3125:3104
    volumes:
      - logs:/var/lib/server/logs
      - uploads:/opt/server/packages/files/dist/uploads
    environment:
      DB_HOST: mysql
      DB_PORT: 3306
      DB_USERNAME: snotes_usr
      DB_PASSWORD: *****
      DB_DATABASE: snotesdb
      DB_TYPE: mysql
      #run for each env openssl rand -hex 32
      AUTH_JWT_SECRET: 1c5c1defbd68c6167a1656a1d8bcef641dcfab2df6ac7e80adba2feb580537b8
      AUTH_SERVER_ENCRYPTION_SERVER_KEY: 405b060dcf42674d36eec5bceeed240638fc5bdbc5539c5237a34291f1fd92e0
      VALET_TOKEN_SECRET: b77f7d78317d23c2002b18dfe0a8e35d726bac2125b567ea2bd87af535386d90
      REDIS_PORT: 6379
      REDIS_HOST: cache
      CACHE_TYPE: redis
      PUBLIC_FILES_SERVER_URL: http://localhost:3125
    networks:
      - okami-bridge
    depends_on:
      - cache

  web:
    image: standardnotes/web
    container_name: notes
    restart: unless-stopped
    ports:
      - 88:80
    depends_on:
      - server
      - cache
    networks:
      - okami-bridge

  localstack:
    image: localstack/localstack:3.5.0
    container_name: localstack_self_hosted
    expose:
      - 4566
    restart: unless-stopped
    environment:
      SERVICES: sns,sqs
      HOSTNAME_EXTERNAL: localstack
      LS_LOG: warn
    volumes:
      - /var/lib/docker/volumes/files/scripts/localstack_bootstrap.sh:/etc/localstack/init/ready.d/localstack_bootstrap.sh
    networks:
      - okami-bridge

  cache:
    image: redis:6.0-alpine
    container_name: snotes_cache
    volumes:
      - redis:/data
    expose:
      - 6379
    restart: unless-stopped
    environment:
      REDIS_PORT: 6379
      REDIS_HOST: cache
      CACHE_TYPE: redis
    networks:
      - okami-bridge

networks:
  okami-bridge:
    external: true

volumes:
  logs:
  uploads:
  redis:

i'm using a mysql container thar i already use for my homelabs, this container is in the same network as the snote server, im sharing the ping response: image

These are the logs for the entire container: image

Sync web screenshot:

image

if someone can give some light about, I'll appreciate it

Wadera commented 4 months ago

It seems like current server version is buggy.

Try to specify older version:

services:
  server:
    image: standardnotes/server:5c02435ee478b893747d3f9e41062aae12d7ff10
    env_file: .env
    container_name: server_self_hosted
    restart: unless-stopped
    links:
(...)
lfloresbatista commented 4 months ago

It seems like current server version is buggy.

Try to specify older version:

services:
  server:
    image: standardnotes/server:5c02435ee478b893747d3f9e41062aae12d7ff10
    env_file: .env
    container_name: server_self_hosted
    restart: unless-stopped
    links:
(...)

Excellent, I tested a most recently tag (without "latest" tag), and it did work in the webapp but the desktop-app didn't work, these is the tag that i used:

"9de33528853f22187f10a49fe301756cc8c65fa8" ❌

"5c02435ee478b893747d3f9e41062aae12d7ff10" ✅

So, as you recommended, that is the right image version to use.

thank you very much

vocux commented 3 months ago

Is this now fixed on the latest server version?

stevesbrain commented 3 months ago

Is this now fixed on the latest server version?

No, this is still broken

RamonAbudAlcala commented 2 months ago

The most current fix is here https://github.com/standardnotes/forum/issues/3635