19 days ago
Today we are pleased to finally release our new builder into Beta - Railpack - https://railpack.com
Built to replace Nixpacks, but with none of the downsides, it's everything we originally hoped Nixpacks would be and so much more -
- First-class support for SPA apps (Vite, Astro, CRA, Angular)
- Better caching, faster, more efficient builds, and smaller image sizes - 38% (Node) and 77% (Python)
- Unlike Nixpacks, updates to Railpack itself are not needed to support the latest version of anything, this means the latest version of bun is always available
- Railpack will cache the last working versions for a deployment and use it for future deployments so updates to Railpack defaults won't break deploys
- Better verbosity with the build plan, we now tell you the exact versions of the language, and where the version was retrieved from
- We now use mise for package resolution and installation, Nix is not used anymore, it's just not a good fit for the needs of a buildpack
- Built-in language-specific help outputs for common errors such as "No start command was found" - we now tell you exactly what to do
It is still in Beta so there are some things to keep in mind -
- There is no Nixpacks compatibility layer, if you had a custom Nixpacks plan, then it would essentially be ignored by a Railpack build
- We don't yet have language parity with Nixpacks, only Node, Python, Go, PHP, Java, Deno, and Staticfiles are supported at this time
- There is no way to specify Nix packages to install during build, and there likely never will be
- The Railpack documentation is still a work in progress, but it's built with Astro and starlight for the curious
- We are switching from Rust to Go to have better interoperability with buildkit, which gives us better control over the build, no more intermediate Dockerfiles
- We have a railpack.json
config file - But the syntax is yet to be finalized
If your language is supported and you are eager to try it out, you can switch to the new builder from within your service settings under the build
section.
And be sure to read up on the documentation we have so far so you're caught up on anything I haven't mentioned here!
0 Threads mention this feature
51 Replies
Status changed to In Progress brody • 19 days ago
19 days ago
+1 for Deno support
19 days ago
It doesn't use the root dir from the settings, is there a way to force that?
Will this support monorepos?
strackfeldt
It doesn't use the root dir from the settings, is there a way to force that?Will this support monorepos?
19 days ago
It doesn't use the root dir from the settings, is there a way to force that?
The root directory is set out side of Railpack so it should currently work. Can you share a link to a build where it wasn't working.
Will this support monorepos?
You can currently set a custom build and start command and Railpack will build your monorepo (this is what we use for railway.com). What other monorepo support would you like to see?
jr
It doesn't use the root dir from the settings, is there a way to force that?The root directory is set out side of Railpack so it should currently work. Can you share a link to a build where it wasn't working.Will this support monorepos?You can currently set a custom build and start command and Railpack will build your monorepo (this is what we use for railway.com). What other monorepo support would you like to see?
19 days ago
We are using go, but it detected the root package.json and wanted to build using node, but I was just playing around, so no worries.
But as you mentioned railway.com, would be nice if you brought back railway station (https://blog.railway.com/p/building-railway-on-railway) or something similar, was cool to see how you did things on a real project
19 days ago
Hey there, just enabled this to play around.
I have a Node application with "engines": { "node": "^22.0.0" }
in package.json
. From what I can tell, Railpack has resolved this to Node.js version 22.0.0
:
Based on the version string, I would expect this to be resolved to the latest v22 (currently 22.14.0
), not 22.0.0
.
Nice one :)
Attachments
strackfeldt
We are using go, but it detected the root package.json and wanted to build using node, but I was just playing around, so no worries.But as you mentioned railway.com, would be nice if you brought back railway station (https://blog.railway.com/p/building-railway-on-railway) or something similar, was cool to see how you did things on a real project
17 days ago
This should be fixed now
lachenmayer
Hey there, just enabled this to play around.I have a Node application with "engines": { "node": "^22.0.0" } in package.json. From what I can tell, Railpack has resolved this to Node.js version 22.0.0:Based on the version string, I would expect this to be resolved to the latest v22 (currently 22.14.0), not 22.0.0.Nice one :)
17 days ago
This should also be fixed
Thanks for the feedback! Keep it coming
16 days ago
So how is it determined what packages are installed if you don't create a railpack.json
? e.g. i have two very similar projects (sveltekit + bun) and set the RAILPACK_BUN_VERSION
but one installs both node and bun, and the other only bun?
Attachments
thomasmol
So how is it determined what packages are installed if you don't create a railpack.json? e.g. i have two very similar projects (sveltekit + bun) and set the RAILPACK_BUN_VERSION but one installs both node and bun, and the other only bun?
16 days ago
does it maybe scan whats inside the package.json for example?
Attachments
thomasmol
does it maybe scan whats inside the package.json for example?
16 days ago
Take a look at https://railpack.com/languages/node for specifics - likewise with the other provider docs. Bun is only autodetected if you have a bun.lockb
file; otherwise, it'll install Node. If you have both a Node lockfile and RAILPACK_BUN_VERSION
set, then that would explain it installing both.
16 days ago
Okay interesting! I only have a bun.lock
and no node lockfile or RAILPACK_NODE_VERSION
set but it still installs both. Is there something else that affects these installs? i also don't have an engines
field in my package.json
or a .nvmrc
file anywhere
16 days ago
Hi, we're brand new to Railway and sort of defaulted to using Railpack since we figured it'd become the new standard soon so we might as well start with it. Where is a good place to report issues? We're running into an odd one with PHP and Nginx, where it eventually crashes and appears to be appending a duplicate of the port each time:
Starting Container
Starting Nginx on port 8080
2025/03/07 21:51:17 [emerg] 6#6: invalid port in "0.0.0.0:80808080" of the "listen" directive in /etc/nginx/railpack.conf:29
Starting Nginx on port 8080
2025/03/07 21:51:18 [emerg] 6#6: invalid port in "0.0.0.0:8080808080808080" of the "listen" directive in /etc/nginx/railpack.conf:29
Starting Nginx on port 8080
2025/03/07 21:51:19 [emerg] 6#6: invalid port in "0.0.0.0:80808080808080808080808080808080" of the "listen" directive in /etc/nginx/railpack.conf:29
Starting Nginx on port 8080
2025/03/07 21:51:20 [emerg] 6#6: invalid port in "0.0.0.0:8080808080808080808080808080808080808080808080808080808080808080" of the "listen" directive in /etc/nginx/railpack.conf:29
Starting Nginx on port 8080
2025/03/07 21:51:21 [emerg] 6#6: invalid port in "0.0.0.0:80808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080" of the "listen" directive in /etc/nginx/railpack.conf:29
Starting Nginx on port 8080
2025/03/07 21:51:22 [emerg] 6#6: invalid port in "0.0.0.0:8080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080" of the "listen" directive in /etc/nginx/railpack.conf:29
Starting Nginx on port 8080
...and so on.
thomasmol
Okay interesting! I only have a bun.lock and no node lockfile or RAILPACK_NODE_VERSION set but it still installs both. Is there something else that affects these installs? i also don't have an engines field in my package.json or a .nvmrc file anywhere
16 days ago
There is some additional logic to determine if node is required. Node will be added if bun is the package manager and
node is used in one of the
package.json
scriptsAstro is detected (astro often fails without node when building)
Is the build failing for you because node is not available?
rededge-ian
Hi, we're brand new to Railway and sort of defaulted to using Railpack since we figured it'd become the new standard soon so we might as well start with it. Where is a good place to report issues? We're running into an odd one with PHP and Nginx, where it eventually crashes and appears to be appending a duplicate of the port each time:Starting ContainerStarting Nginx on port 80802025/03/07 21:51:17 [emerg] 6#6: invalid port in "0.0.0.0:80808080" of the "listen" directive in /etc/nginx/railpack.conf:29Starting Nginx on port 80802025/03/07 21:51:18 [emerg] 6#6: invalid port in "0.0.0.0:8080808080808080" of the "listen" directive in /etc/nginx/railpack.conf:29Starting Nginx on port 80802025/03/07 21:51:19 [emerg] 6#6: invalid port in "0.0.0.0:80808080808080808080808080808080" of the "listen" directive in /etc/nginx/railpack.conf:29Starting Nginx on port 80802025/03/07 21:51:20 [emerg] 6#6: invalid port in "0.0.0.0:8080808080808080808080808080808080808080808080808080808080808080" of the "listen" directive in /etc/nginx/railpack.conf:29Starting Nginx on port 80802025/03/07 21:51:21 [emerg] 6#6: invalid port in "0.0.0.0:80808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080" of the "listen" directive in /etc/nginx/railpack.conf:29Starting Nginx on port 80802025/03/07 21:51:22 [emerg] 6#6: invalid port in "0.0.0.0:8080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080" of the "listen" directive in /etc/nginx/railpack.conf:29Starting Nginx on port 8080...and so on.
16 days ago
This is a great place to report bugs like this. We are investigating this one and in general will be revamping the PHP support.
16 days ago
How do you install php extensions? I'm struggling to get a laravel app to deploy because it doesn't have pdo_pgsql installed.
jr
There is some additional logic to determine if node is required. Node will be added if bun is the package manager andnode is used in one of the package.json scriptsAstro is detected (astro often fails without node when building)Is the build failing for you because node is not available?
16 days ago
ah thanks! found the issue. I had 'node' somewhere in my package.json scripts.
nick-potts
How do you install php extensions? I'm struggling to get a laravel app to deploy because it doesn't have pdo_pgsql installed.
16 days ago
I've spent quite a bit of time on this and have had zero luck trying to get any laravel install to run with a database short of sqlite. Even the templates for laravel don't deploy by default.
I've been trying to figure out how to swap out the image for a more production ready image, but had no luck:
{
"$schema": "https://schema.railpack.com",
"steps": {
"package:image": {
"inputs": [
{
"image": "serversideup/php:8.3-fpm-nginx"
}
],
}
}
}
It just tells me WARN Step packages:image
exists, but it is not a command step. Skipping...
16 days ago
I feel like I got close here but it never quite worked:
{
"$schema": "https://schema.railpack.com",
"steps": {
"package:serversideup": {
"inputs": [
{
"image": "serversideup/php:8.3-fpm-nginx"
}
],
"commands": [
"apt-get update",
"apt-get install -y git unzip zip",
"PHP_INI_DIR=/usr/local/etc/php install-php-extensions imagick gd"
]
},
"install:composer": {
"inputs": [
{
"step": "package:serversideup"
}
]
}
},
"deploy": {
"startCommand": "/init"
}
}
The serversideup/php:8.3-fpm-nginx
image is really nice, but I couldn't get it to place nice (aka override the default image). Ideally whatever image you used as a base for php had install-php-extensions
.
16 days ago
Ruby / rails support please
14 days ago
just tried it out with one of my bun based webapps and it looks like there seems to be a problem with better-sqlite3
Attachments
justin
just tried it out with one of my bun based webapps and it looks like there seems to be a problem with better-sqlite3
14 days ago
Can you please share a link to this deployment
nick-potts
I feel like I got close here but it never quite worked:{ "$schema": "https://schema.railpack.com", "steps": { "package:serversideup": { "inputs": [ { "image": "serversideup/php:8.3-fpm-nginx" } ], "commands": [ "apt-get update", "apt-get install -y git unzip zip", "PHP_INI_DIR=/usr/local/etc/php install-php-extensions imagick gd" ] }, "install:composer": { "inputs": [ { "step": "package:serversideup" } ] } }, "deploy": { "startCommand": "/init" } }The serversideup/php:8.3-fpm-nginx image is really nice, but I couldn't get it to place nice (aka override the default image). Ideally whatever image you used as a base for php had install-php-extensions.
14 days ago
We are going to be improving the PHP/Laravel support this week! Ideally it just works out of the box
jr
Can you please share a link to this deployment
14 days ago
in this public thread or should i send a mail or something else?
justin
in this public thread or should i send a mail or something else?
14 days ago
This thread is fine, IDs would not be sensitive and only your team and admins would be able to access it.
brody
This thread is fine, IDs would not be sensitive and only your team and admins would be able to access it.
14 days ago
the service url:
https://railway.com/project/c5a88f3d-42f5-48f3-b166-9857ef995183/service/074ddf04-63f0-4928-80e9-51d8277cc581?environmentId=09edde0f-f6f7-4616-9721-fda67cd33789
if you need anything else please let me know i realy like how quick the deploys are now for python and would love to test it also for frontend projects
justin
the service url:https://railway.com/project/c5a88f3d-42f5-48f3-b166-9857ef995183/service/074ddf04-63f0-4928-80e9-51d8277cc581?environmentId=09edde0f-f6f7-4616-9721-fda67cd33789if you need anything else please let me know i realy like how quick the deploys are now for python and would love to test it also for frontend projects
14 days ago
Can you please link the specific deployment that was done with Railpack?
brody
Can you please link the specific deployment that was done with Railpack?
13 days ago
No need anymore. I was able to reproduce it and it should be fixed soon
brody
Can you please link the specific deployment that was done with Railpack?
13 days ago
Just saw the comment excuse me
jr
No need anymore. I was able to reproduce it and it should be fixed soon
13 days ago
if it helps the core logics of the webapp that has been tried to be deployed is a custom starter template of mine its a private repo but if it can help i can invite you to the repo so that you can see all the deps and have a starting point to reproduce it
or if a email correspondence or anything else is needed i am happy to help looking forward to using railpack
13 days ago
Please don't break Nixpacks! My prod deployment broke without me touching anything! I'm here at 1:03am trying to debug this thing.
building '/nix/store/z85x27dby3429a6s9a1v6k5hlpl8qpca-yarn.drv'...
Running phase: unpackPhase
unpacking source archive /nix/store/vlvg5xhhbjr9lpgqwz1a21pfaajz3xgx-yarn-1.22.22.tgz
source root is package
setting SOURCE_DATE_EPOCH to timestamp 499162500 of file package/preinstall.js
Running phase: installPhase
building '/nix/store/xc6vrjpwisx9jk3pyyqqjzxdszmsl1af-ffeebf0acf3ae8b29f8c7049cd911b9636efd7e7-env.drv'...
error: collision between `/nix/store/ipfvmgkp6myiihmyk68yjr1dhpiv95yb-yarn/bin/yarn' and `/nix/store/h705p6lmismdn6ay2pn04rvcb2p6vl6i-yarn-1.22.22/bin/yarn'
error: builder for '/nix/store/xc6vrjpwisx9jk3pyyqqjzxdszmsl1af-ffeebf0acf3ae8b29f8c7049cd911b9636efd7e7-env.drv' failed with exit code 25
✕ [stage-0 4/16] RUN nix-env -if .nixpacks/nixpkgs-ffeebf0acf3ae8b29f8c7049cd911b9636efd7e7.nix && nix-collect-garbage -d
process "/bin/bash -ol pipefail -c nix-env -if .nixpacks/nixpkgs-ffeebf0acf3ae8b29f8c7049cd911b9636efd7e7.nix && nix-collect-garbage -d" did not complete successfully: exit code: 100
Dockerfile:8
-------------------
6 |
7 | COPY .nixpacks/nixpkgs-ffeebf0acf3ae8b29f8c7049cd911b9636efd7e7.nix .nixpacks/nixpkgs-ffeebf0acf3ae8b29f8c7049cd911b9636efd7e7.nix
8 | >>> RUN nix-env -if .nixpacks/nixpkgs-ffeebf0acf3ae8b29f8c7049cd911b9636efd7e7.nix && nix-collect-garbage -d
9 |
10 |
-------------------
ERROR: failed to solve: process "/bin/bash -ol pipefail -c nix-env -if .nixpacks/nixpkgs-ffeebf0acf3ae8b29f8c7049cd911b9636efd7e7.nix && nix-collect-garbage -d" did not complete successfully: exit code: 100
Error: Docker build failed
ivorpad
Please don't break Nixpacks! My prod deployment broke without me touching anything! I'm here at 1:03am trying to debug this thing.building '/nix/store/z85x27dby3429a6s9a1v6k5hlpl8qpca-yarn.drv'... Running phase: unpackPhase unpacking source archive /nix/store/vlvg5xhhbjr9lpgqwz1a21pfaajz3xgx-yarn-1.22.22.tgz source root is package setting SOURCE_DATE_EPOCH to timestamp 499162500 of file package/preinstall.js Running phase: installPhase building '/nix/store/xc6vrjpwisx9jk3pyyqqjzxdszmsl1af-ffeebf0acf3ae8b29f8c7049cd911b9636efd7e7-env.drv'... error: collision between `/nix/store/ipfvmgkp6myiihmyk68yjr1dhpiv95yb-yarn/bin/yarn' and `/nix/store/h705p6lmismdn6ay2pn04rvcb2p6vl6i-yarn-1.22.22/bin/yarn' error: builder for '/nix/store/xc6vrjpwisx9jk3pyyqqjzxdszmsl1af-ffeebf0acf3ae8b29f8c7049cd911b9636efd7e7-env.drv' failed with exit code 25 ✕ [stage-0 4/16] RUN nix-env -if .nixpacks/nixpkgs-ffeebf0acf3ae8b29f8c7049cd911b9636efd7e7.nix && nix-collect-garbage -d process "/bin/bash -ol pipefail -c nix-env -if .nixpacks/nixpkgs-ffeebf0acf3ae8b29f8c7049cd911b9636efd7e7.nix && nix-collect-garbage -d" did not complete successfully: exit code: 100 Dockerfile:8 ------------------- 6 | 7 | COPY .nixpacks/nixpkgs-ffeebf0acf3ae8b29f8c7049cd911b9636efd7e7.nix .nixpacks/nixpkgs-ffeebf0acf3ae8b29f8c7049cd911b9636efd7e7.nix 8 | >>> RUN nix-env -if .nixpacks/nixpkgs-ffeebf0acf3ae8b29f8c7049cd911b9636efd7e7.nix && nix-collect-garbage -d 9 | 10 | ------------------- ERROR: failed to solve: process "/bin/bash -ol pipefail -c nix-env -if .nixpacks/nixpkgs-ffeebf0acf3ae8b29f8c7049cd911b9636efd7e7.nix && nix-collect-garbage -d" did not complete successfully: exit code: 100 Error: Docker build failed
13 days ago
Hello,
This is a thread for Railpack, if you have an issue with Nixpacks, please try switching to Railpack or open your own thread.
13 days ago
This is a thread for Railpack
@brody Wow, thanks, Capt. Obvious. 🫡
I'm switching to Railpack as we speak. I just wanted to complain a bit coz Nixpacks broke out of nowhere in my prod env after Railpack's release.
13 days ago
Nixpacks is not coupled to Railpack in any way, if something broke in a Nixpacks build it would not be related to Railpack.
But please let us know how the Railpack build goes!
13 days ago
Went smoothly! I'll try to dig Nix issues and report back (in a separate thread)
13 days ago
@brody - dont want ruby / rails to get lost in the support shuffle... is that on the roadmap?
jpowell
@brody - dont want ruby / rails to get lost in the support shuffle... is that on the roadmap?
13 days ago
It is definitely on the roadmap. We have been prioritizing language support based on the popularity of languages currently used with Nixpacks. Once we have nailed down the internal API and functionality, we will work on adding additional languages (like Ruby, Rust, C#, etc.)
nick-potts
I feel like I got close here but it never quite worked:{ "$schema": "https://schema.railpack.com", "steps": { "package:serversideup": { "inputs": [ { "image": "serversideup/php:8.3-fpm-nginx" } ], "commands": [ "apt-get update", "apt-get install -y git unzip zip", "PHP_INI_DIR=/usr/local/etc/php install-php-extensions imagick gd" ] }, "install:composer": { "inputs": [ { "step": "package:serversideup" } ] } }, "deploy": { "startCommand": "/init" } }The serversideup/php:8.3-fpm-nginx image is really nice, but I couldn't get it to place nice (aka override the default image). Ideally whatever image you used as a base for php had install-php-extensions.
12 days ago
PHP support has been much improved. https://railpack.com/languages/php
Extensions are installed and it should work out of the box for both Laravel 11 and 12 (if it doesn't please lmk).
jr
PHP support has been much improved. https://railpack.com/languages/phpExtensions are installed and it should work out of the box for both Laravel 11 and 12 (if it doesn't please lmk).
12 days ago
Worked first go. One thing I like to do with php installs is this:
COPY composer.json composer.lock ./
RUN composer install --no-dev --no-interaction --no-autoloader --no-ansi --no-scripts --audit
Then nearer to the end run a
RUN composer install \
--classmap-authoritative \
--no-interaction \
--no-ansi \
--no-dev \
&& composer clear-cache
This lets it cache the packages alone as a layer and run the autoloader with all the files later (which only takes a few seconds).
12 days ago
Thats a great suggestion, will look into it.
The current php support works in a similar way already though.
- Only composer.json
and composer.lock
are copied into the step when running composer install --optimize-autoloader --no-scripts --no-interaction
composer cache directory is cached between builds (so clearing the cache isn't necessary)
We could run with --classmap-authoritative
at the end though
9 days ago
Any suggestions on getting Bun picked up when using PNPM? (I.e., no bun.lockb
for auto-detection)
Is specifying a RAILPACK_BUN_VERSION
the advised solution here? I imagine there are others who also use Bun runtime, but not Bun's package manager.
9 days ago
Love the idea of railpacks! Using nixpacks, I had some of my previously fast and cached builds slow down, so I'm hopeful that railpacks will help prevent similar issues in the future.
jr
No need anymore. I was able to reproduce it and it should be fixed soon
9 days ago
just retested the same deploy again and this time it went through without any problems will keep you posted if i see anything else
7 days ago
Php builds seem to be broken for me now:
Starting Laravel server ...
using config from file
Error: adapting config using caddyfile: parsing caddyfile tokens for 'php_server': unknown 'php or php_server' subdirective: 'stderr_log_level' (allowed directives are: root, split, env, resolve_root_symlink)
Stopping Container
nick-potts
Php builds seem to be broken for me now:Starting Laravel server ...using config from fileError: adapting config using caddyfile: parsing caddyfile tokens for 'php_server': unknown 'php or php_server' subdirective: 'stderr_log_level' (allowed directives are: root, split, env, resolve_root_symlink)Stopping Container
7 days ago
It looks like you have a custom railpack.json
config? Could you please share a link to the deployment so that I can take a look.
neall
Any suggestions on getting Bun picked up when using PNPM? (I.e., no bun.lockb for auto-detection)Is specifying a RAILPACK_BUN_VERSION the advised solution here? I imagine there are others who also use Bun runtime, but not Bun's package manager.
7 days ago
You can add Bun as a package with the env variable RAILPACK_PACKAGES=bun@latest
. Docs.
Is there something we could auto detect for using Bun? Railpack will automatically add Bun if there is a lockfile or if bun is used in the package.json scripts.
jr
It looks like you have a custom railpack.json config? Could you please share a link to the deployment so that I can take a look.
6 days ago
jr
You can add Bun as a package with the env variable RAILPACK_PACKAGES=bun@latest. Docs.Is there something we could auto detect for using Bun? Railpack will automatically add Bun if there is a lockfile or if bun is used in the package.json scripts.
6 days ago
Oh awesome - as in having package.json start
script set to bun run index.ts
should be sufficient to auto-detect/install Bun?
6 days ago
Seems like any Laravel deployment is having the same issue. Tried two different repos, and the top Laravel template.
https://railway.com/project/ec650840-d84f-4b10-ae4f-f776be65906e/service/51a4d28d-7219-46b6-a06a-7efcd63d7d6b?environmentId=ca55db07-16cc-42b2-8ad9-780e3869f4b0&id=98503d10-bc15-4ba7-84e0-4d75b40bb28b#deploy
4 days ago
Looking forward to Scala / sbt support with option to target Java 21
3 days ago
Looks like Laravel deployments are working again with Railpack 0.0.57