Umbrel Logo

Bitcoin Command Line Guide and Inscription Generator

Setting Up Umbrel Node and Connecting to Ord

Make sure to adjust all fee rates and amounts according to your specific requirements.

Connect to your Umbrel node via SSH:

This command connects to your Umbrel node using SSH for secure command execution.

ssh umbrel@<Umbrel IP Address>
ssh umbrel@umbrel.local

Create the /mnt/inscriptions/ Directory

SSH into your Umbrel device and create the directory with the necessary permissions:

ssh umbrel@<Umbrel IP Address>
sudo mkdir -p /mnt/inscriptions/
sudo chmod 755 /mnt/inscriptions/

Using Ord Commands

Install Ord from Umbrel App Store

Navigate to Umbrel’s App Store, download Ord, and let it scan and index the entire Bitcoin blockchain.

Check Indexing Progress

Check the progress of the indexing process using Docker logs.

sudo docker logs -f ordinals_ord_1 --tail 100

Interact with Ord via Docker

Access the Ord Docker container to run Ord commands directly.

sudo docker exec -it ordinals_ord_1 /bin/sh

Ord Wallet Commands

Create Wallet

Create a new wallet for storing and managing your Bitcoin and inscriptions.

ord wallet create

Get Receiving Address

Generate a new Bitcoin address to receive funds.

ord wallet receive

Check Wallet Balance

Check the current balance of your wallet.

ord wallet balance

Mint Runes Command

Mint new runes with a specified fee rate and rune name.

ord wallet mint --fee-rate 100 --rune "YourRuneName"

Inscribe a File

Create an inscription with the contents of a file.

ord wallet inscribe --fee-rate FEE_RATE --file FILE

List Inscriptions

List all inscriptions currently stored in your wallet.

ord wallet inscriptions

View Wallet Transactions

See all transactions associated with your wallet.

ord wallet transactions

Send Inscription

Send an inscription to another wallet address.

ord wallet send --fee-rate FEE_RATE ADDRESS INSCRIPTION_ID

Get Wallet Help

Get help for wallet commands and options.

ord wallet --help

Creating a Text Inscription Using Echo

Create a text file using echo:

Use the `echo` command to create a text file we name hello.txt with the content "Hello World".

echo "Hello World" > hello.txt

Transfer the File to Your Umbrel Node

Use SCP to transfer the file from your local machine to your Umbrel node. Replace <username>, <node_IP>, and <password> with your actual Umbrel username, node IP address, and password.

scp /path/to/hello.txt umbrel@<node_IP>:/home/umbrel/hello.txt

Move the File to /mnt/inscriptions/ Directory

SSH into your Umbrel node and move the file to the inscriptions directory:

ssh umbrel@<node_IP>
sudo mv /home/umbrel/hello.txt /mnt/inscriptions/

Access the Docker Container

Use the following command to access the Docker container where Ordinals is running:

sudo docker exec -it ordinals_ord_1 /bin/sh

Inscribe the Text File

Inside the Docker container, run the following command to inscribe the file with a specified fee rate:

ord wallet inscribe --fee-rate 11 --file /mnt/inscriptions/hello.txt

Full Script Example

Here's a full script that combines these steps:

This script creates a metadata file, verifies the parent inscription, and inscribes the metadata.

# Define parent inscription ID and fee rate
parent_tx="<Parent ID Number here>"
fee_rate=Add fee rate

# Create metadata JSON file - use echo to create a text file
echo '{
"p": "bpc-180",
"op": "deploy",
"id": "'$parent_tx'",
"name": "My BPC-180 Token",
"max": "1000",
"price": "0.01 BTC"
}' > metadata.json

# Verify the parent inscription exists in the wallet
ord wallet inscriptions

# Inscribe the metadata file to the parent inscription
ord wallet inscribe --fee-rate $fee_rate --parent $parent_tx --file metadata.json

# Check the result
echo "Metadata inscribed successfully."

Set Up Samba for Windows Access

Ensure that your Umbrel node's folders are accessible from your Windows laptop by following these steps.

Step 1: SSH into your Umbrel Node

Connect to your Umbrel node via SSH:

ssh umbrel@<Umbrel IP Address>

Step 2: Create a Bind Mount to Access the Docker Container's Folder from the Host

Run the following commands to create a bind mount:

sudo docker stop ordinals_ord_1
sudo docker run -d --name ordinals_ord_1 -v /mnt/inscriptions:/mnt/inscriptions <image_name>

Step 3: Install Samba on the Host

Run the following commands to install Samba:

sudo apt-get update
sudo apt-get install samba

Step 4: Set Folder Permissions

Set the correct permissions for the `/mnt/inscriptions` folder:

sudo chmod -R 0777 /mnt/inscriptions

Step 5: Configure Samba on the Host

Edit the Samba configuration file:

sudo nano /etc/samba/smb.conf

Add the following lines:

[umbrel]
path = /mnt/inscriptions
browseable = yes
read only = no
guest ok = yes
create mask = 0777
directory mask = 0777

Step 6: Set Samba Password

Create a Samba user and set a password (using `umbrel` user):

sudo smbpasswd -a umbrel

Step 7: Restart Samba Service

Restart the Samba service:

sudo systemctl restart smbd
sudo systemctl restart nmbd

Step 8: Access Shared Folder from Windows

Open File Explorer on your Windows laptop and enter the following in the address bar:

\\<Umbrel IP Address>\umbrel

Enter the Samba credentials if prompted:
Username: umbrel
Password: (the password you set for the Samba user)

Bitcoin Core Commands

Create a New Wallet with a Passphrase

Create a new Bitcoin wallet with added security using a passphrase.

bitcoin-cli createwallet "mywallet" false false "my_passphrase" false true

Generate a New Address

Generate a new receiving address for your Bitcoin wallet.

bitcoin-cli getnewaddress

List Unspent Transactions

List all unspent transaction outputs (UTXOs) in your wallet.

bitcoin-cli listunspent

Create a Raw Transaction

Create a raw Bitcoin transaction for advanced use cases.

bitcoin-cli createrawtransaction '[{"txid":"mytxid","vout":0}]' '{"myaddress":0.01}'

Sign a Raw Transaction

Sign a raw Bitcoin transaction using your wallet's private keys.

bitcoin-cli signrawtransactionwithwallet "myrawtransaction"

Send a Raw Transaction

Broadcast a signed raw transaction to the Bitcoin network.

bitcoin-cli sendrawtransaction "mysignedtransaction"

Inscription Command Generator

Main Fields

These fields are necessary to create a basic inscription.




Optional Fields

These fields provide additional options for creating inscriptions.
















                    

                

Step-by-Step Guide to Setting Up a Bitcoin Node and Ordinals Indexer

Step 1: Install Linux

First, install a Linux distribution of your choice. Ubuntu is recommended for its ease of use and extensive documentation.

Create a Bootable USB

Use a tool like Rufus to create a bootable USB drive with Ubuntu.

1. Download the latest Ubuntu ISO.
2. Use Rufus to create a bootable USB.
3. Boot your PC from the USB and follow the on-screen instructions to install Linux.

Step 2: Set Up Bitcoin Core

After installing Linux, the next step is to install Bitcoin Core.

Install Bitcoin Core

Follow these commands to install Bitcoin Core and start syncing the blockchain:

sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt update
sudo apt install bitcoind

Start Bitcoin Core

Start the Bitcoin Core daemon and begin syncing:

bitcoind -daemon

To check the sync progress, use this command:

bitcoin-cli getblockchaininfo

Step 3: Install Rust and Ordinals Indexer

Next, you need to install Rust to build and run the Ordinals indexer.

Install Rust

Run the following command to install Rust:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env

Install Dependencies

Install the necessary dependencies:

sudo apt install build-essential pkg-config libssl-dev

Step 4: Install and Build Ordinals Indexer

Clone the Ordinals Repository

Clone the ordinals repository and build the project:

git clone https://github.com/casey/ord.git
cd ord
cargo build --release

Install the Ordinals Binary

Install the `ord` binary to your system's PATH:

sudo install -m 0755 target/release/ord /usr/local/bin/

Step 5: Start Indexing with Ord

Now, you can start indexing the Bitcoin blockchain for Ordinals:

Start the Ordinals Indexer

Run the following command to start indexing:

ord index update

Check the indexing progress with:

ord index info

Step 6: Using Ord

Once indexing is complete, you can use ord commands to manage inscriptions.

Create an Inscription

To create an inscription, use the following command:

ord wallet inscribe --fee-rate FEE_RATE --file PATH_TO_FILE