npm install -g arweave-deploy
npm update -g arweave-deploy
RSA key generation requires Node v10.12.0 so some features may be unavailable. If you're running an earlier versoin of node or don't want node installed at all, the precompiled binaries below come bundled with the correct version.
These binaries are around 30MB each as they come with a self-contained, bundled version of node.
Deploy a file
arweave deploy path-to-my/file.txt --key-file path/to/arweave-key.json
Deploy a HTML file
arweave deploy path-to-my/index.html --key-file path/to/arweave-key.json --package
Save your keyfile
arweave key-save path/to/arweave-key.json
After saving your key you can now run commands without the
--key-file option, like this
arweave deploy path-to-my/index.html --package
arweave deploy path-to-my/file.txt
Once confirmed you'll see a transaction ID and URL
Your file is deploying! 🚀,Once your file is mined into a block it'll be available on the following URL,https://arweave.net/3T261RAQIj2DQmOk1t_zPQnoxVbh5qtMA1-NdzOHKKEYou can check it's status using 'arweave status 3T261RAQIj2DQmOk1t_zPQnoxVbh5qtMA1-NdzOHKKE'
To avoid having external dependencies we can package our HTML and external assets into a single self-contained file. Just add the
--package flag to the deploy command.
Under the hood your page will be processed using this inline-source NPM package, it's a common tool used in gulp and webpack workflows.
Read more about packaging, why it's useful and how it works, with examples.
arweave deploy path-to/index.html --package
For you can use the package command to process the file without deploying it, this is useful for testing or debugging.
arweave package path-to/index.html output/packaged.html
If you're deploying an Arweave application this is the recommended method to do so as each asset will be uploaded independently so there is no need for packaging and asset inlining.
arweave deploy-dir path-to/directory/to-deploy
Preparing files from /Users/test/path-to/directory/to-deployID Size Fee Type PathB65fe71tENkmgmndJQTvLZqVqg4lUsdcmCFudw_uzBk 4.59 kB 0.000019762690 image/png favicon/source.pngRBg1ysAnKmlnU8YROY2g2KVbE3d6rgobVV4qzss2Isk 3.55 kB 0.000017101174 image/png images/logo-node.png648-XB1Tf2KDPJUyzMf1Zf1FmWi0F103WMtZydQvhZ8 18.89 kB 0.000056359156 text/html open-web-hackathon.htmlKws1-Lr-z4tTGzrqfJQv9Biko_lrBPAr90H2xW_oXtg 22.24 kB 0.000064933485 text/html technology.htmlw243l_eiYxwS_JPotydO2VVi1uCpYga1CZjWAHuahDU 24.78 kB 0.000071428584 image/svg+xml images/8.svg9HG223hRM46RczvRidgxj1tF5GtoTprL2ItGKXew9Ac 32.27 kB 0.000090591496 image/svg+xml images/7.svgJ1CgVMmA0P7YxxynjuWW3J6e5S-Qp6O9Smu8I0nCGSA 22.65 kB 0.000065978098 text/html hosting.htmlaUJYq1gUTOenMHwlkQWj3YNSiul5O8j0G8lWXlHdx7I 22.79 kB 0.000066350461 image/svg+xml images/hosting-1.svgboN6C7ntD_yi-IGbkBqc0KXr0fz7SGoFLSZ2OKxJYRE 49.53 kB 0.000134780154 text/css player/player.cssEaa4CWHk1KD5QhHAUAjW5zV30391P60mhpHWcMgPGBU 36.59 kB 0.000101662402 text/html index.html*kFoajp8jQ1NUS7Rc7AaxwIMXViAdOYPfNQZjZkMlPEU 6.04 kB 0.000023471318 application/x.arweave-manifest+jsonSummaryIndex: index.htmlNumber of files: 78 + 1 manifestTotal size: 7.91 MBTotal price: 0.021388749854 ARWalletAddress: MDlauADgN7AoVQl4Eqmwr3xHXyKXMqADaiCas3mEyNQCurrent balance: 48.855183859428 ARBalance after uploading: 48.833795109574 ARCarefully check the above details are correct, then Type CONFIRM to complete this upload
Uploading...████████████████████████████████████████ 79/79 100% | 1m49sYour files are being deployed! 🚀Once your files are mined into blocks they'll be available on the following URLhttps://arweave.net/kFoajp8jQ1NUS7Rc7AaxwIMXViAdOYPfNQZjZkMlPEU
arweave status YOUR_TRANSACTION_ID
Trasaction ID: 3T261RAQIj2DQmOk1t_zPQnoxVbh5qtMA1-NdzOHKKEStatus: 200 Accepted- Block: 144339- Block hash: fMq_zmps-jgEAOC4Gi2s8ewAhgl31TzrOK8lSPVZWZlWhNfxCuZ-wD895F9rjFKK- Confirmations: 786Transaction URL: https://arweave.net/3T261RAQIj2DQmOk1t_zPQnoxVbh5qtMA1-NdzOHKKEBlock URL: https://arweave.net/block/hash/fMq_zmps-jgEAOC4Gi2s8ewAhgl31TzrOK8lSPVZWZlWhNfxCuZ-wD895F9rjFKKBlock explorer URL: https://viewblock.io/arweave/block/144339
The easiest way to use deploy is to load your keyfile first, then you can simply run deploy commands without having to pass your key each time.
arweave key-save path/to/arweave-key.json
Address: 5rqCZeIG9flWzndFTXzqtGBdLahYDsn7BrfRE2Vbu6wSet an encryption passphraseConfirm your encryption passphraseSuccessfully saved keyfile for wallet: 5rqCZeIG9flWzndFTXzqtGBdLahYDsn7BrfRE2Vbu6w
Your keyfile will be encrypted using the passphrase that you provide, and will be stored in
Why do I need a keyfile?
Arweave is a blockchain-like network, so each data upload (transaction) needs signing with a valid Arweave keyfile.
I don't have an Arweave keyfile or tokens?
If you don't have any Arweave tokens you can get some free to try this out.
I already have an Arweave wallet, how do I get the keyfile?
You can use the same keyfiles as the Arweave Chrome Extension Wallet, go to Wallets > Select a wallet > Select 'Export Key' to download the json keyfile.
If you want to generate a new keyfile you can do so using this command. This is useful if you don't want uploads to show from the same wallet address, or if you simply want to have a secondary wallet just used for deploying data.
arweave key-create new-arweave-key.json
Your new wallet address: 5rqCZeIG9flWzndFTXzqtGBdLahYDsn7BrfRE2Vbu6wSuccessfully saved key to new-arweave-key.json
You need to transfer funds to your new wallet address before you can use the keyfile for deployments. You can use the Chrome Extension Wallet for transacting AR between wallets.
To remove your saved keyfile simply run this command. After this you'll either need to save a new key or use the
--key-file option when using deploy.
You're about to forget your saved wallet: 5rqCZeIG9flWzndFTXzqtGBdLahYDsn7BrfRE2Vbu6wType CONFIRM to complete this action
Address: pEbU_SLfRzEseum0_hMB1Ie-hqvpeHWypRhZiPoioDIBalance: 10.113659492352 AR