[GH-ISSUE #681] How to setup in Railway? #499

Closed
opened 2026-05-07 00:24:48 +02:00 by BreizhHardware · 7 comments

Originally created by @p-samuel on GitHub (Mar 23, 2023).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/681

Question

Hi there, I've trying to setup a private server on railway's website through a Dockerfile. Here is it:

FROM binwiederhier/ntfy
EXPOSE 80
EXPOSE 443
COPY server.yml /etc/ntfy/server.yml
ENTRYPOINT ["ntfy", "serve"]

And here is my server.yml:

base-url: "https://ntfy-server-production.up.railway.app"

Everything seems to be working when I send the deploy command through my terminal.

Screen Shot 2023-03-23 at 19 07 22

But when I try to access I'm getting a server error.

Screen Shot 2023-03-23 at 19 15 15

Any suggestions on what I'm missing?

Originally created by @p-samuel on GitHub (Mar 23, 2023). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/681 <!-- Before you submit, consider asking on Discord/Matrix instead. You'll usually get an answer sooner, and there are more people there to help! - Discord: https://discord.gg/cT7ECsZj9w - Matrix: https://matrix.to/#/#ntfy:matrix.org / https://matrix.to/#/#ntfy-space:matrix.org --> :question: **Question** <!-- Go ahead and ask your question here :) --> Hi there, I've trying to setup a private server on railway's website through a Dockerfile. Here is it: ``` FROM binwiederhier/ntfy EXPOSE 80 EXPOSE 443 COPY server.yml /etc/ntfy/server.yml ENTRYPOINT ["ntfy", "serve"] ``` And here is my server.yml: ``` base-url: "https://ntfy-server-production.up.railway.app" ``` Everything seems to be working when I send the deploy command through my terminal. ![Screen Shot 2023-03-23 at 19 07 22](https://user-images.githubusercontent.com/53358247/227376644-311e66b9-0213-4a29-ba81-4aa8675c2c50.png) But when I try to access I'm getting a server error. ![Screen Shot 2023-03-23 at 19 15 15](https://user-images.githubusercontent.com/53358247/227376898-bda95124-d238-47ea-80ef-f64eca66330c.png) Any suggestions on what I'm missing?
BreizhHardware 2026-05-07 00:24:48 +02:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@p-samuel commented on GitHub (Mar 23, 2023):

Trying by curl also happens to give the same error

curl -s https://ntfy-server-production.up.railway.app/test/json         
<!-- gh-comment-id:1482006055 --> @p-samuel commented on GitHub (Mar 23, 2023): Trying by curl also happens to give the same error ``` curl -s https://ntfy-server-production.up.railway.app/test/json ```
Author
Owner

@p-samuel commented on GitHub (Mar 23, 2023):

I found the solution: I must to provide the port environment variable in the project's settings on Railway's dashboard

Thanks anyway.

<!-- gh-comment-id:1482044056 --> @p-samuel commented on GitHub (Mar 23, 2023): I found the solution: **I must to provide the port environment variable in the project's settings on Railway's dashboard** Thanks anyway.
Author
Owner

@binwiederhier commented on GitHub (Mar 24, 2023):

If you'd like, you could provide an example with screenshots for the examples page: https://docs.ntfy.sh/examples/

<!-- gh-comment-id:1482126252 --> @binwiederhier commented on GitHub (Mar 24, 2023): If you'd like, you could provide an example with screenshots for the examples page: https://docs.ntfy.sh/examples/
Author
Owner

@p-samuel commented on GitHub (Mar 24, 2023):

@binwiederhier, is a YouTube video valid one?

https://youtu.be/L49wM84ivzE

<!-- gh-comment-id:1483374881 --> @p-samuel commented on GitHub (Mar 24, 2023): @binwiederhier, is a YouTube video valid one? https://youtu.be/L49wM84ivzE
Author
Owner

@binwiederhier commented on GitHub (Mar 27, 2023):

@p-samuel Awesome!! I'll add it to the examples page.

<!-- gh-comment-id:1484341481 --> @binwiederhier commented on GitHub (Mar 27, 2023): @p-samuel Awesome!! I'll add it to the examples page.
Author
Owner

@binwiederhier commented on GitHub (Mar 27, 2023):

Wait, where did the video go? I watched it the other day and now it's gone.

<!-- gh-comment-id:1484341836 --> @binwiederhier commented on GitHub (Mar 27, 2023): Wait, where did the video go? I watched it the other day and now it's gone.
Author
Owner

@p-samuel commented on GitHub (Mar 27, 2023):

@binwiederhier , sorry, I've uploaded again because the audio was too bad.

https://youtu.be/auJICXtxoNA

https://github.com/hazzelnuts/ntfy-for-delphi/wiki/%F0%9F%9A%80-Self-hosting-ntfy-on-Railway

<!-- gh-comment-id:1484692571 --> @p-samuel commented on GitHub (Mar 27, 2023): @binwiederhier , sorry, I've uploaded again because the audio was too bad. https://youtu.be/auJICXtxoNA https://github.com/hazzelnuts/ntfy-for-delphi/wiki/%F0%9F%9A%80-Self-hosting-ntfy-on-Railway
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ntfy#499
No description provided.