{"id":22886608,"url":"https://github.com/zenodeapp/port-shifter","last_synced_at":"2026-05-02T19:35:19.826Z","repository":{"id":216031433,"uuid":"740280042","full_name":"zenodeapp/port-shifter","owner":"zenodeapp","description":"A port replacer (or resetter) for app.toml and config.toml files, used in Tendermint or CometBFT-based protocols. Also includes a variant for the Namada chain in a separate branch.","archived":false,"fork":false,"pushed_at":"2024-01-13T22:47:49.000Z","size":82,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-06T23:19:13.392Z","etag":null,"topics":["blockchain","cometbft","configuration","configuration-files","configuration-management","cosmos-sdk","namada","node","port","tendermint","toml","validator"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zenodeapp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":["zenodeapp"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":["https://zenode.app/support"]}},"created_at":"2024-01-08T02:33:17.000Z","updated_at":"2024-01-08T09:58:22.000Z","dependencies_parsed_at":"2024-01-19T18:38:53.145Z","dependency_job_id":null,"html_url":"https://github.com/zenodeapp/port-shifter","commit_stats":{"total_commits":25,"total_committers":1,"mean_commits":25.0,"dds":0.0,"last_synced_commit":"c49de7ba14ea99f2ade9930ece9e430b3a0c0242"},"previous_names":["zenodeapp/port-shifter"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenodeapp%2Fport-shifter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenodeapp%2Fport-shifter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenodeapp%2Fport-shifter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenodeapp%2Fport-shifter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zenodeapp","download_url":"https://codeload.github.com/zenodeapp/port-shifter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246523089,"owners_count":20791431,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","cometbft","configuration","configuration-files","configuration-management","cosmos-sdk","namada","node","port","tendermint","toml","validator"],"created_at":"2024-12-13T20:19:29.125Z","updated_at":"2026-05-02T19:35:19.787Z","avatar_url":"https://github.com/zenodeapp.png","language":"Shell","funding_links":["https://github.com/sponsors/zenodeapp","https://zenode.app/support"],"categories":[],"sub_categories":[],"readme":"# Port Shifter\n\nA port replacer (or resetter) for the configuration files used in Tendermint or CometBFT-based protocols.\n\nThis has been written by ZENODE and is licensed under the MIT-license (see [LICENSE.md](./LICENSE.md)).\n\n## Overview\n\nIt can get quite time-consuming to replace the ports inside of the `app.toml`, `config.toml` and `client.toml` files if you plan on running multiple nodes. This small repository aims to solve this problem by providing two scripts; both having the same purpose of simplifying the process of replacing the port values.\n\n### 1. [shift-wizard.sh](shift-wizard.sh)\n\nThis wizard can either increment all ports by a common value _or_ let the user customize each port individually. It will start by asking whether you'd like to customize each port individually or not and continue from there.\n\nThis script can be run using:\n\n```\nsh shift-wizard.sh \u003cpath_to_config_dir\u003e\n```\n\u003e \u003cpath_to_config_dir\u003e can either be an absolute or relative path towards the directory containing the `app.toml`, `config.toml` and `client.toml` files.\n\n\u003e [!TIP]\n\u003e If you made a mess of all your ports, then you can **reset the ports to their default values** by giving it an **increment** of **0**.\n\n### 2. [quick-shift.sh](quick-shift.sh)\n\nIf you're in a limited or restrictive environment or do not trust running \"complex\" scripts then use this one instead. It is only capable of incrementing all port values, but can also be edited if one desires to edit every port individually by just changing the values for every port variable inside of the file and keeping the increment value at 0.\n\nThis script can be run using:\n\n```\nsh quick-shift.sh \u003cpath_to_config_dir\u003e [port_increment_value]\n```\n\u003e _[port_increment_value]_ is optional and defaults to 0, which will reset all the ports to their default values.\n\n## Sup\u003ci\u003eport\u003c/i\u003e\n\nHere follows a list of all the ports that are currently supported, with their _default_ values:\n\n```\n# config.toml\nproxy_app                    = 26658\n[rpc] laddr                  = 26657\npprof_laddr                  = 6060\n[p2p] laddr                  = 26656\nprometheus_listen_addr       = 26660\n\n# app.toml\n[api] address                = 1317\n[rosetta] address            = 8080\n[grpc] address               = 9090\n[grpc-web] address           = 9091\n[json-rpc] address           = 8545\n[json-rpc] ws-address        = 8546\n[json-rpc] metrics-address   = 6065\n```\n\n## Logic\n\n### for port replacement\n\n\u003e [!IMPORTANT]\n\u003e These scripts make a backup of the _.toml_ files (as _.toml.bak_ files), but do not take in account what ports were already configured _when incrementing_. Therefore the new ports get calculated **using the default port values stated in the script itself** and **not** what you _already_ had configured.\n\nThe logic for the _sed_-commands is to always look for the last colon (:). That way we only replace the _:port_ part, without having to worry about overwriting pre-configured ip-addresses that use _localhost_, _IPv4_ or _IPv6_ formatted addresses or protocols like _https://_ and _tcp://_.\n\n### for identical keys\nThe lines that have the same _key name_ are separated from one another by checking under which section they belong (for instance the key _address_ gets used multiple times in e.g. _[api]_, _[grpc]_ and _[rosetta]_).\n\n\u003c/br\u003e\n\n\u003cp align=\"right\"\u003e— ZEN\u003c/p\u003e\n\u003cp align=\"right\"\u003eCopyright (c) 2024 ZENODE\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzenodeapp%2Fport-shifter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzenodeapp%2Fport-shifter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzenodeapp%2Fport-shifter/lists"}