Pixtopia

Run a Pixa
witness

A witness checks transactions and signs a block when its turn comes. Set up your server here, then register it from your wallet.

Start the guide
Five linked blocks holding pieces of pixel art
One block every three seconds

01 Choose a server

Start with a Pixa account you control. Sign in on your own computer and make sure you can approve an action with its active key. Keep a backup of your account keys somewhere you can reach if you lose that computer.

Rent a virtual private server (usually called a VPS). It stays on when you close your laptop. In your host’s “Create server” screen, choose these settings for a fresh machine dedicated to this witness.

Operating system
Ubuntu Server 24.04 LTS
Processor
2 virtual CPUs, Intel or AMD (x86-64 / amd64)
Memory and disk
4 GB RAM and 50 GB SSD or more
Network
A public IPv4 address and an always-on connection

Check the recurring price, storage and traffic allowance before ordering. You pay the host while the server exists. Witnesses earn rewards when scheduled to produce blocks. Registration alone guarantees neither turns nor enough income to cover the bill.

In the provider’s Firewall or Security group, allow incoming TCP 2001 from anywhere so Pixa peers can connect. Allow TCP 22 from your own IP for remote login. Leave other incoming ports closed, including 7777, the node’s private query port. Keep outgoing traffic enabled.

My host asks for an SSH key

This is the login key for your server. Open Terminal on macOS or Linux, or PowerShell on Windows. If you already have an SSH public key you use with this host, use that. To make one, run this on your own computer.

Your computer · create a login key
ssh-keygen -t ed25519

Press Enter for the suggested filename and choose a passphrase. If asked to overwrite an existing key, answer n to keep it. This next command shows the public half for the default filename.

Your computer · show the public key
cat ~/.ssh/id_ed25519.pub

Paste the whole line starting with ssh-ed25519 into the host’s SSH key box. The file with the .pub ending is the one you can share. The file beside it without that ending stays private.

02 Open the terminal

In your hosting dashboard, select the new server and open Console or Web terminal. Log in with the Ubuntu username your host supplied. If the dashboard gives you an SSH command instead, copy that exact command into Terminal or PowerShell on your computer. It will look like ssh ubuntu@203.0.113.10 with your server’s address.

At the first SSH connection, compare the displayed host fingerprint with the one from your provider before accepting it. If you type a password and nothing appears, that is normal. Press Enter when you finish.

Once connected, paste this command and press Enter. It opens an administrator shell so you can install software. Use it again whenever you reconnect. If your host logged you in as root, you already have that shell.

Server · switch to administrator
sudo -i
Server · check the machine
. /etc/os-release
echo "$PRETTY_NAME"
uname -m
whoami

Continue when you see Ubuntu 24.04, x86_64 and root. All the remaining command boxes run in this server terminal. Paste one box at a time, press Enter and wait for the prompt to return. Stop at an error before pasting the next box.

03 Install the tools

Docker runs the Pixa software in a container. Compose starts that container with the right settings. Chrony keeps the clock accurate enough for a three-second block slot. This installs them from Ubuntu’s package archives and starts both services at boot.

Server · install and start services
apt-get update &&
apt-get install -y docker.io docker-compose-v2 chrony ca-certificates python3 curl unzip &&
systemctl enable --now docker chrony &&
docker compose version
Server · check the clock
chronyc waitsync 30 0.05 0 2 && chronyc tracking

Continue when Docker prints a Compose version and Chrony shows Leap status as Normal. The clock check allows up to a minute for the correction to fall below 0.05 seconds. If it times out, give it another minute and try again.

04 Create your signing key

Your server gets its own key just for witness work. Its private half signs blocks and can update your witness settings. Its public half starts with PIX and goes into the registration form. Your account’s active key stays in your personal wallet. Keep your owner key offline.

Copy the setup command below. At the prompt, type your existing public Pixa account name. It checks the name on Pixa, downloads the official witness configuration, and runs the node image’s key generator with networking off. It shows you the name and public key. Running it again shows the same key.

Server · prepare the witness files
Read the setup command
python3 - <<'PY'
import json
import os
import re
import subprocess
import tempfile
from pathlib import Path
from urllib.request import Request, urlopen

root = Path("/opt/pixa-witness")
if root.exists():
    saved = root / "public-key.txt"
    if saved.is_file():
        print(saved.read_text(), end="")
        raise SystemExit(0)
    raise SystemExit("This directory already exists. Leave its files in place and check your installation.")

print("Your public Pixa account name: ", end="", flush=True)
with open("/dev/tty") as terminal:
    name = terminal.readline().strip().removeprefix("@")
if not re.fullmatch(r"[a-z][a-z0-9.-]{2,15}", name):
    raise SystemExit("Check the spelling of your public account name and try again.")
query = {"jsonrpc": "2.0", "id": 1, "method": "condenser_api.get_accounts", "params": [[name]]}
request = Request("https://api.pixagram.com", json.dumps(query).encode(), {"Content-Type": "application/json"})
try:
    with urlopen(request, timeout=20) as reply:
        accounts = json.load(reply)["result"]
except (OSError, ValueError, KeyError):
    raise SystemExit("Could not check your account with Pixa. Check the connection and try again.") from None
if not accounts or accounts[0]["name"] != name:
    raise SystemExit("Pixa did not confirm that account. Check your name and try again.")

release = "704a68f8225ba768226dea3495095e9b9cc0bd1c"
source = "https://raw.githubusercontent.com/pixagram-blockchain/witness/" + release
image = "pixadock/pixagram:1.30.1@sha256:1f7d0ded67566af13aceb349ba0415c8b487cc96750aa7d54f7de2d28c023e0c"
os.umask(0o077)
with tempfile.TemporaryDirectory(dir="/opt") as temporary:
    work = Path(temporary) / "witness"
    data = work / "pixagram"
    data.mkdir(parents=True)
    try:
        with urlopen(source + "/docker-compose.yml", timeout=30) as reply:
            (work / "compose.yaml").write_bytes(reply.read())
        with urlopen(source + "/pixagram/config.ini", timeout=30) as reply:
            template = reply.read().decode()
    except OSError:
        raise SystemExit("Could not download the witness configuration. Check the connection and try again.") from None
    # Use this exact image for the node too. The optional upstream feed stays off.
    (work / "compose.override.yaml").write_text(
        f"services:\n  pixagram:\n    image: {image}\n  bigmac-feed:\n    profiles: [upstream-feed]\n"
    )
    (work / ".env").write_text("WITNESS_ACCOUNT=\nWITNESS_WIF=\n")
    subprocess.run(["docker", "pull", image], check=True)
    wallet = subprocess.run(
        ["docker", "run", "--rm", "-i", "--network", "none", "--log-driver", "none",
         "--entrypoint", "/home/hived/bin/cli_wallet", image, "--offline"],
        input="suggest_brain_key\n", text=True, stdout=subprocess.PIPE, check=True,
    )
    start = re.search(r'\{\s*"brain_priv_key"\s*:', wallet.stdout)
    if not start:
        raise SystemExit("The wallet did not return a key. Nothing was installed.")
    pair, _ = json.JSONDecoder().raw_decode(wallet.stdout[start.start():])
    public, private = pair["pub_key"], pair["wif_priv_key"]
    if not re.fullmatch(r"PIX[1-9A-HJ-NP-Za-km-z]{49,51}", public) or not re.fullmatch(r"5[1-9A-HJ-NP-Za-km-z]{50}", private):
        raise SystemExit("Unexpected key format. Nothing was installed.")
    (data / "config.ini").write_text(template + f'\nwitness = "{name}"\nprivate-key = {private}\n')
    (work / "feed-key.json").write_text(json.dumps({"account": name, "publicKey": public, "privateKey": private}))
    display = f"Account: @{name}\nSigning public key:\n{public}\n"
    (work / "public-key.txt").write_text(display)
    work.rename(root)
print(display, end="")
PY

Continue when the account matches yours and a line beginning with PIX appears. Keep that public line handy. Your private files live under /opt/pixa-witness. Anyone with administrator access to this server can read them.

05 Catch up with Pixa

Start the node. It downloads and checks earlier blocks before it can sign a new one. This can take hours and continues if you close the terminal.

Server · start the node
cd /opt/pixa-witness &&
docker compose up -d pixagram &&
docker compose ps

The pixagram service should say Up or running. To watch it work, use the next command. Press Ctrl + C to return to the prompt. The node keeps running.

Server · follow the log
cd /opt/pixa-witness && docker compose logs --tail 15 -f pixagram

When you see entering live mode, check the newest block (the “head”). This compares your node with Pixa’s public node twice, six seconds apart. You can repeat it whenever you like.

Server · check whether it is ready
Read the sync check
cd /opt/pixa-witness && docker compose exec -T pixagram python3 - <<'PY'
import json
import time
from datetime import datetime, timezone
from urllib.request import Request, urlopen

def head(url):
    call = {"jsonrpc": "2.0", "id": 1, "method": "condenser_api.get_dynamic_global_properties", "params": []}
    request = Request(url, json.dumps(call).encode(), {"Content-Type": "application/json"})
    with urlopen(request, timeout=12) as reply:
        state = json.load(reply)["result"]
    return state["head_block_number"], datetime.fromisoformat(state["time"] + "+00:00")

previous = None
for sample in range(2):
    try:
        local, stamp = head("http://127.0.0.1:7777")
        network, _ = head("https://api.pixagram.com")
    except (OSError, ValueError, KeyError):
        raise SystemExit("Could not read both nodes. Check the log and try again later.") from None
    age = (datetime.now(timezone.utc) - stamp).total_seconds()
    print(f"Your block {local:,} | Network block {network:,} | Your block is {age:.0f}s old", flush=True)
    if sample == 0:
        previous = local
        time.sleep(6)
ready = local > previous and abs(network - local) <= 3 and -3 <= age <= 15
print("Ready to register." if ready else "Still catching up. Wait and run this check again.")
PY

Continue when the check prints Ready to register. If it says the node is catching up, leave it running. Stay on this step until it is following new blocks.

06 Register your witness

Switch to Pixtopia on your own computer. You’ll publicly associate your account with the server’s signing key. Give voters a link to a page or post that says who runs the witness and how to reach you.

Server · show your public details again
cat /opt/pixa-witness/public-key.txt
  1. Sign in as the account printed above. Open Witnesses and choose Become a witness under Your witness.
  2. Fill in Your witness page with your public HTTPS link. Paste the whole PIX… line into Signing public key.
  3. The remaining fields are votes on network settings. At the time of this guide the network medians are 20 PIXA for creating an account, 2097152 bytes for the largest block and 0 percent PXS interest. The account fee is a proposed network setting. You pay no registration fee.
  4. Choose Review, then Show exact transaction. Check the account, URL, full block_signing_key and settings in witness_update. When they match, approve with your active key in PIXA Keychain or Pixtopia’s wallet on your own device.

Check your registration in Witnesses → Your page. Compare its signing key with your server’s public key. “Running” means the account has an enabled key. Your Last block advances once you actually produce. An elected group of 20 and one rotating standby share the slots. Ask supporters to vote for your account when the node is ready.

07 Publish a price

Witnesses also report how many PIXA buy one PXS. PXS tracks the price of a US Big Mac. Each witness chooses a method and stands behind its price. Pixtopia’s publisher uses trades in the Pixa Markets pool. Read the calculation and inspect the publisher.

For a first manual update, open Witnesses → Publish a price, enter your rate in PIXA per 1 PXS, review it, then approve in your wallet. For regular hourly updates using the pool method, follow the commands below.

Set up the hourly price publisher

Begin after registration. This downloads the dated publisher, verifies the file, installs its pinned dependencies inside Node 24 and runs its tests. The publisher borrows only your dedicated witness key. Your account keys stay off the server.

Server · install and test the publisher
cd /opt/pixa-witness &&
release=pixa-witness-feed-2026-11-28 &&
curl -fLsS --retry 3 "https://pixtopia.net/witness-feed/$release.zip" -o "$release.zip" &&
echo "d0c008c4f461b329f9e774893b92ce0540ad9edaa2c5ac779f8c1ee71b289512  $release.zip" | sha256sum -c - &&
unzip -oq "$release.zip" &&
docker run --rm -v "$PWD/$release:/feed" -w /feed node:24-bookworm-slim sh -ec 'npm ci --ignore-scripts && node --test tests/feed-price.test.mjs'

Make a launcher and preview your first update. It checks that your key matches the registered public key and shows the exact exchange rate. Running the launcher by itself only previews.

Server · preview your own feed
cd /opt/pixa-witness && cat > price-feed <<'SH'
#!/bin/sh
set -eu
cd /opt/pixa-witness
exec /usr/bin/docker run --rm \
  -v "$PWD/pixa-witness-feed-2026-11-28:/feed:ro" -w /feed \
  -v "$PWD/feed-key.json:/run/witness-key.json:ro" \
  -e PIXA_MARKET_URL=https://pixa.markets \
  node:24-bookworm-slim node scripts/pixagram/price-feed.mjs \
  --signing-key /run/witness-key.json "$@"
SH
chmod 700 /opt/pixa-witness/price-feed && /opt/pixa-witness/price-feed

Check the proposed base of 1.000 PXS and the quote in PIXA. If the tests or preview failed, resolve the error before continuing. The next command is the point at which you authorize real, recurring on-chain price updates. It publishes once now, then hourly while the timer is enabled.

Server · publish now and every hour
cat > /etc/systemd/system/pixa-witness-feed.service <<'UNIT'
[Unit]
Description=Publish this Pixa witness price
After=docker.service network-online.target
Requires=docker.service
[Service]
Type=oneshot
ExecStart=/opt/pixa-witness/price-feed --broadcast
UNIT
cat > /etc/systemd/system/pixa-witness-feed.timer <<'UNIT'
[Unit]
Description=Update this witness price hourly
[Timer]
OnCalendar=hourly
Persistent=true
[Install]
WantedBy=timers.target
UNIT
systemctl daemon-reload &&
systemctl start pixa-witness-feed.service &&
systemctl enable --now pixa-witness-feed.timer &&
systemctl list-timers pixa-witness-feed.timer

Check the result under Price updated on your witness page. The timer should also show its next run. A feed older than seven days drops out of the network median.

Server · see the most recent feed result
journalctl -u pixa-witness-feed.service -n 12 --no-pager

08 Look after your witness

Bookmark your witness page. Check Last block, Blocks missed and Price updated regularly. A new standby may wait for its first turn. A rising missed count means the network scheduled you and did not receive your block in time.

Server · check health and free disk space
cd /opt/pixa-witness && docker compose ps
df -h /opt/pixa-witness
chronyc tracking

Keep enough free disk space for the chain to grow. Apply Ubuntu security updates, watch for new Pixa releases and follow their upgrade instructions before a scheduled hard fork (a change to the network rules). This guide pins version 1.30.1. Repeating its setup command preserves your key and does not upgrade the node. Official witness releases and upgrade notes ↗

Going offline or replacing a server

On your witness page choose Stop producing, review the change and sign with your active key. Wait until the page says Stopped and the current round has finished. This removes your public signing key from future schedules while preserving the account and its votes.

Server · stop an hourly feed you enabled
systemctl disable --now pixa-witness-feed.timer
Server · stop the node and keep its data
cd /opt/pixa-witness && docker compose stop -t 120 pixagram

To return on the same machine, repeat the start and sync checks, then restore its public key under Witnesses → Settings. For a lost or compromised machine, disable the old key from your wallet, build a replacement with a fresh signing key, and register that public key through Settings once it is synced. Run only one producer per signing key. Recheck the feed preview before enabling its timer again.

Keep an encrypted backup of the private configuration and your recovery keys somewhere you control. Never include config.ini, feed-key.json or wallet keys in a support message. If you retire the server permanently, cancel the hosting plan once the witness is stopped and you have what you need.

Troubleshooting

I can’t log in or paste into the terminal

Open the provider’s web console if SSH times out. Check the server address, login name and the incoming rule for TCP 22 from your current IP. Some consoles have a clipboard or “Paste text” menu. In a Linux terminal use Ctrl + Shift + V, in macOS use Command + V. If a Copy button is unavailable, expand the command, select its text and copy normally.

Docker or the clock check failed

Run the machine check in step 2. On fresh Ubuntu 24.04 the two Docker packages come from the universe archive. If apt cannot locate them, enable that archive in Ubuntu’s package sources and repeat step 3. For a clock timeout, run chronyc sources -v. A line marked ^* is the selected time source. Check that outbound UDP 123 is allowed, then run the clock check again.

The node is restarting or its block number has stopped

Run the log command in step 5 and check disk space in step 8. Check that TCP 2001 is reachable through the provider’s firewall and the server can reach api.pixagram.com:2001. During a first sync, the block number can be far behind and still rising. A node that is still catching up can stay online with its signing key unregistered.

I registered but haven’t produced a block

Compare the full public key in step 6 with your witness page, run the sync check again and look at your votes and missed count. If neither the last block nor the missed count has changed, you may still be waiting for a turn. If misses are increasing, check the clock and logs. Stop producing from your wallet if repairs will take time.

The price preview says the key doesn’t match

Compare the account and public key in public-key.txt with the ones on your witness page. A stopped witness has a disabled signing key. Restore the correct public key after the node is ready, wait for the change to appear on chain and preview again. Leave the hourly timer off until the preview succeeds.

Versions and network settings checked . Witness configuration ↗ · Pixa operator reference ↗ · Server requirements ↗