Set up the CLI
Install the 5050 CLI on your laptop or in CI, log in to your console, and optionally make it answer to railway.
Install
On macOS or Linux:
curl -fsSL https://5050cloud.com/install.sh | sh -s -- --cliIt installs only the 5050 command, no server parts, and needs no root. It goes to /usr/local/bin when you can write there (or run it as root), otherwise to ~/.local/bin. If that folder is not on your PATH, the installer says so; add it in your shell's profile:
export PATH="$HOME/.local/bin:$PATH"With wget:
wget -qO- https://5050cloud.com/install.sh | sh -s -- --cliArchives for every platform are on the repository's Releases page.
Log in
5050 login https://console.example.comThe CLI prints a code and opens the console's Approve CLI login page in your browser. Check that the code matches and approve it. On a machine with no browser, add --browserless and open the printed link anywhere you are logged in.
Check it worked:
5050 whoamiThe CLI keeps one token per console in ~/.config/5050/config.json (mode 0600), so you can log in to several installs.
Tokens for servers and CI
Create a token in the console. There are two kinds:
- Settings, API tokens: an account token. It acts as you, with your role.
- A project's Project Settings, Tokens, under Environment tokens: a token that can deploy, read logs and set variables in one environment. It suits CI best.
Copy the token at once; it is not shown again.
Then either log in with it:
5050 login https://console.example.com --token 5050_xxxxxxxxor skip login and set two variables, which suits CI best:
export FIFTY_URL=https://console.example.com
export FIFTY_TOKEN=5050_xxxxxxxxA GitHub Actions step that deploys the checked-out code to a linked service:
- name: Deploy to 5050cloud
env:
FIFTY_URL: ${{ secrets.FIFTY_URL }}
FIFTY_TOKEN: ${{ secrets.FIFTY_TOKEN }}
run: |
curl -fsSL https://5050cloud.com/install.sh | sh -s -- --cli
export PATH="$HOME/.local/bin:$PATH"
5050 up -c --service web-c (--ci) streams the build logs and exits when the deployment finishes, with a non-zero code if it failed.
Link a project
In your app's folder:
5050 link
5050 up5050 link asks for the project, environment and service, and remembers them for this folder. 5050 up uploads the folder, builds it and deploys it.
The railway alias
5050 alias installThis adds a railway command next to 5050, unless a real railway binary is already on your PATH. The first time you run it, it prints Using 5050cloud at <url>; run 5050 alias remove to undo. As railway, it accepts Railway's verbs and flags and reads RAILWAY_TOKEN and RAILWAY_API_TOKEN; put a 5050cloud token in them, not a Railway one. 5050 alias remove takes it away. See The railway alias.
Upgrade the CLI
Run the install command again. It replaces the binary in place.
What success looks like
5050 whoamiprints your email and the console's address.5050 status(orrailway statuswith the alias) prints the linked project, environment and service.