|
| 1 | +--- |
| 2 | +title: Railway |
| 3 | +description: How to install Postiz on Railway |
| 4 | +--- |
| 5 | + |
| 6 | +import EarlyDoc from '../../components/snippets/earlydoc.mdx'; |
| 7 | +import { Steps, Callout } from 'nextra/components'; |
| 8 | +import Prereqs from '../../components/snippets/installation-pre-reqs.mdx'; |
| 9 | + |
| 10 | +<EarlyDoc /> |
| 11 | + |
| 12 | +<Prereqs /> |
| 13 | + |
| 14 | +{/* <Steps> */} |
| 15 | + |
| 16 | +<br /> |
| 17 | + |
| 18 | +# Create new Railway Project |
| 19 | + |
| 20 | +Just click the button below and use the default settings to get started. |
| 21 | + |
| 22 | +[](https://railway.com/template/xWx2v4?referralCode=chad) |
| 23 | + |
| 24 | +<br /> |
| 25 | +<br /> |
| 26 | + |
| 27 | +<b>Environment Variables</b> |
| 28 | + |
| 29 | +You will need to set the following environment variables: |
| 30 | + |
| 31 | +```env |
| 32 | +# This file is just as an example of the required environment variables for railway. |
| 33 | +# The template should have copied these into the railway postiz-app variables section, only listing here for reference. |
| 34 | +
|
| 35 | +PORT="5000" # instructs railway to connect the public domain to port 5000 |
| 36 | +BACK_END_PORT="3000" |
| 37 | +IS_GENERAL="true" |
| 38 | +SKIP_CONFIG_CHECK="true" |
| 39 | +DATABASE_URL="${{Postgres.DATABASE_URL}}" |
| 40 | +REDIS_URL="${{Redis.REDIS_URL}}?family=0" # the ?family=0 is to necessary for bullqueue to connect to redis via ipv6 |
| 41 | +JWT_SECRET="replace me with a long random string" |
| 42 | +NODE_ENV="production" |
| 43 | +BACKEND_INTERNAL_URL="http://localhost:3000" |
| 44 | +
|
| 45 | +NEXT_PUBLIC_UPLOAD_STATIC_DIRECTORY="/uploads" |
| 46 | +NEXT_PUBLIC_UPLOAD_DIRECTORY="/uploads" |
| 47 | +UPLOAD_DIRECTORY="/uploads" |
| 48 | +STORAGE_PROVIDER="local" |
| 49 | +
|
| 50 | +NEXT_PUBLIC_BACKEND_URL="https://${{RAILWAY_PUBLIC_DOMAIN}}/api" |
| 51 | +# use this if you have a custom domain |
| 52 | +# NEXT_PUBLIC_BACKEND_URL="https://postiz.example.com/api" |
| 53 | +
|
| 54 | +FRONTEND_URL="https://${{RAILWAY_PUBLIC_DOMAIN}}" |
| 55 | +# use this if you have a custom domain |
| 56 | +# FRONTEND_URL="https://postiz.example.com" |
| 57 | +
|
| 58 | +MAIN_URL="https://${{RAILWAY_PUBLIC_DOMAIN}}" |
| 59 | +# use this if you have a custom domain |
| 60 | +# MAIN_URL="https://postiz.example.com" |
| 61 | +
|
| 62 | +``` |
0 commit comments