Outline Knowledge Base

Description: Beautiful, realtime collaborative, feature packed, and markdown compatible.

Category: Other

URL: https://railway.app/template/LNLiaz

28 Replies

a year ago

Some feedback:

  • the outline image is based on alpine, you will need to set ENABLE_ALPINE_PRIVATE_NETWORKING to true

  • for DATABASE_URL use the private database url ${{Postgres.DATABASE_PRIVATE_URL}}

  • for REDIS_URL use the private redis url ${{Redis.REDIS_PRIVATE_URL}}?family=6

  • for SECRET_KEY and UTILS_SECRET use ${{secret(64)}}

  • for URL use [https://${{RAILWAY_PUBLIC_DOMAIN](https://${{RAILWAY_PUBLIC_DOMAIN)}}

  • please don't set RAILWAY_VOLUME_MOUNT_PATH yourself as this variable is set by Railway automatically

  • for FILE_STORAGE_LOCAL_ROOT_DIR use ${{RAILWAY_VOLUME_MOUNT_PATH}}

  • set AWS_SDK_JS_SUPPRESS_MAINTENANCE_MODE_MESSAGE to 1

  • if possible add a health check to the outline service

Documentation and references used:

https://docs.railway.app/guides/private-networking#workaround-for-alpine-based-images

https://docs.railway.app/reference/variables#railway-provided-variables

https://docs.railway.app/guides/postgresql#private-networking

https://docs.railway.app/guides/redis#private-networking

https://docs.railway.app/guides/create#template-variable-functions

https://docs.railway.app/guides/volumes#provided-variables

https://docs.railway.app/guides/private-networking#known-configuration-requirements-for-ipv6

https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/#Version2x_Support


Legend! Updated these now.


a year ago

Awsome, thank you for the template, nicely done!


catdevnullHOBBY

a year ago

Hi, I found that I needed the SECRET_KEY to be longer: https://github.com/outline/outline/discussions/6596#discussioncomment-8600014


catdevnullHOBBY

a year ago

I also found that I had to manually edit the database to make myself admin: https://github.com/outline/outline/discussions/3468

I did this by connecting to the Postgres database using psql with its public networking.


a year ago

Hi, I found that I needed the SECRET_KEY to be longer

then you can update your template to use ${{secret(64)}}


zektecHOBBY

a year ago

Thank you catdevnull for mentioning the SECRET_KEY fix, I was stuck on this one for a long time trying to figure it out…


I'm having trouble logging into my knowledge base. I've configured Google authentication and environment variables, but I'm still getting a 'Fail to auth' error. I even regenerated SECRETKEY and UTILSSECRET to ${{secret(64)}}, but the issue persists. Can you help?


a year ago

You can't use template variable functions in services after the fact, they are only to be used by the template creators during the process of making the templates, please set those two variables back to static values.

Please see Outline's documentation for correct setup around Google auth.

https://docs.getoutline.com/s/hosting/doc/google-hOuvtCmTqQ


Excellent! I found a solution by setting the appropriate environment variable with the output of openssl rand -hex 32. This generated a secure random key, which resolved the authentication issue.


a year ago

Ah good catch, looks like they are using ${{secret(32)}} in the template, despite my recommendation of 64.

openssl rand -hex 32 generates a string with 64 characters.


Thanks for the feedback! The template has been updated to ${{secret(64)}} for both SECRETKEY and UTILSSECRET.


a year ago

Great!


kasutoportalHOBBY

9 months ago

Getting this error:
/opt/outline/node_modules/sequelize/lib/sequelize.js:58

options.dialect = urlParts.protocol.replace(/:$/, "");

^

TypeError: Cannot read properties of null (reading 'replace')

at new Sequelize (/opt/outline/node_modules/sequelize/lib/sequelize.js:58:43)

at new Sequelize (/opt/outline/node_modules/sequelize-typescript/dist/sequelize/sequelize/sequelize.js:16:9)

at createDatabaseInstance (/opt/outline/build/server/storage/database.js:25:10)

at Object.<anonymous> (/opt/outline/build/server/storage/database.js:93:39)

at Module._compile (node:internal/modules/cjs/loader:1358:14)

at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)

at Module.load (node:internal/modules/cjs/loader:1208:32)

at Module._load (node:internal/modules/cjs/loader:1024:12)

at Module.require (node:internal/modules/cjs/loader:1233:19)

at Hook.Module.require (/opt/outline/node_modules/dd-trace/packages/dd-trace/src/ritm.js:85:33)

at require (node:internal/modules/helpers:179:18)

at Object.<anonymous> (/opt/outline/build/server/collaboration/PersistenceExtension.js:12:17)

at Module._compile (node:internal/modules/cjs/loader:1358:14)

at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)

at Module.load (node:internal/modules/cjs/loader:1208:32)

at Module._load (node:internal/modules/cjs/loader:1024:12)


9 months ago

Hello, The template creator unfortunately hasn't responded so I went ahead and updated the template to what I think was broken due to - https://railway.app/changelog/2024-07-19-database-private-networking#database-private-network-defaults

Please let me know if it still doesn't work!


7 months ago

Note for future peeps. The template env variable needs to be updated again. You'll get this warning:

The environment variable MAXIMUM_IMPORT_SIZE is deprecated and will be removed in a future release. Use FILE_STORAGE_IMPORT_MAX_SIZE instead


7 months ago

This has been updated. Thanks for the feedback!


nervemanHOBBY

4 months ago

Tried installing twice (am on the Trial plan) without success. I added both Slack and Discord auth options and keep getting the following error:
Error

Failed to load configuration.

Check the network requests and server logs for full details of the error.


4 months ago

Please upgrade to a paid plan before attempting to deploy this template.


nervemanHOBBY

4 months ago

OK, I upgraded to the Hobby plan and tried a fresh installation. I'm still getting the same error for Discord auth, and a new error for Slack auth:
Login to Wiki

• Authentication failed - you do not have permission to access this workspace.


4 months ago

Just confirming - did you add the Discord environment variables outlined here? https://docs.getoutline.com/s/hosting/doc/discord-g4JdWFFub6

I personally have yet to try Discord auth yet, but I'd be surprised if that was having issues. I'm presently using Microsoft Entra for auth.

Are the any other errors in the other services?


zpuckeridge

Just confirming - did you add the Discord environment variables outlined here? https://docs.getoutline.com/s/hosting/doc/discord-g4JdWFFub6I personally have yet to try Discord auth yet, but I'd be surprised if that was having issues. I'm presently using Microsoft Entra for auth.Are the any other errors in the other services?

nervemanHOBBY

4 months ago

Yes, that's correct. I added the Discord environment variables as well as the Slack environment variables as outlined in the documents you linked to.


zpuckeridge

Just confirming - did you add the Discord environment variables outlined here? https://docs.getoutline.com/s/hosting/doc/discord-g4JdWFFub6I personally have yet to try Discord auth yet, but I'd be surprised if that was having issues. I'm presently using Microsoft Entra for auth.Are the any other errors in the other services?

nervemanHOBBY

4 months ago

Here are my environment variables:
AWS_SDK_JS_SUPPRESS_MAINTENANCE_MODE_MESSAGE="1"

DATABASE_URL="${{Postgres.DATABASE_URL}}"

DEFAULT_LANGUAGE="en_US"

ENABLE_ALPINE_PRIVATE_NETWORKING="true"

ENABLE_UPDATES="true"

FILE_STORAGE="local"

FILE_STORAGE_IMPORT_MAX_SIZE="5120000"

FILE_STORAGE_LOCAL_ROOT_DIR="${{RAILWAY_VOLUME_MOUNT_PATH}}"

FILE_STORAGE_UPLOAD_MAX_SIZE="26214400"

FORCE_HTTPS="true"

LOG_LEVEL="info"

NODE_ENV="production"

PGSSLMODE="disable"

PORT="3000"

RAILWAY_RUN_UID="0"

RATE_LIMITER_DURATION_WINDOW="60"

RATE_LIMITER_ENABLED="true"

RATE_LIMITER_REQUESTS="1000"

REDIS_URL="${{Redis.REDIS_URL}}?family=6"

SECRET_KEY="REDACTED"

SLACK_MESSAGE_ACTIONS="true"

URL="https://${{RAILWAY_PUBLIC_DOMAIN}}"

UTILS_SECRET="REDACTED"

WEB_CONCURRENCY="1"

SMTP_HOST="smtp.fastmail.com"

SMTP_PORT="465"

SMTP_USERNAME="david@nervecentral.com"

SMTP_PASSWORD="REDACTED"

SMTP_FROM_EMAIL="david@nervecentral.com"

SMTP_SECURE="true"

SLACK_CLIENT_ID="6669057374194.8202013355990"

SLACK_CLIENT_SECRET="REDACTED"

DISCORD_CLIENT_ID="1320367304101330987"

DISCORD_CLIENT_SECRET="REDACTED"


nervemanHOBBY

4 months ago

Does anyone have any ideas why my authentication failed?


nervemanHOBBY

4 months ago

The error I'm getting in the logs is:

Failed to encrypt database column (accessToken). The SECRET_KEY environment variable is not the correct length.

Error during authentication


3 months ago

Just deployed this evening. Race condition meant Postgres wasn't up, but redeployed the app and it worked. Entered in Discord SSO details. Hit the secret key issue and just plugged in openssl generated string and everything works.

Not an admin, so I guess I have to follow this https://help.railway.com/templates/outline-knowledge-base-fca7338d#axrb


bmann

Just deployed this evening. Race condition meant Postgres wasn't up, but redeployed the app and it worked. Entered in Discord SSO details. Hit the secret key issue and just plugged in openssl generated string and everything works.Not an admin, so I guess I have to follow this https://help.railway.com/templates/outline-knowledge-base-fca7338d#axrb

2 months ago

Hi, Im reading through all experiences here. My skills arent that high level as those others here. It seems like Im also hitting this auth issue. Im trying to troubleshoot by doing this bespoke openssl trick. Can you please advise me (Im a noob) how to achieve that? Thanks!


thomas779PRO

a month ago

Guys, you need to configure your authentication methods. Outline has a guide – https://docs.getoutline.com/s/hosting/doc/authentication-7ViKRmRY5o

I was able to set this up with no issues

@nerveman @klinshy


Outline Knowledge Base - Railway Help Station