P
Postiz3mo ago
Support

Ticket: Self-Hosted Postiz Account Login Issue

@penny Just created a ticket
Question: I'm having trouble creating an account/logging in with a self-hosted version of Postiz.
Attempted: I've tried creating multiple accounts, but none seem to work. I try to log in with those accounts, and it says "email in use". When I try to reset the password, nothing comes in. I've tried signing in with Google, but get an error.
Working On: Posting to instagram
Using Postiz On: Synologym, Docker-compose
Take it from here @Postiz
57 Replies
penny
penny3mo ago
No description
egelhaus
egelhaus3mo ago
Did you set the app id and client in the env/docker-compose?
penny
penny3mo ago
Is that only required for Google auth, or do I need that to create an account without it? When I tried to create an account normally I get this error: General error: TypeError: Failed to fetch. Please check your browser console. Then console is showing me this error: Access to fetch at 'https://192.168.4.79/api/auth/register' from origin 'https://192.168.4.79:8443' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
egelhaus
egelhaus3mo ago
wait You want to login with Google to make an account?
penny
penny3mo ago
No, I'd rather just create an account via email. I just tried creating an account via google since it wasn't working.
egelhaus
egelhaus3mo ago
Over what protocoll are you accessing Postiz?
penny
penny3mo ago
I ran the error through claude and it's telling me "This is a CORS issue because the frontend and backend are on different ports." Just reconfiguring and trying again. Sorry I'm kind of new to all of this.
egelhaus
egelhaus3mo ago
Like http or https?
penny
penny3mo ago
https
egelhaus
egelhaus3mo ago
Alr Hmmm
penny
penny3mo ago
tried some suggestions from claude, but now i'm getting a 502 error
No description
egelhaus
egelhaus3mo ago
Hmm Could you provide your docker-compose?
penny
penny3mo ago
version: "3.8" services: postiz: image: ghcr.io/gitroomhq/postiz-app:latest container_name: postiz restart: always environment: MAIN_URL: "http://192.168.4.79:5000" FRONTEND_URL: "http://192.168.4.79:5000" NEXT_PUBLIC_BACKEND_URL: "http://192.168.4.79:5000/api" JWT_SECRET: "J8K#mP9$vL2@nQ5^wR7*hX3&fY4%tZ6!cN1" DATABASE_URL: "postgresql://postiz-user:postiz-password@postiz-postgres:5432/postiz-db-local" REDIS_URL: "redis://postiz-redis:6379" BACKEND_INTERNAL_URL: "http://localhost:3000" IS_GENERAL: "true" STORAGE_PROVIDER: "local" UPLOAD_DIRECTORY: "/uploads" NEXT_PUBLIC_UPLOAD_DIRECTORY: "/uploads" volumes: - postiz-config:/config/ - postiz-uploads:/uploads/ ports: - 5000:5000 networks: - postiz-network depends_on: - postiz-postgres - postiz-redis postiz-postgres: image: postgres:17-alpine container_name: postiz-postgres restart: always environment: POSTGRES_PASSWORD: postiz-password POSTGRES_USER: postiz-user POSTGRES_DB: postiz-db-local volumes: - postgres-volume:/var/lib/postgresql/data networks: - postiz-network postiz-redis: image: redis:7.2 container_name: postiz-redis restart: always volumes: - postiz-redis-data:/data networks: - postiz-network volumes: postgres-volume: external: false postiz-redis-data: external: false postiz-config: external: false postiz-uploads: external: false networks: postiz-network: external: false
Thibault Chausson
Same error with Coolify
egelhaus
egelhaus3mo ago
Ohhh I think i know why Can you set IS_GENERAL to false? @penny Nevermind
penny
penny3mo ago
Same error
No description
egelhaus
egelhaus3mo ago
Wait, you said you were using https?
penny
penny3mo ago
I was originally, but this last test is http
egelhaus
egelhaus3mo ago
You need to use https, except if you’re on localhost
penny
penny3mo ago
Yeah I'm accessing it directly through http://192.168.4.79:5000
egelhaus
egelhaus3mo ago
Because postiz uses safe cookies
penny
penny3mo ago
Is that different than localhost?
egelhaus
egelhaus3mo ago
Yes
penny
penny3mo ago
Alright, let me make that change and test Is it as simple as updating the compose file to this? version: "3.8" services: postiz: image: ghcr.io/gitroomhq/postiz-app:latest container_name: postiz restart: always environment: MAIN_URL: "http://localhost:5000" FRONTEND_URL: "http://localhost:5000" NEXT_PUBLIC_BACKEND_URL: "http://localhost:5000/api" JWT_SECRET: "J8K#mP9$vL2@nQ5^wR7*hX3&fY4%tZ6!cN1" DATABASE_URL: "postgresql://postiz-user:postiz-password@postiz-postgres:5432/postiz-db-local" REDIS_URL: "redis://postiz-redis:6379" BACKEND_INTERNAL_URL: "http://localhost:3000" IS_GENERAL: "true" STORAGE_PROVIDER: "local" UPLOAD_DIRECTORY: "/uploads" NEXT_PUBLIC_UPLOAD_DIRECTORY: "/uploads" volumes: - postiz-config:/config/ - postiz-uploads:/uploads/ ports: - 5000:5000 networks: - postiz-network depends_on: - postiz-postgres - postiz-redis postiz-postgres: image: postgres:17-alpine container_name: postiz-postgres restart: always environment: POSTGRES_PASSWORD: postiz-password POSTGRES_USER: postiz-user POSTGRES_DB: postiz-db-local volumes: - postgres-volume:/var/lib/postgresql/data networks: - postiz-network postiz-redis: image: redis:7.2 container_name: postiz-redis restart: always volumes: - postiz-redis-data:/data networks: - postiz-network volumes: postgres-volume: external: false postiz-redis-data: external: false postiz-config: external: false postiz-uploads: external: false networks: postiz-network: external: false
egelhaus
egelhaus3mo ago
You also need to set the URLs to https So it exactly matches your url that you are accessing in your browser
penny
penny3mo ago
Hmm, since this is running on my synology, and I'll need to access it from my mac, I'll need to set it up via https on a subdomain instead. Is that correct?
egelhaus
egelhaus3mo ago
You don’t have to use a subdomain You only need https But you can
penny
penny3mo ago
Ok, so I'll set it up through https, then will still be able to access it through the ip:port url
egelhaus
egelhaus3mo ago
Yes
penny
penny3mo ago
alright, trying now.
egelhaus
egelhaus3mo ago
But you need to update your config, to what you want to open postiz via (ip or domain)
penny
penny3mo ago
For simplicities sake, I'll just use ip. Here is my new docker-compose file: version: "3.8" services: postiz: image: ghcr.io/gitroomhq/postiz-app:latest container_name: postiz restart: always environment: MAIN_URL: "https://192.168.4.79:5000" FRONTEND_URL: "https://192.168.4.79:5000" NEXT_PUBLIC_BACKEND_URL: "https://192.168.4.79:5000/api" JWT_SECRET: "J8K#mP9$vL2@nQ5^wR7*hX3&fY4%tZ6!cN1" DATABASE_URL: "postgresql://postiz-user:postiz-password@postiz-postgres:5432/postiz-db-local" REDIS_URL: "redis://postiz-redis:6379" BACKEND_INTERNAL_URL: "http://localhost:3000" IS_GENERAL: "true" STORAGE_PROVIDER: "local" UPLOAD_DIRECTORY: "/uploads" NEXT_PUBLIC_UPLOAD_DIRECTORY: "/uploads" volumes: - postiz-config:/config/ - postiz-uploads:/uploads/ ports: - 5000:5000 networks: - postiz-network depends_on: - postiz-postgres - postiz-redis postiz-postgres: image: postgres:17-alpine container_name: postiz-postgres restart: always environment: POSTGRES_PASSWORD: postiz-password POSTGRES_USER: postiz-user POSTGRES_DB: postiz-db-local volumes: - postgres-volume:/var/lib/postgresql/data networks: - postiz-network postiz-redis: image: redis:7.2 container_name: postiz-redis restart: always volumes: - postiz-redis-data:/data networks: - postiz-network volumes: postgres-volume: external: false postiz-redis-data: external: false postiz-config: external: false postiz-uploads: external: false networks: postiz-network: external: false
egelhaus
egelhaus3mo ago
Yes, something like that
penny
penny3mo ago
Looks like I'll need to set up a reverse proxy as well?
egelhaus
egelhaus3mo ago
No If you open it via IP
penny
penny3mo ago
Ok cool
egelhaus
egelhaus3mo ago
You only need https in postiz If you use a reverse proxy, you won’t be able to open it via IP
penny
penny3mo ago
No description
penny
penny3mo ago
This is what I'm getting via https://192.168.4.79:5000/
egelhaus
egelhaus3mo ago
Did you set up the https certificate too at postiz?
penny
penny3mo ago
No, I thought that's what the reverse proxy was for?
egelhaus
egelhaus3mo ago
Oh
penny
penny3mo ago
I'm looking through the docs, and I don't see anything on setting up the https cert
egelhaus
egelhaus3mo ago
Well, then you need one I recommend Nginx proxy manager Lemme check
penny
penny3mo ago
Postiz Documentation
Nginx – Postiz Docs
Postiz - Open source social media scheduling tool
egelhaus
egelhaus3mo ago
Yea I just read them Sorry for the inconvenience, I didn’t knew you couldn’t set up ssl directly on postiz You need an reverse proxy
penny
penny3mo ago
Ok, I'll see if I can figure that out
egelhaus
egelhaus3mo ago
Alright Let me know when you’re done
penny
penny3mo ago
Can you confirm this is the right way to go if I go the subdomain route? I've added my site as the main, frontend, and backend url - version: "3.8" services: postiz: image: ghcr.io/gitroomhq/postiz-app:latest container_name: postiz restart: always environment: MAIN_URL: "https://posts.bryanmanio.com" FRONTEND_URL: "https://posts.bryanmanio.com" NEXT_PUBLIC_BACKEND_URL: "https://posts.bryanmanio.com/api" JWT_SECRET: "J8K#mP9$vL2@nQ5^wR7*hX3&fY4%tZ6!cN1" DATABASE_URL: "postgresql://postiz-user:postiz-password@postiz- or should I keep the original http domain:port, while adding the domain name only in the traefik compose file?
egelhaus
egelhaus3mo ago
Yes That is right By the way You should definitely censor your domain and jet secret jwt*
penny
penny3mo ago
Yeah I'll recreate the secret on the final version
egelhaus
egelhaus3mo ago
Alright
penny
penny3mo ago
I followed a guide to get it up and running on https through a synology service, used the reverse proxy to point to the service but now I'm getting this error when trying to create an account.
No description
penny
penny3mo ago
https://postiz.postautomation.synology.me is the endpoint for the synology https access, but it looks like it's trying to talk to the posts.bryanmanio.com url specified in the compose file. Would ie be as simple as switching the config to point to this new synology domain?
egelhaus
egelhaus3mo ago
Yes, only use the Domain in the config, that you are really Accessoire through your Browser @penny Does it Work now?
penny
penny3mo ago
No, still getting errors. I spent like 10 hours on this, so I'm probably just going to try something else.
egelhaus
egelhaus3mo ago
Hmm Whats the Error?

Did you find this page helpful?