• Recent
  • Popular
  • Unsolved
  • Categories
  • Tags
  • Chat
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
SysAdmins Zone Logo

How to install Outline

Scheduled Pinned Locked Moved Guides
21 Posts 3 Posters 248 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • katosK Offline
    katosK Offline
    katos Admin
    wrote on last edited by katos
    #1

    In this guide, I will detail how to install Outline. If you’re struggling with a particular section, then you can use the table of contents below to go to that section:

    Table of contents

    1. Downloading Outline
    2. Configuring Authentik
    3. Database
    4. Resolving Database Issues
    5. Running your new instance
    6. Updating
    Downloading Outline

    preface: This guide assumes that you have already installed and configured an authentication provider such as Authentik. For the purpose of this guide, we will be using Authentik as our authentication provider.

    This guide assumes that you will be downloading and installing Outline using Docker.

    First, on your virtual machine create a folder that you will use to store the Outline files. Personally, I have created ~/Docker/Outline

    Next, create a new file called docker.env using the sample file located here: https://github.com/outline/outline/blob/main/.env.sample

    Note: You MUST include at least one authentication provider - I have personally used Authentik for this purpose.

    Next, create a new Docker Compose yml file to manage your containers. For this, I will navigate into my Docker directory, and then create a new file called docker-compose.yml

    version: "3"
    services:
    
      outline:
        image: docker.getoutline.com/outlinewiki/outline:latest
        env_file: ./docker.env
        ports:
          - "3000:3000"
        depends_on:
          - postgres
          - redis
          - storage
    
      redis:
        image: redis
        env_file: ./docker.env
        ports:
          - "6379:6379"
        volumes:
          - ./redis.conf:/redis.conf
        command: ["redis-server", "/redis.conf"]
        healthcheck:
          test: ["CMD", "redis-cli", "ping"]
          interval: 10s
          timeout: 30s
          retries: 3
    
      postgres:
        image: postgres
        env_file: ./docker.env
        ports:
          - "5432:5432"
        volumes:
          - database-data:/var/lib/postgresql/data
        healthcheck:
          test: ["CMD", "pg_isready"]
          interval: 30s
          timeout: 20s
          retries: 3
        environment:
          POSTGRES_USER: 'user'
          POSTGRES_PASSWORD: 'pass'
          POSTGRES_DB: 'outline'
    
      storage:
        image: minio/minio
        env_file: ./docker.env
        ports:
          - "9000:9000"
        entrypoint: sh
        command: -c 'minio server'
        deploy:
          restart_policy:
            condition: on-failure
        volumes:
          - storage-data:/data
        healthcheck:
          test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
          interval: 30s
          timeout: 20s
          retries: 3
    
      https-portal:
        image: steveltn/https-portal
        env_file: ./docker.env
        ports:
          - '80:80'
          - '443:443'
        links:
          - outline
          - storage
        restart: always
        volumes:
          - https-portal-data:/var/lib/https-portal
        healthcheck:
          test: ["CMD", "service", "nginx", "status"]
          interval: 30s
          timeout: 20s
          retries: 3
        environment:
          DOMAINS: 'docs.mycompany.com -> http://outline:3000'
          STAGE: 'production'
          WEBSOCKET: 'true'
    
    volumes:
      https-portal-data:
      storage-data:
      database-data:
    
    Configuring Authentik as an authentication method
    1. Login to your Authentik instance as an administrator

    2. Navigate to Providers and click Create

    3. Create a new Authentication Provider. I have called mine Outline-OID for easy identification.
      e52ee27b-345a-4481-a83c-27c5eadd1b69-image.png

      a. Your configuration should use a redirect of https://yourdomain.tld/auth/oidc.callback
      1d49c752-83b4-49f9-a98d-ee45b020a63b-image.png
      01b90f43-02f8-4ab4-829f-658a2538f75c-image.png
      b. You must make a note of your Client ID and Secret to use for your docker.env file
      c. Under Advanced Protocol Settings ensure that you select openID and Email
      0616ee6d-a780-4976-afa6-4871e6c2178d-image.png
      d. The Subject Mode can be set to Based on the user’s Email.
      574758a0-73a2-4aea-9356-097f7b831674-image.png

    4. Navigate to Applications and select Create

    5. Create a new Application. I have called mine Outline for easier identification.

    6. The Provider will be the newly created one (Outline-OID in my case)
      f235ecde-7a56-4d80-ab4e-7c7ee5fabceb-image.png

    7. On your server, navigate to your docker.env file

    8. Scroll down the Authentication section until you reach OIDC
      a. Configure your OIDC Client ID and Secret that you took during Step 3a.
      b. Your Auth_URI will be https://yourdomain.tld/application/o/authorize
      c. Your Token_URI will be https://yourdomain.tld/application/o/token
      d. Your USERINFO_URI will be https://yourdomain.tld/application/o/userinfo

    Database

    Create the database with the following command:
    docker-compose run --rm outline yarn db:create --env=production-ssl-disabled

    Migrate the new database to add needed tables, indexes, etc:
    docker-compose run --rm outline yarn db:migrate --env=production-ssl-disabled

    If you get an error

    In some instances, you may encounter an error that you are unable to connect to the Postgres database. This appears to be related to the configuration being incorrect - Please adjust your docker.env file as below:

    
    # For production point these at your databases, in development the default
    # should work out of the box.
    DATABASE_URL=postgres://user:pass@postgres:5432/outline
    DATABASE_URL_TEST=postgres://user:pass@postgres:5432/outline-test
    DATABASE_CONNECTION_POOL_MIN=
    DATABASE_CONNECTION_POOL_MAX=
    # Uncomment this to disable SSL for connecting to Postgres
    PGSSLMODE=disable
    
    # For redis you can either specify an ioredis compatible url like this
    REDIS_URL=redis://redis:6379
    
    

    Note that the Database URL is adjusted to @postgres

    Running your new instance

    Now that your instance is configured, it’s time to run it!
    Navigate to your directory (in my case ~/Docker/Outline) and run the command docker-compose up -d

    Updating

    To update Outline, follow these steps:

    1. Backup your database
    2. Update to the latest image
    3. Use docker pull docker.getoutline.com/outlinewiki/outline:latest to download the image or
      If you are using docker-compose then you’d need to update the docker-compose.yml file to point to the latest version.
    4. Run the container
    1 Reply Last reply
    0
  • katosK katos moved this topic from Support on
  • katosK katos marked this topic as a regular topic on
  • BuhainaBuhainaB Offline
    BuhainaBuhainaB Offline
    BuhainaBuhaina
    wrote on last edited by
    #2

    I am trying this and still getting the ERROR: connect ECONNREFUSED as with every other attempt i tried.

    here are my notes
    server is open to the public only on ports 80, 443. It is accessible internally from everywhere.
    i have authentik setup exactly as it says here. There were some options not mentioned that I don't know if I did right, like the required field for authorization flow which i set to explicit.
    docker-compose as shown gives a ton of errors
    docker compose works better it seems but i get the error above always

    here are my configs

    docker-compose.yml

    SNAG-0129.png

    docker.env

    SNAG-0130.png

    tankerkiller125T 1 Reply Last reply
    0
  • tankerkiller125T Offline
    tankerkiller125T Offline
    tankerkiller125 Admin
    replied to BuhainaBuhaina on last edited by
    #3

    @Buhaina-Buhaina I don't see a postgres container in your docker-compse.yml file. Is this on purpose?

    BuhainaBuhainaB 1 Reply Last reply
    0
  • BuhainaBuhainaB Offline
    BuhainaBuhainaB Offline
    BuhainaBuhaina
    replied to tankerkiller125 on last edited by
    #4

    tankerkiller125 No sorry, I don't know how that happened. the compose file i am using is literally exactly the same as yours.

    SNAG-0131.png

    1 Reply Last reply
    0
  • BuhainaBuhainaB Offline
    BuhainaBuhainaB Offline
    BuhainaBuhaina
    wrote on last edited by
    #5

    i don't understand any of this. If i use the command as written "docker-compose" i get all these errors:

    SNAG-0132.png

    But if i use "docker compose" it doesn't give all those errors, just the one i mentioned above. but always.

    tankerkiller125T katosK 2 Replies Last reply
    0
  • tankerkiller125T Offline
    tankerkiller125T Offline
    tankerkiller125 Admin
    replied to BuhainaBuhaina on last edited by
    #6

    @Buhaina-Buhaina docker-compose is no longer considered the correct version of the command. They've massively updated and overhauled the compose command (hence why docker compose works). As for the connection issue I'm not entirely sure what's going on there. Maybe katos can assist once he's around later in the morning his time zone.

    1 Reply Last reply
    0
  • katosK Offline
    katosK Offline
    katos Admin
    replied to BuhainaBuhaina on last edited by
    #7

    @Buhaina-Buhaina

    It looks like your database isn’t starting before your app.

    Let me review the thread properly but I still am not seeing your Postgres in docker-compose.yml — can you paste your entire content of docker-compose.yml into pastebin or something please? (Feel free to redact your site URL)

    1 Reply Last reply
    0
  • BuhainaBuhainaB Offline
    BuhainaBuhainaB Offline
    BuhainaBuhaina
    wrote on last edited by
    #8

    I can paste the files if you still need it. But now, i tried again, and I went ahead and ran the second command for migrate, and it looked like it succeeded. I then went to the address, and it was working! So i clicked on use openid, and I get an error. So this is good progress! I looked at the address of the error and it redirected me to localhost rather than the domain address, so something must be misconfigured somewhere.

    SNAG-0134.png

    SNAG-0135.png

    tankerkiller125T 1 Reply Last reply
    0
  • tankerkiller125T Offline
    tankerkiller125T Offline
    tankerkiller125 Admin
    replied to BuhainaBuhaina on last edited by
    #9

    @Buhaina-Buhaina Change the URL config to be the domain your accessing Outline from. Do not change anything else, and you should be good to go from there.

    1 Reply Last reply
    0
  • BuhainaBuhainaB Offline
    BuhainaBuhainaB Offline
    BuhainaBuhaina
    wrote on last edited by
    #10

    which URL config do you mean? I am a little confused as I have two separate domains: one for authentik, and another for outline like this:
    auth.domain1.com
    outline.domain2.com

    which of these goes where? For the ODIC section, I am using the auth urls. I will pastebin my configs here soon.

    katosK 1 Reply Last reply
    0
  • katosK Offline
    katosK Offline
    katos Admin
    replied to BuhainaBuhaina on last edited by
    #11

    @Buhaina-Buhaina said in How to install Outline:

    which URL config do you mean? I am a little confused as I have two separate domains: one for authentik, and another for outline like this:
    auth.domain1.com
    outline.domain2.com

    which of these goes where? For the ODIC section, I am using the auth urls. I will pastebin my configs here soon.

    You’re very nearly there!
    You just need to add your outline.domain2.com address to your docker.env file

    URL should point to the fully qualified, publicly accessible URL. If using a
    # proxy the port in URL and PORT may be different.
    URL=http://localhost:3000
    PORT=3000
    

    Change localhost:300 to your domain

    1 Reply Last reply
    0
  • BuhainaBuhainaB Offline
    BuhainaBuhainaB Offline
    BuhainaBuhaina
    wrote on last edited by
    #12

    thanks, yes that gets me closer. Now, I login, and then it redirects me back to outline with this error:

    SNAG-0138.png

    katosK 1 Reply Last reply
    0
  • katosK Offline
    katosK Offline
    katos Admin
    replied to BuhainaBuhaina on last edited by
    #13

    @Buhaina-Buhaina great news, we’re very nearly there! Can you post your Authentik config and your docker.env for OIDC please?

    1 Reply Last reply
    0
  • BuhainaBuhainaB Offline
    BuhainaBuhainaB Offline
    BuhainaBuhaina
    wrote on last edited by
    #14

    here are the two configs:

    https://pastebin.com/8dVu2k61
    https://pastebin.com/3fFGFawf

    1 Reply Last reply
    0
  • BuhainaBuhainaB Offline
    BuhainaBuhainaB Offline
    BuhainaBuhaina
    wrote on last edited by
    #15

    authentik

    SNAG-0139.png

    katosK 1 Reply Last reply
    0
  • katosK Offline
    katosK Offline
    katos Admin
    replied to BuhainaBuhaina on last edited by
    #16

    @Buhaina-Buhaina said in How to install Outline:

    authentik

    SNAG-0139.png

    Looks like your redirect URI might be wrong.
    On Authentik, navigate to Providers and select your Outline provider. Scroll down and choose Protocol Settings.

    In here configure your Redirect URI to:
    https://yourdomain.tld/auth/oidc.callback

    1 Reply Last reply
    0
  • BuhainaBuhainaB Offline
    BuhainaBuhainaB Offline
    BuhainaBuhaina
    wrote on last edited by
    #17

    isn't that what I already have there? I think it is exactly the same. the domain is outline.domain2.com
    https://outline.domain2.com/auth/oidc.callback

    katosK 1 Reply Last reply
    0
  • katosK Offline
    katosK Offline
    katos Admin
    replied to BuhainaBuhaina on last edited by
    #18

    @Buhaina-Buhaina could it be because of the account you’re logging in with perhaps?

    On Authentik go to the Outline application in the admin panel and use Check Access?
    If you want you can also DM me your site URL and a test user and I can try it for you? 🙂

    1 Reply Last reply
    0
  • BuhainaBuhainaB Offline
    BuhainaBuhainaB Offline
    BuhainaBuhaina
    wrote on last edited by
    #19

    for authentik, does it need a fully qualified domain, or can it work with internal ip addresses?

    katosK 1 Reply Last reply
    0
  • katosK Offline
    katosK Offline
    katos Admin
    replied to BuhainaBuhaina on last edited by
    #20

    @Buhaina-Buhaina Please accept my apologies for the delays on this one. Work has been manic!
    The It Crowd Moss The It Crowd GIF

    Regardless, I believe that the FQDN is required for Outline but not necessarily for Authentik.
    With your error, it seems more likely that the Authentik configuration isn't quite right on the docker.env

    Please can you DM me with a pastebin link of your full docker.env (you can of course redact passwords) and I will review your configuration for you.

    1 Reply Last reply
    0

© Copyright 2023, SysAdmins Zone.
Terms of Service | Privacy Policy
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Recent
  • Popular
  • Unsolved
  • Categories
  • Tags
  • Chat
  • Login

  • Don't have an account? Register

  • Login or register to search.