T
Twenty4mo ago
Frankie

Help with VPS self hosted instance

Having trouble configuring the SERVER_URL and REACT_APP_SERVER_BASE_URL env variables. I am able to run Twenty using the domain for the server, but not the proxied domain. I am using a different port and tried following the docs for the reverse proxy instructions, but the proxy is trying to access the graphql route from the server domain and not the proxy domain. I am using a Cloudflare Tunnel for the reverse proxy. Let me know if I need to provide my compose file and .env. Thanks!
19 Replies
Alpha
Alpha4mo ago
Can I help you?
ɃØĦɆᵾS
ɃØĦɆᵾS4mo ago
Hold up Why would you need VPS access? There's clearly something wrong with the configuration, if Frankie is responsive, there's no need to ask for VPS access
Alpha
Alpha4mo ago
@ɃØĦɆᵾS What does u mean? Please explain in detail He is requiring any help on VPS setting, in order word, he want reverse proxy's correct setting. If not access info, How can I help him?
ɃØĦɆᵾS
ɃØĦɆᵾS4mo ago
I understand that you want to help him but asking for a VPS access is a big no, if I were him, I'd be at least skeptical why someone outside of core team wants to have a VPS access and who knows what will be done aside from trying to help There are different ways to help like asking for the config on Cloudflare or web server he's using, it doesn't have to be a direct access (ngl it sounded to me like I'll help you just give me your login and password which is at least weird)
Frankie
FrankieOP4mo ago
@ɃØĦɆᵾS this person is a scammer, blocked and reported @charles scammer in this help post
charles
charles4mo ago
good catch!
Frankie
FrankieOP4mo ago
No worries, can get some assistance with my setup?
charles
charles3mo ago
Hi @Frankie sorry for the VERY slow response, do you still require assistance?
Frankie
FrankieOP3mo ago
Yes, thank you. I am having trouble figuring out what to set the SERVER_URL variable to using a Cloudflare Tunnel reverse proxy. The page just shows up blank with a post error for connection timeout to the graphql route. Wondering if I need to have REACT_APP_SERVER_BASE_URL or FRONT_BASE_URL set to something.
Neruu2
Neruu23mo ago
Regarding the documentation it seems your REACT_APP_SERVER_BASE_URL should be pointing to port 3000 and FRONT_BASE_URL to port 3001. So have something like
REACT_APP_SERVER_BASE_URL=<domain.tld>:3000
FRONT_BASE_URL=<domain.tld>:3001
REACT_APP_SERVER_BASE_URL=<domain.tld>:3000
FRONT_BASE_URL=<domain.tld>:3001
But I could be wrong.
Frankie
FrankieOP3mo ago
I will try that thank you! The only working configuration is when I set SERVER_URL to the IP of the server. It does not work when I set it to the proxy URL.
SERVER_URL=https://proxy.domain:3000
REACT_APP_SERVER_BASE_URL=https://proxy.domain:3000
FRONT_BASE_URL=https://proxy.domain:3001
SERVER_URL=https://proxy.domain:3000
REACT_APP_SERVER_BASE_URL=https://proxy.domain:3000
FRONT_BASE_URL=https://proxy.domain:3001
thomast
thomast3mo ago
Hi @Frankie, do you still need assistance here?
charles
charles3mo ago
@Frankie I'm really sorry for not helping more, I was very busy over the last weeks, let us know if we can still help you
Frankie
FrankieOP3mo ago
No worries, still couldn't get the instance working with the Cloudflare Tunnel, if you see the above messages I said the instance only works using the SERVER_URL and the direct IP to the server, not the proxied domain. When setup to the proxied domain the instance just shows a blank page with a console error of not being able to reach the graphql route.
charles
charles3mo ago
so your frontend is trying to reach your server on the proxied domain which seems right but then how is your proxied domain routed to the server? from Twenty perspective your configuration seems right it seems to be a networking issue what response do you get related to the Graphql errors? Is it a network error, an application error (500 or so)?
Frankie
FrankieOP3mo ago
It's a connection timed out error to the graphql route Here is my compose file: https://gist.github.com/frankievalentine/fdda5e90db42262bcdcbfb4a3963bf00 Here is my env:
SERVER_URL="http://proxy.domain:3020"
REACT_APP_SERVER_BASE_URL="http://proxy.domain:3020"

# Use `openssl rand -base64 32` for each secret
ACCESS_TOKEN_SECRET=<secret>
LOGIN_TOKEN_SECRET=<secret>
REFRESH_TOKEN_SECRET=<secret>
FILE_TOKEN_SECRET=<secret>

# Dev mode
SIGN_IN_PREFILLED="false"

STORAGE_TYPE="local"

# DB
PG_DATABASE_URL="postgres://postgres:<password>@postgres:5432/twenty"
MESSAGE_QUEUE_TYPE="pg-boss"

# Redis
REDIS_HOST="redis"
REDIS_PORT="6379"
REDIS_USERNAME="<redis-container-name>"
SERVER_URL="http://proxy.domain:3020"
REACT_APP_SERVER_BASE_URL="http://proxy.domain:3020"

# Use `openssl rand -base64 32` for each secret
ACCESS_TOKEN_SECRET=<secret>
LOGIN_TOKEN_SECRET=<secret>
REFRESH_TOKEN_SECRET=<secret>
FILE_TOKEN_SECRET=<secret>

# Dev mode
SIGN_IN_PREFILLED="false"

STORAGE_TYPE="local"

# DB
PG_DATABASE_URL="postgres://postgres:<password>@postgres:5432/twenty"
MESSAGE_QUEUE_TYPE="pg-boss"

# Redis
REDIS_HOST="redis"
REDIS_PORT="6379"
REDIS_USERNAME="<redis-container-name>"
charles
charles3mo ago
if you ssh in your server container and curl localhost, do you have an answer? up 🙂
Frankie
FrankieOP3mo ago
You can close this, I am going to try Twenty at a later date
charles
charles3mo ago
ok 🙂
Want results from more Discord servers?
Add your server