14 days ago
I'm trying to figure out how to set up a custom chatbot on my website.
I can't get the test website on Railway to open, it deploys but gives me an error upon opening.
I'm using SillyTavern from github, which is a chatbot software, I'm trying to get it up and running on Railway. I got an api key from openrouter.
I set my variables:
OPENROUTER_API_KEY = (the api key)
PORT = 8000
HOST = 0.0.0.0
NODE_ENV = production
Setting a volume (5gb) seems to have removed all the errors. But despite no errors now, the site won't open.
"Error seems to be caused by the application" is what I get when I try to open the website.
ChatGPT says this:
"Look at the logs:
SillyTavern WebServer\SillyTavern is listening on IPv4: 127.0.0.1:8000
That means the app is live, but only inside the container right now (localhost = 127.0.0.1). Railway can’t serve it publicly unless the server is told to bind to 0.0.0.0 instead of 127.0.0.1."
Admittedly, I set this whole thing up using ChatGPT because I'm a beginner.
ChatGPT has given me some start commands to try to force it to bind to 0.0.0.0 but none of that stuff seems to work. Right now I'm just using "npm run start"
33 Replies
14 days ago
Hey there! We've found the following might help you get unblocked faster:
If you find the answer from one of these, please let us know by solving the thread!
14 days ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open brody • 14 days ago
13 days ago
can you please try port 8080?
fra
can you please try port 8080?
12 days ago
It deployed after a minute but still won't load when opening the test site.
Stopping Container
Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/3e6477bc-dfd3-4027-b81c-2314cf828f1e/vol_lr4hfkrzeaoyhqv7
Starting Container
Stopping Container
> sillytavern@1.13.3 start
> node server.js
Node version: v22.19.0. Running in production environment. Server directory: /home/node/app
Using config path: ./config.yaml
Warning: config.yaml not found at ./config.yaml. Creating a new one with default values.
Using data root: ./data
Preferring IPv4 for DNS resolution
SillyTavern 1.13.3
Compiling frontend libraries...
webpack 5.98.0 compiled successfully in 822 ms
Launching in a browser: default...
]2;SillyTavern WebServer\SillyTavern is listening on IPv4: 127.0.0.1:8000
=================================================
Go to: http://127.0.0.1:8000/ to open SillyTavern
=================================================
]2;node\
12 days ago
This is still with the port 8000, if you want to keep this port you probably need to update the port in railway
fra
This is still with the port 8000, if you want to keep this port you probably need to update the port in railway
12 days ago
12 days ago
the logs says 8000
```
]2;SillyTavern WebServer\SillyTavern is listening on IPv4: 127.0.0.1:8000
=================================================
Go to: http://127.0.0.1:8000/ to open SillyTavern
```
fra
the logs says 8000```]2;SillyTavern WebServer\SillyTavern is listening on IPv4: 127.0.0.1:8000=================================================Go to: http://127.0.0.1:8000/ to open SillyTavern```
12 days ago
arvinxx1
maybe I'm missing something, but I thought I did set everything to 8080? Here are screenshots
12 days ago
change the domain to point to 8000, not 8080
irazvan2745
change the domain to point to 8000, not 8080
12 days ago
I did, same thing. Won't connect.
12 days ago
redeploy and send the deploy logs
irazvan2745
redeploy and send the deploy logs
12 days ago
Stopping Container
Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/02d880a4-09f0-4671-b737-699b75094254/vol_lr4hfkrzeaoyhqv7
Starting Container
Stopping Container
> sillytavern@1.13.3 start
> node server.js
Node version: v22.19.0. Running in production environment. Server directory: /home/node/app
Using config path: ./config.yaml
Warning: config.yaml not found at ./config.yaml. Creating a new one with default values.
Using data root: ./data
Preferring IPv4 for DNS resolution
SillyTavern 1.13.3
Compiling frontend libraries...
webpack 5.98.0 compiled successfully in 779 ms
Launching in a browser: default...
]2;SillyTavern WebServer\SillyTavern is listening on IPv4: 127.0.0.1:8000
=================================================
Go to: http://127.0.0.1:8000/ to open SillyTavern
=================================================
]2;node\
arvinxx1
maybe I'm missing something, but I thought I did set everything to 8080? Here are screenshots
12 days ago
is it still 8080 here? send a screenshot
irazvan2745
is it still 8080 here? send a screenshot
12 days ago
12 days ago
are you building with nixpacks or railpack?
12 days ago
try pointing the domain to 8080, maybe the deploy logs are wrong somehow
irazvan2745
are you building with nixpacks or railpack?
12 days ago
I'm not sure how to check
12 days ago
12 days ago
ah you have a dockerfile, mind sharing its contents?
irazvan2745
ah you have a dockerfile, mind sharing its contents?
12 days ago
https://docs.docker.com/reference/dockerfile/ is all I could find
12 days ago
… the dockerfile in your project, the GitHub repository
irazvan2745
… the dockerfile in your project, the GitHub repository
12 days ago
arvinxx1
this is all I see
12 days ago
Change this to railpack
12 days ago
change the port here to be 8080:
https://github.com/Arvinxx1/ctest-sillytavern/blob/release/Dockerfile#L46
or change the port in the env & in railway to be 8000.
The point is, the port use to serve the app should match the one in railway, usually railway is on the 8080, so you can keep this 8080 & update all your references to be 8080, or you can just change the railway port to be 8000...up to you, probably is quicker to set 8000 in the env + in railway
irazvan2745
Change this to railpack
12 days ago
sorry is this just as simple as pressing a button or does it include more steps. I can't find a simple answer
12 days ago
try to get all the port references with the same value, if you don't want to update the dockerfile try to set 8000 in both the PORT env & the railway port...actually, you can even just delete the PORT env and just use the railway port
11 days ago
@arvinxx1 it seems like you are really close to having this working, try what @fra is suggesting here. Update the EXPOSE
number in your repo's Dockerfile
then save the change in your repo. Then redeploy. It sounds like Railway is expecting your app to be reachable at port 8080, but the Dockerfile is configured to expose it at port 8000, so Railway can't connect to it. You could also tell Railway to find the app running at port 8000 if you'd prefer.
fra
try to get all the port references with the same value, if you don't want to update the dockerfile try to set 8000 in both the PORT env & the railway port...actually, you can even just delete the PORT env and just use the railway port
10 days ago
10 days ago
That's an application issue, so you might need to do some research, as the log says you probably need to add 0.0.0.0 in the ip whitelist
10 days ago
arvinxx1, go to: https://railway.com/deploy/YuyzZp and click "Deploy now".
Attachments
dim5x
arvinxx1, go to: https://railway.com/deploy/YuyzZp and click "Deploy now".
10 days ago
oh wow, this one works. So I just copy this?
arvinxx1
oh wow, this one works. So I just copy this?
10 days ago
Yes, this is a template from Railway. Warning(!): highly recommend you to change the password of default user, as stated in the description.
10 days ago
can you please mark my answer about the port as the solution? as that is the solution of the initial problem...
Status changed to Solved error • 10 days ago