Deploy an app you already have with erpc worker import
erpc worker import takes in an app you already have, as it is. It writes the app's erpc.toml and changes none of its code.This page describes ERPC CLI
v0.1.0-rc.4, a pre-release.Import and deploy
The app can be a bot that runs under systemd or Docker today, or a service in another language.
import reads the app's directory and writes the erpc.toml it describes. Nothing else is written in the app, nothing in it is run, and its code is not changed. erpc adds the app to its own list, as init does.bash
- A Cargo package is built with
cargo build --release, as an app made byinitis. The app is named after the package unless--namesays otherwise, and--binpicks the binary when the package has several. A workspace root is refused: pointimportat the package. - A Linux binary built anywhere, in any language, deploys the same way with
--binary <PATH>, shipped as it is. erpc reads its header and refuses one a server cannot run: a macOS or Windows binary, a script, a shared library, a file cut short, or another architecture thanbuild.target. The binary must be static, or linked against glibc with its loader at the usual path. It is a file of the app: a link under that name that leads out of the app's directory is refused. A deploy stops on an unusable binary before a server is bought. Build the binary again before a deploy that should carry a change.
What import reads
import --chain names the chain the app is for, solana by default.How import reads a directory
The directory may be one you cloned a minute ago, so
import reads it with care.erpc.tomlis made new. When anything is at that path,importrefuses: it never writes over a file or through a link.- It reads regular files inside the directory, up to 1 MiB each. A link that leads out of the directory, a pipe, a device, a larger file and a file that is not UTF-8 are not read, and each is said.
- No value it takes for a secret is copied. It looks for credentials by their shape, so the check is a net, not a proof: a secret in a shape it does not know is copied like any value.
erpc.tomlis yours to read before you commit it. erpc worker checkwarns of fewer kinds thanimportholds back. It says nothing of an RPC URL with a key in its path, or of a recovery phrase, under[vars]: keep those witherpc worker secret put.
What your app finds on the server
- Settings arrive as environment variables,
[vars]and[secrets]alike. There is no.envon the server, and an app that reads a.envfile with a dotenv library keeps working. - Its own directory is read-only. Files it writes go under the directory
ERPC_WORKER_STATE_DIRnames (also itsHOME), which a deploy keeps anderpc worker backupbacks up. - A trading key arrives on a pipe, not in a file: 64 bytes on the file descriptor
ERPC_WORKER_KEY_FDnames, once, when the app starts, with the public key inERPC_WORKER_PUBKEY. An app that reads a key file has that one read to change; the pumpfun template'ssrc/wallet.rsshows it. - It is one binary and the files
run.fileslists. Anything else it opens at run time has to be in that list.
Next steps
- Keys and secrets: Keep the settings
importheld back, and the trading key. - Firewall and WAF: Choose who may reach the app.
- The worker guide: Every file
importreads, and the credential shapes it looks for.






