Ticket: Registration Error with Postiz on VPS
@Fenohery Just created a ticket
Question: I have installed Postiz using Coolify on my VPS. The following errors occur: - When registering, I get "Unhandled Error: 502"
Attempted: i already check the console log and network and i got : "/api/auth/register 502 (Bad Gateway)"
Working On: i check coolify services stacks and log, in service stack compose file we got :
Using Postiz On: Coolify
Take it from here @Postiz
Question: I have installed Postiz using Coolify on my VPS. The following errors occur: - When registering, I get "Unhandled Error: 502"
Attempted: i already check the console log and network and i got : "/api/auth/register 502 (Bad Gateway)"
Working On: i check coolify services stacks and log, in service stack compose file we got :
Using Postiz On: Coolify
Take it from here @Postiz
13 Replies
@Fenohery okay dokey, what are you URL variables set to in the compose file?
coolify manage url with FQDN SERVICES so we got compose file like this :
services:
postiz:
image: 'ghcr.io/gitroomhq/postiz-app:latest'
environment:
- SERVICE_FQDN_POSTIZ_5000
- 'MAIN_URL=${SERVICE_FQDN_POSTIZ}'
- 'FRONTEND_URL=${SERVICE_FQDN_POSTIZ}'
- 'NEXT_PUBLIC_BACKEND_URL=${SERVICE_FQDN_POSTIZ}/api'
- 'JWT_SECRET=${SERVICE_PASSWORD_JWTSECRET}'
- 'DATABASE_URL=postgresql://${SERVICE_USER_POSTGRESQL}:${SERVICE_PASSWORD_POSTGRESQL}@postgresql:5432/${POSTGRESQL_DATABASE:-postiz-db}'
- 'REDIS_URL=redis://${SERVICE_USER_REDIS}:${SERVICE_PASSWORD_REDIS}@redis:6379'
- 'BACKEND_INTERNAL_URL=http://localhost:3000'
- IS_GENERAL=true
- STORAGE_PROVIDER=local
- UPLOAD_DIRECTORY=/uploads
- NEXT_PUBLIC_UPLOAD_DIRECTORY=/uploads
- 'X_API_KEY=${SERVICE_X_API}'
- 'X_API_SECRET=${SERVICE_X_SECRET}'
-
'REDDIT_CLIENT_ID=${SERVICE_REDDIT_API}'
- 'REDDIT_CLIENT_SECRET=${SERVICE_REDDIT_SECRET}'
- 'TIKTOK_CLIENT_ID=${SERVICE_TIKTOK_ID}'
- 'TIKTOK_CLIENT_SECRET=${SERVICE_TIKTOK_SECRET}'
- 'SLACK_ID=${SERVICE_SLACK_ID}'
- 'SLACK_SECRET=${SERVICE_SLACK_SECRET}'
- 'PINTEREST_CLIENT_ID=${SERVICE_PINTEREST_ID}'
- 'PINTEREST_CLIENT_SECRET=${SERVICE_PINTEREST_SECRET}'
- 'DRIBBLE_CLIENT_ID=${SERVICE_DRIBBLE_ID}'
- 'DRIBBLE_CLIENT_SECRET=${SERVICE_DRIBBLE_SECRET}'
- 'DISCORD_CLIENT_ID=${SERVICE_DISCORD_ID}'
- 'DISCORD_CLIENT_SECRET=${SERVICE_DISCORD_SECRET}'
- 'DISCORD_BOT_TOKEN_ID=${SERVICE_DISCORD_TOKEN}'
- 'YOUTUBE_CLIENT_ID=${SERVICE_YOUTUBE_ID}'
- 'YOUTUBE_CLIENT_SECRET=${SERVICE_YOUTUBE_SECRET}'
- 'MASTODON_CLIENT_ID=${SERVICE_MASTODON_ID}'
- 'MASTODON_CLIENT_SECRET=${SERVICE_MASTODON_SECRET}'
- 'LINKEDIN_CLIENT_ID=${SERVICE_LINKEDIN_ID}'
- 'LINKEDIN_CLIENT_SECRET=${SERVICE_LINKEDIN_SECRET}'
- 'INSTAGRAM_APP_ID=${SERVICE_INSTAGRAM_ID}'
- 'INSTAGRAM_APP_SECRET=${SERVICE_INSTAGRAM_SECRET}'
- 'FACEBOOK_APP_ID=${SERVICE_FACEBOOK_ID}'
- 'FACEBOOK_APP_SECRET=${SERVICE_FACEBOOK_SECRET}'
- 'THREADS_APP_ID=${SERVICE_THREADS_ID}'
- 'THREADS_APP_SECRET=${SERVICE_THREADS_SECRET}'
- 'GITHUB_CLIENT_ID=${SERVICE_GITHUB_ID}'
- 'GITHUB_CLIENT_SECRET=${SERVICE_GITHUB_SECRET}'
- 'BEEHIIVE_API_KEY=${SERVICE_BEEHIIVE_KEY}'
- 'BEEHIIVE_PUBLICATION_ID=${SERVICE_BEEHIIVE_PUBID}'
-
'OPENAI_API_KEY=${SERVICE_OPENAI_KEY}'
volumes:
- 'postiz_config:/config/'
- 'postiz_uploads:/uploads/'
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test:
- CMD-SHELL
- 'wget -qO- http://127.0.0.1:5000/'
interval: 5s
timeout: 20s
retries: 10
postgres:
image: 'postgres:14.5'
volumes:
- 'postiz_postgresql_data:/var/lib/postgresql/data'
environment:
- 'POSTGRES_USER=${SERVICE_USER_POSTGRESQL}'
- 'POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRESQL}'
- 'POSTGRES_DB=${POSTGRESQL_DATABASE:-postiz-db}'
healthcheck:
test:
- CMD-SHELL
- 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}'
interval: 5s
timeout: 20s
retries: 10
redis:
image: 'redis:7.2'
volumes:
- 'postiz_redis_data:/data'
environment:
- 'REDIS_PASSWORD=${SERVICE_PASSWORD_REDIS}'
- 'REDIS_USER=${SERVICE_USER_REDIS}'
healthcheck:
test:
- CMD
- redis-cli
- PING
interval: 5s
timeout: 10s
retries: 20
Okay, that is a horrible template lol
What did you set as your SERVICE variables then for your URLs, and what are the ports set to?
i just have the port 5000 open
same issue @xcons
2024-11-14T06:53:32.967536315Z > [email protected] prisma-db-push
2024-11-14T06:53:32.967539195Z > cd ./libraries/nestjs-libraries/src/database/prisma && npx prisma db push
2024-11-14T06:53:32.967541395Z
2024-11-14T06:53:33.991354749Z Environment variables loaded from ../../../../../.env
2024-11-14T06:53:33.991966113Z Prisma schema loaded from schema.prisma
2024-11-14T06:53:34.001695250Z Datasource "db": PostgreSQL database "postiz-db", schema "public" at "postgresql:5432"
2024-11-14T06:53:39.061462159Z
2024-11-14T06:53:39.062139082Z Error: P1001: Can't reach database server at
postgresql:5432
2024-11-14T06:53:39.062146283Z
2024-11-14T06:53:39.062148523Z Please make sure your database server is running at postgresql:5432
.
dependencies initialized;5;3m +1ms
2024-11-14T07:05:21.977548744Z [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
2024-11-14T07:05:21.977562144Z at parseError (/app/node_modules/redis-parser/lib/parser.js:179:12)
2024-11-14T07:05:21.977564704Z at parseType (/app/node_modules/redis-parser/lib/parser.js:302:14)
2024-11-14T07:05:21.979622196Z [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
https://discord.com/channels/1243410146097500202/1293563149152424038/threads/1297914286001361008
very similar to this thread
@Fenohery did you find any solution?
@xcons@Postiz please help @Fenohery
not yet, other people have same issue with coolify too.
i have fixed it
basically i had to change compose file
i will share my config
Nice
thanks 🙂
@Waltfhcg I'm eagger to see the solution to this issue 😅
@Waltfhcg hi mate, can we get your config please😁.
@Waltfhcg +1 😄
Please open a new ticket if you are having issues
The solution / problem might not be the same
Same issue happen while deploy on Coolify