AR.IO LogoAR.IO Documentation

Installation & Setup

Learn About AR.IO Gateways

New to AR.IO gateways? Learn more about what they are and how they work at AR.IO Gateways.

Get your AR.IO gateway running in 30 seconds with Docker. No configuration needed - just run and test.

Quickstart

# Start AR.IO gateway with Docker
docker run -p 4000:4000 ghcr.io/ar-io/ar-io-core:latest

Test it's working:

# Fetch a test transaction
curl localhost:4000/4jBV3ofWh41KhuTs2pFvj-KBZWUkbrbCYlJH0vLA6LM

# Expected output: test

That's it! Your gateway is now serving Arweave data at localhost:4000.

Production Setup with Custom Domain

Ready to run a gateway with your own domain name and SSL certificates? Follow these comprehensive steps:

System Requirements

Minimum requirements:

  • 4 core CPU
  • 4 GB RAM
  • 500 GB storage (SSD recommended)
  • Stable 50 Mbps internet connection

Recommended:

  • 12 core CPU
  • 32 GB RAM
  • 2 TB SSD storage
  • Stable 1 Gbps internet connection

External storage devices should be formatted as ext4.

Install Required Packages

Quick install all packages:

sudo apt update -y && sudo apt upgrade -y && sudo apt install -y curl openssh-server git certbot nginx sqlite3 build-essential && sudo systemctl enable ssh && curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash && source ~/.bashrc && sudo ufw allow 22 80 443 && sudo ufw enable

Install Docker:

# Add Docker's official GPG key
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update

# Install Docker
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Install Node.js and Yarn:

nvm install 20.11.1 && nvm use 20.11.1 && npm install -g yarn@1.22.22

Install the Node

Clone the repository:

git clone -b main https://github.com/ar-io/ar-io-node
cd ar-io-node

Note: Your indexing databases will be created in the project directory unless otherwise specified in your .env file, not your Docker environment. So, if you are using an external hard drive, you should install the node directly to that external drive.

Create environment file:

nano .env

Add configuration:

GRAPHQL_HOST=arweave.net
GRAPHQL_PORT=443
START_HEIGHT=1000000
RUN_OBSERVER=true
ARNS_ROOT_HOST=<your-domain>
AR_IO_WALLET=<your-public-wallet-address>
OBSERVER_WALLET=<hot-wallet-public-address>

Supply Observer Wallet Keyfile: Save your wallet keyfile as <Observer-Wallet-Address>.json in the wallets directory.

Payment For Observer Report Uploads

By default, the Observer will use Turbo Credits to pay for uploading reports to Arweave. This allows reports under 100kb to be uploaded for free, but larger reports will fail if the Observer wallet does not contain Credits. Including REPORT_DATA_SINK=arweave in your .env file will configure the Observer to use AR tokens instead of Turbo Credits, without any free limit.

Start the Docker container:

sudo docker compose up -d

Set Up Networking

Register a Domain Name: Choose a domain registrar (e.g., Namecheap) to register a domain name.

Point Domain at Your Home Network:

  • Get your public IP address: curl ifconfig.me
  • Create A records for your domain and wildcard subdomains (*.yourdomain.com)

Set up Port Forwarding:

  • Get local IP: ip addr show | grep -w inet | awk '{print $2}' | awk -F'/' '{print $1}'
  • Configure router to forward ports 80 and 443 to your local machine

Create SSL Certificates:

sudo certbot certonly --manual --preferred-challenges dns -d <your-domain>.com -d '*.<your-domain>.com'

Email Notifications

Previous versions of these instructions advised providing an email address to Certbot. As of June 2025, LetsEncrypt (the certificate authority used by Certbot) no longer supports email notifications.

Important: Wild card subdomain (*.<your-domain>.com) cannot auto renew without obtaining an API key from your domain registrar. Not all registrars offer this. Certbot certificates expire every 90 days. Be sure to consult with your chosen registrar to see if they offer an API for this purpose, or run the above command again to renew your certificates.

Configure nginx

Open nginx configuration:

sudo nano /etc/nginx/sites-available/default

Replace with this configuration:

# Force redirects from HTTP to HTTPS
server {
    listen 80;
    listen [::]:80;
    server_name <your-domain>.com *.<your-domain>.com;

    location / {
        return 301 https://$host$request_uri;
    }
}

# Forward traffic to your node and provide SSL certificates
server {
    listen 443 ssl;
    listen [::]:443 ssl;
    server_name <your-domain>.com *.<your-domain>.com;

    ssl_certificate /etc/letsencrypt/live/<your-domain>.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/<your-domain>.com/privkey.pem;

    location / {
        proxy_pass http://localhost:3000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_http_version 1.1;

        # Forward AR.IO headers if present in the request
        proxy_set_header X-AR-IO-Origin $http_x_ar_io_origin;
        proxy_set_header X-AR-IO-Origin-Node-Release $http_x_ar_io_origin_node_release;
        proxy_set_header X-AR-IO-Hops $http_x_ar_io_hops;
    }
}

Test and restart nginx:

sudo nginx -t
sudo service nginx restart

Note: Previous versions of these instructions advised checking a gateway's ability to fetch content using localhost. Subsequent security updates prevent this without first unsetting ARNS_ROOT_HOST in your .env.

Test Your Gateway

Verify it's working:

curl https://<your-domain>/3lyxgbgEvqNSvJrTX2J7CfRychUD5KClFhhVLyTPNCQ

Expected output:

1984

If you see 1984, your gateway is working perfectly!

System Requirements

Minimum requirements:

  • 4 core CPU
  • 4 GB RAM
  • 500 GB storage (SSD recommended)
  • Stable 50 Mbps internet connection

Recommended:

  • 12 core CPU
  • 32 GB RAM
  • 2 TB SSD storage
  • Stable 1 Gbps internet connection

External storage devices should be formatted as ext4.

Install Required Software

Install Docker Desktop:

  • Download from Docker Desktop for Windows
  • Run installer and follow prompts
  • Select WSL (Windows Subsystem for Linux) during installation
  • Restart your PC
  • Update WSL:
    wsl --update
    wsl --shutdown
  • Restart Docker Desktop

Install Git:

Clone the Repository

Open Command Prompt:

  • Press Windows Key + R
  • Type cmd and press Enter

Navigate to desired directory:

cd Documents

Clone the repository:

git clone -b main https://github.com/ar-io/ar-io-node

Note: Your database will be created in the project directory, not Docker. If using an external hard drive, install directly to that drive.

Create Environment File

Open a text editor (e.g., Notepad):

  • Press Windows Key and search for "Notepad"

Create .env file with this content:

GRAPHQL_HOST=arweave.net
GRAPHQL_PORT=443
START_HEIGHT=0
RUN_OBSERVER=true
ARNS_ROOT_HOST=<your-domain>
AR_IO_WALLET=<your-public-wallet-address>
OBSERVER_WALLET=<hot-wallet-public-address>

Save as .env (select "All Files" as file type)

Supply Observer Wallet Keyfile: Save your wallet keyfile as <Observer-Wallet-Address>.json in the wallets directory.

Start Docker Containers

Navigate to project directory:

cd Documents\ar-io-node

Start the container:

docker compose up -d

Explanation of flags:

  • up: Start the Docker containers
  • -d: Run containers as background processes (detached mode)

Shutdown command:

docker compose down

Set Up Router Port Forwarding

Obtain a Domain Name: Choose a domain registrar (e.g., Namecheap) and purchase a domain name.

Point Domain at Your Home Network:

  • Visit https://www.whatsmyip.org/ to get your public IP address
  • Access your domain registrar's settings
  • Create A records for your domain and wildcard subdomains (*.yourdomain.com)

Get Local IP Address:

ipconfig

Look for IPv4 Address (format: 192.168.X.X or 10.X.X.X)

Set Up Router Port Forwarding:

  • Access router settings (usually 192.168.0.1)
  • Navigate to port forwarding settings
  • Forward ports 80 and 443 to your local machine's IP address

Install and Configure NGINX Docker

Clone NGINX Docker repository:

cd Documents
git clone -b main https://github.com/bobinstein/dockerized-nginx

Follow the repository instructions for setting up NGINX Docker.

Important: When configuring your nginx setup, ensure that your nginx configuration includes the following AR.IO headers in the proxy configuration:

# Forward AR.IO headers if present in the request
proxy_set_header X-AR-IO-Origin $http_x_ar_io_origin;
proxy_set_header X-AR-IO-Origin-Node-Release $http_x_ar_io_origin_node_release;
proxy_set_header X-AR-IO-Hops $http_x_ar_io_hops;

These headers are essential for proper AR.IO network functionality.

Test Your Gateway

Verify it's working: Visit https://<your-domain>/3lyxgbgEvqNSvJrTX2J7CfRychUD5KClFhhVLyTPNCQ in your browser.

Expected output:

1984

If you see 1984, your gateway is working perfectly!

Useful Docker Commands

Monitor and manage your AR.IO gateway with these commands:

# View all running services
docker ps

# Run services in background daemon
docker compose up -d

# Turn off all services
docker compose down

# Pull latest images
docker compose pull

# Follow the logs of the core service
docker compose logs core -f -n 10

# Follow the logs of the observer
docker compose logs core observer -f -n 10

What's Next?

Your gateway is running! Now you can:

Need more context? Learn What is an AR.IO Gateway to understand the full capabilities.

How is this guide?