outline-wiki-docker-compose icon indicating copy to clipboard operation
outline-wiki-docker-compose copied to clipboard

No Connection to Server

Open Halllo5 opened this issue 3 years ago • 6 comments

Hello I have installed everything successfully, but after opening Outline and logging in I can't edit any documents and after a few seconds I get the error message "connection to server lost". I use a raspberryPI 4b with 8GB ram Thanks for the help in advance

Halllo5 avatar May 19 '22 17:05 Halllo5

I'm having the same issue.

I've set it up on an AWS instance, after install I can create documents, but not modify any of its contents.

The web sockets seems to be failing, and the page shows "connection to server lost".

Edit: I've been able to fix it by following the NGINX guide from the outline docs -- although I'm not sure what exactly fixed it, I had to entirely stop/start my instance before it started working.

KevinVR avatar Jul 07 '22 20:07 KevinVR

@KevinVR hello man, can you please guide me how do you setup using aws on ec2 instance?

meakshayraut avatar Feb 02 '23 07:02 meakshayraut

@meakshayraut Im not sure if i can help you but i recently figured out how to set it up using only docker compose/portainer. The first thing i did was deploy [minio with docker] (https://min.io/docs/minio/container/index.html#procedure) first. After that I used the following docker compose to deploy outline.

All the {{ }} need to be replaced with the correct value (the same with the same value of course) Hope I could help, even if it was not what you asked for.

# https://tomjorge.me/how-to-deploy-your-own-internal-wiki-with-outline-in-self-hosted-version/

version: "3"
services:
  outline-redis:
    image: redis
    restart: always
  outline-postgres:
    image: postgres
    environment:
      POSTGRES_USER: {{POSTGRES_USER}}
      POSTGRES_PASSWORD: {{POSTGRES_PW}}
      POSTGRES_DB: {{POSTGRES_DB}}
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always
  outline:
    image: outlinewiki/outline:latest
    command: sh -c "yarn db:migrate --env production-ssl-disabled && yarn start"
    environment:
      ########## Outline Database
      - DATABASE_URL=postgres://{{POSTGRES_USER}}:{{POSTGRES_PW}}@outline-postgres:5432/{{POSTGRES_DB}}
      - DATABASE_URL_TEST=postgres://{{POSTGRES_USER}}:{{POSTGRES_PW}}@outline-postgres:5432/outline-test
      - REDIS_URL=redis://outline-redis:6379
      - SECRET_KEY={{SECRET_KEY}} # openssl rand -hex 32
      - UTILS_SECRET={{UTILS_SECRETE}} # openssl rand -hex 32
      ########## Outline mail settings
      - SMTP_HOST={{SMTP_HOST}}
      - SMTP_PORT={{SMTP_PORT}}
      - SMTP_USERNAME={{SMTP_USERNAME}}
      - SMTP_PASSWORD={{SMTP_PW}}
      - SMTP_FROM_EMAIL={{SMTP_FROM}}
      - SMTP_REPLY_EMAIL={{SMTP_REPLY}}
      ########## Outline Default URL
      - URL={{OUTLINE_URL}}  #Needs to be the url which you use to access it
      ########## OICD 
      ########## This uses Generic Oauth 2.0 but the other Providers do also work (just replace this part)
      ########## https://github.com/outline/outline/blob/main/.env.sample#L59
      - OIDC_CLIENT_ID={{OIDC_CLIENT_ID}}
      - OIDC_CLIENT_SECRET={{OIDC_CLIENT_SECRET}}
      - OIDC_AUTH_URI={{OIDC_AUTH_URI}}
      - OIDC_TOKEN_URI={{OIDC_TOKEN_URI}}
      - OIDC_USERINFO_URI={{OIDC_USERIF_URI}}
      - OIDC_USERNAME_CLAIM={{OIDC_USERNAME_CLAIM}}
      - OIDC_DISPLAY_NAME={{OIDC_DISPLAYNAME}}
      - OIDC_SCOPES={{OIDC_SCOPES}}
      ########## Outline S3 Provider credentials
      - AWS_ACCESS_KEY_ID={{S3_ACCESS_KEY}}
      - AWS_SECRET_ACCESS_KEY={{S3_SECRET_KEY}}
      - AWS_REGION={{S3_REGION}}
      - AWS_S3_UPLOAD_BUCKET_URL={{S3_URL}}
      - AWS_S3_UPLOAD_BUCKET_NAME={{S3_BUCKET_NAME}}
      - AWS_S3_UPLOAD_MAX_SIZE=26214400
      - AWS_S3_FORCE_PATH_STYLE=true
      - AWS_S3_ACL=private
      - PGSSLMODE=disable
    restart: always
    depends_on:
      - outline-postgres
      - outline-redis
    networks:
      default:
volumes:
  pgdata:

Halllo5 avatar Feb 02 '23 16:02 Halllo5

@Halllo5 I'm facing the same issue with the latest version of outline-wiki. Were you able to fix the issue?

kunalgupta022 avatar Jul 08 '24 06:07 kunalgupta022

@kunalgupta022 I actually never figured it out and just switched to manually writing the docker compose. I think I am still using the one I provided in my last comment and it has worked perfectly so far. Otherwise, the documentation has improved a lot, I think: https://docs.getoutline.com/s/hosting/doc/docker-7pfeLP5a8t

Halllo5 avatar Jul 08 '24 18:07 Halllo5

@Halllo5 Realised that there was nginx setup with the zrok link that we were pointing it to (reference). For anyone in the future who comes across this:

Nevermind, I've found solution. Needed to add these lines to nginx: proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade";

This fixed it and is documented here by the outline team.

kunalgupta022 avatar Jul 09 '24 11:07 kunalgupta022