Feedback: Railway Functions

19 days ago

As part of Launch Week 02, we have shipped Railway Functions

Write and deploy code from the Railway canvas without managing infrastructure or creating a git repository. Functions are Services that run a single file of TypeScript code using the Bun runtime. Use them like any other Service, but without the overhead of a repository.

To make a Function Service, click New Service on the canvas and then click "Function" - you will then see the editor.

They are ideal for small tasks like handling webhooks, cron jobs, or simple APIs. (Or larger ones like cleaning data.)

This is a feedback thread to keep track of asks about this feature.

Some known caveats:

  • You can't railway up your function file

  • 1 file per function

  • Max file size of 96KB

Roast 'em

In Progress

0 Threads mention this feature

7 Replies

Status changed to In Progress angelo 19 days ago


andreaseliaPRO

18 days ago

Awesome launch! I take it Railway Functions are designed, as you said, for small tasks, rather than something like runnning Puppeteer or anything else which is heavy that requires additional setup for an image install, etc. that can be ran as its own service?


malonehedgesPRO

18 days ago

Love Railway, love Bun, and love functions! Love this update!

A couple requests:
- pushing changes from a file on my computer (I'm more comfortable in my editor, I like versioning with GitHub / collaborating, and I want LLMs to write this code for me)
- if not above, LLM help (with some copy/paste instructions on how the import syntax / version pinning works, best practices that make sense for an LLM to have as context when writing one of these functions)
- Vim bindings in the dashboard
- Very clear versioning of Bun, which is less important if Bun is always up to date (Bun releases new features all the time currently, and with Nixpacks in the past I wasn't able to use a new feature and changed my build system to be Docker)

Overall very excited! Thanks Railway team!


markvh033HOBBY

18 days ago

I like it! more examples and documentation will always be appreciated so people can quickly get going.

An issue im running into now is:

error: Failed to start server. Is port 8080 in use?

syscall: "listen",

errno: 0,

code: "EADDRINUSE"

at bun:main:12:28

Another container is already using 8080, but cant find where i can change the port.


AnonymousTRIAL

17 days ago

Does the Railway Function support Python? I have a cron job running Python code and am exploring integration options. Let me know if this is possible.


andreaselia

Awesome launch! I take it Railway Functions are designed, as you said, for small tasks, rather than something like runnning Puppeteer or anything else which is heavy that requires additional setup for an image install, etc. that can be ran as its own service?

17 days ago

Yes, we would say bring an image for that.


Does the Railway Function support Python? I have a cron job running Python code and am exploring integration options. Let me know if this is possible.

17 days ago

Not yet, but it's likely the second language we'd support.


malonehedges

Love Railway, love Bun, and love functions! Love this update!A couple requests:- pushing changes from a file on my computer (I'm more comfortable in my editor, I like versioning with GitHub / collaborating, and I want LLMs to write this code for me)- if not above, LLM help (with some copy/paste instructions on how the import syntax / version pinning works, best practices that make sense for an LLM to have as context when writing one of these functions)- Vim bindings in the dashboard- Very clear versioning of Bun, which is less important if Bun is always up to date (Bun releases new features all the time currently, and with Nixpacks in the past I wasn't able to use a new feature and changed my build system to be Docker)Overall very excited! Thanks Railway team!

jaredlundeEMPLOYEE

17 days ago

This stays between us shh, but you can cmd+option+v or ctrl+alt+v in the editor to enable vim mode.

Thanks for all the feedback : ) We are working on some of these things.


Feedback: Railway Functions - Railway Help Station