a year ago
I'm using n8n server. But Google apps (Google Sheets, Google Drive and others) don't logging in with address like ###.up.railway.app (in Credentials). So I need to change this address and server to my own domain. Where can I add domain in Railway, find info like:
A
MX
TXT
Thanks!
19 Replies
a year ago
Hey, please take a look at https://docs.railway.com/guides/public-networking#custom-domains.
a year ago
Thanks for soon reply!
I added a CNAME record in the subdomain settings (1st screenshot). So in Worker (n8n) setting there is my domain now (see 2nd screenshot).
But there is an error 502 (Bad Gateway) when I click on it (3rd screenshot). Could you please answer what the problem is?
Attachments
1topby
Thanks for soon reply!I added a CNAME record in the subdomain settings (1st screenshot). So in Worker (n8n) setting there is my domain now (see 2nd screenshot). But there is an error 502 (Bad Gateway) when I click on it (3rd screenshot). Could you please answer what the problem is?
a year ago
Hey, have you tried the following: https://docs.railway.com/reference/errors/application-failed-to-respond?
uxuz
Hey, have you tried the following: https://docs.railway.com/reference/errors/application-failed-to-respond?
a year ago
Request ID:
JfX6ORKATN2Z1ydRAWH6Qw_2608660245
I registered the same value 8080 in my domain registrar, as well as in the Worker settings. But the error remained similar to 502 Gateway.
I attach a screenshot.
Attachments
a year ago
While the server is opened at the initial address - https://primary-production-af01.up.railway.app/
Attachments
a year ago
Here is HTTP logs
a year ago
I've tried to change manually PORT in Variables to 8080 from default 5678 - the same situation. Help me, please, to sole this issue.
Attachments
1topby
I've tried to change manually PORT in Variables to 8080 from default 5678 - the same situation. Help me, please, to sole this issue.
a year ago
Have you confirmed that your custom domain is also "connected" to the correct port? Other than that, I can not provide more help that what I have already offered. As a last resort, try removing and adding the custom domain again.
uxuz
Have you confirmed that your custom domain is also "connected" to the correct port? Other than that, I can not provide more help that what I have already offered. As a last resort, try removing and adding the custom domain again.
a year ago
How can I confirm such "connection"?
1topby
How can I confirm such "connection"?
a year ago
You can check the target port under your service's settings https://docs.railway.com/reference/errors/application-failed-to-respond#target-port-set-to-the-incorrect-value.
a year ago
So, you can see that I use similar port (screens). I've tried to delete and add domain once again. But nothing work, the same situation (520 Bad Gateway).
From the link you provided there is advises:
Start your application's server using:
Host =
0.0.0.0Port = Value of the
PORTenvironment variable provided by Railway.
Below are some solution examples for common languages and frameworks.
Node / Express
// Use PORT provided in environment or default to 3000
const port = process.env.PORT || 3000;
// Listen on `port` and 0.0.0.0
app.listen(port, "0.0.0.0", function () {
// ...
});Could you assist - where I can do this? Write or check this node and start application's server using such info.
uxuz
You can check the target port under your service's settings https://docs.railway.com/reference/errors/application-failed-to-respond#target-port-set-to-the-incorrect-value.
a year ago
Screens.
Attachments
a year ago
Interesting, your application should be listening just fine, since the auto generated / railway provided public URL is working. What I don't get is why your custom domain isn't working, the related subdomain does indeed have a CNAME record set and the trial plan allows for one custom domain per service.
Can you try removing your CNAME record and start the process again by removing your custom domain from Railway and initiate the process again. While this shouldn't have an effect on public networking, you could try redeploying the service which the custom domain is configured with.
uxuz
Interesting, your application should be listening just fine, since the auto generated / railway provided public URL is working. What I don't get is why your custom domain isn't working, the related subdomain does indeed have a CNAME record set and the trial plan allows for one custom domain per service.Can you try removing your CNAME record and start the process again by removing your custom domain from Railway and initiate the process again. While this shouldn't have an effect on public networking, you could try redeploying the service which the custom domain is configured with.
a year ago
Yes, of course. I will repeat the process with deleting CNAME from the domain settings at the registrar and deleting the domain from Railway.
At the same time, I will ask a question - could this be because time has not passed (as happens when DNS records are reconfigured? Or the fact that it is transferred from my domain to Railway but with error 502 already confirms that it is transferred, but incorrectly?
uxuz
Interesting, your application should be listening just fine, since the auto generated / railway provided public URL is working. What I don't get is why your custom domain isn't working, the related subdomain does indeed have a CNAME record set and the trial plan allows for one custom domain per service.Can you try removing your CNAME record and start the process again by removing your custom domain from Railway and initiate the process again. While this shouldn't have an effect on public networking, you could try redeploying the service which the custom domain is configured with.
a year ago
I did everything as you asked. Including deploy of the Worker (n8n). You can see the same error. And working server on the URL Railway provided.
1topby
I did everything as you asked. Including deploy of the Worker (n8n). You can see the same error. And working server on the URL Railway provided.
a year ago
Hey 1topby, a team member has looked into this issue and found that you have set your custom domain on a worker service, please set the custom domain on the primary service! (Remove the domain from your worker service first!)
uxuz
Hey 1topby, a team member has looked into this issue and found that you have set your custom domain on a worker service, please set the custom domain on the primary service! (Remove the domain from your worker service first!)
a year ago
Oh my... This is so simple! Thanks a lot to your team member!
Now it works on my subdomain (n8n.berezovski.by). I deleted Railway provided public URL. But in n8n Google Credentials there is old adress. Do you know, why is it so?
This is what I started all this with changing the domain for. So that my domain would be pulled up for authorization in Credentials. Otherwise, Google doesn't like your default address with .app. It returns error 400.
Attachments
a year ago
I restarted workflow, delete credentials, and add new. Now everything is fine. Thank you one more time!
1topby
I restarted workflow, delete credentials, and add new. Now everything is fine. Thank you one more time!
a year ago
I am glad that you have solved everything! I'll mark this thread as solved if you don't have any other questions.
Status changed to Solved uxuz • 12 months ago
