vrtmrz / obsidian-livesync

MIT License
4.7k stars 151 forks source link

Cant connect to the server #277

Open Lebbbbb opened 1 year ago

Lebbbbb commented 1 year ago

Hello!

I am self hosting this and have come into an issue, I cant connect to the URI Please let me know if there is any more information you need to help me with this problem. image

Local.ini

single_node=true
max_document_size = 50000000

[chttpd]
require_valid_user = true
max_http_request_size = 4294967296
enable_cors = true

[chttpd_auth]
require_valid_user = true
authentication_redirect = /_utils/session.html

[httpd]
WWW-Authenticate = Basic realm="couchdb"
bind_address = 0.0.0.0

[cors]
origins = app://obsidian.md, capacitor://localhost, http://localhost
credentials = true
headers = accept, authorization, content-type, origin, referer
methods = GET,PUT,POST,HEAD,DELETE
max_age = 3600

docker-compose.yml

services:
  couchdb:
    image: couchdb
    container_name: obsidian-livesync
    user: 1000:1000
    environment:
      - COUCHDB_USER=myUser
      - COUCHDB_PASSWORD=myPass
    volumes:
      - ./data:/opt/couchdb/data
      - ./local.ini:/obsidian-livesync/local.ini
    ports:
      - 5984:5984
    restart: unless-stopped

Thanks!

vrtmrz commented 1 year ago

I am really sorry for being late! And thank you for asking me! Your configuration seems to be correct. However, your Obsidian says that the connection has been refused. Could you please try to open the URL (which is shown in red in the log) on the web browser? If it is also refused, CouchDB might not be running correctly for some other reasons. So, please check the log of the container once again.

lucius346346 commented 1 year ago

Same here. It used to work fine at first and then it just stopped working. I can log into the database. I tried to recreate the docker container, to no avail. log.txt

lucius346346 commented 1 year ago

I removed Livesync completely and started over. It worked fine till today.