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
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
Did you set the app id and client in the env/docker-compose?
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.
wait
You want to login with Google to make an account?
No, I'd rather just create an account via email. I just tried creating an account via google since it wasn't working.
Over what protocoll are you accessing Postiz?
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.
Like http or https?
https
Alr
Hmmm
tried some suggestions from claude, but now i'm getting a 502 error
Hmm
Could you provide your docker-compose?
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
Same error with Coolify
Ohhh
I think i know why
Can you set IS_GENERAL to false? @penny
Nevermind
Same error
Wait, you said you were using https?
I was originally, but this last test is http
You need to use https, except if you’re on localhost
Yeah I'm accessing it directly through http://192.168.4.79:5000
Because postiz uses safe cookies
Is that different than localhost?
Yes
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
You also need to set the URLs to https
So it exactly matches your url that you are accessing in your browser
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?
You don’t have to use a subdomain
You only need https
But you can
Ok, so I'll set it up through https, then will still be able to access it through the ip:port url
Yes
alright, trying now.
But you need to update your config, to what you want to open postiz via (ip or domain)
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
Yes, something like that
Looks like I'll need to set up a reverse proxy as well?
No
If you open it via IP
Ok cool
You only need https in postiz
If you use a reverse proxy, you won’t be able to open it via IP
This is what I'm getting via https://192.168.4.79:5000/
Did you set up the https certificate too at postiz?
No, I thought that's what the reverse proxy was for?
Oh
I'm looking through the docs, and I don't see anything on setting up the https cert
Well, then you need one
I recommend Nginx proxy manager
Lemme check
ah, I see this - https://docs.postiz.com/reverse-proxies/nginx
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
Ok, I'll see if I can figure that out
Alright
Let me know when you’re done
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?
Yes
That is right
By the way
You should definitely censor your domain and jet secret
jwt*
Yeah I'll recreate the secret on the final version
Alright
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.
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?
Yes, only use the Domain in the config, that you are really Accessoire through your Browser
@penny Does it Work now?
No, still getting errors. I spent like 10 hours on this, so I'm probably just going to try something else.
Hmm
Whats the Error?