Anyone Docs
  • 🔷The Documentation For Anyone
    • About
    • FAQ
  • 🔷Relay Setup
    • Get Started
    • Relay Operator Standards
    • Installation and Usage
      • Virtualization on Windows
      • Virtualization on macOS
      • Install Ubuntu Server 24.04
      • Server management with SSH in Windows and macOS
      • Install Anon on Linux
      • Firewall and Network Configurations
        • Router Port Forwarding
        • Install and Configure Firewall
      • Troubleshooting Common Issues
        • Diagnosing CGNAT and Public IPv4
        • Confirm ORPort Reachability
        • Configure IPv4 and IPv6
      • Advanced Configuration
        • Install Anon using the apt repository
          • Binary Verification
        • Install Anon in Docker
        • Install Anyone Exit Relay
          • Exit Relay Guidelines
        • DoS mitigation parameters
        • Update Anon and accept terms and conditions
        • Configure SOCKS5 Proxy for Anyone
  • 🔷Hardware Setup
    • Setup Guide
    • Router Mode Setup
    • Description and Specifications
    • Relay Control Panel Pages
      • Home
      • Network Settings
      • Relay Settings
      • Relay Family
      • Proxy Settings BETA
      • Change Password
      • Logs
      • Update
    • Hardware Updates
      • System Update (USB)
      • System Update (WebUI)
      • Anon Update (WebUI)
    • Troubleshooting and additional configuration
      • Router Port Forwarding
      • Diagnosing CGNAT and Public IPv4
  • 🔷Security and Privacy
    • VPS Hardening
  • 🔷Rewards Dashboard
    • Registering to the Rewards Program
    • Accessing the Rewards Dashboard
    • Using the Rewards Dashboard
    • Rewards Status
  • 🔷Anyone SDK
    • NPM SDK
      • Install NPM Package
      • Run as Library
        • Anon
        • AnonSocksClient
        • AnonControlClient
      • Run from CLI
      • Tutorials
        • Hello Anon World I
        • Hello Anon World II
        • Circuit Control I
        • Circuit Control II
    • Native SDK
      • Anyone Client Releases
      • MAN - Anon Manual
      • Tutorials
        • Anyone Services I
        • Anyone Services II
    • iOS SDK [Beta]
      • Manual Install - CocoaPods
  • 🔷Connect to Anyone
    • Connecting to Linux
      • [Beta] One-Click Linux Setup
    • Connecting to macOS
      • macOS with NPM
      • [Beta] One-Click macOS Setup
    • Connecting to Windows
      • [Beta] One-Click Windows Setup
    • Individual Applications with Anyone
    • Connect Through Hardware
  • 🔷Tokenomics
    • Introduction
    • Token Distribution
      • Token Outflow
      • Other Tokens
      • Multichain
    • Relay Rewards
      • Lock Requirement
      • Lock Adjustments
      • Reward Multipliers
    • Additional Roles
      • Authorities and Staking
      • Governance Voting
    • Premium Circuits
      • Premium Circuits
      • Premium Circuits: Metrics
    • Summary
      • Value Accrual Summary
      • Rewards Case Study
    • Appendix
      • M Derivation
      • Risk Equation Derivation
  • 🔷Resources
    • Community and Customer Support
    • Links
    • Token
    • Whitepaper
    • Roadmap
    • API
      • REST
      • [Future] GraphQL
Powered by GitBook
  1. Relay Setup
  2. Installation and Usage
  3. Advanced Configuration

Install Anon in Docker

Docker Setup and Deployment

This instruction will guide you how to install a Relay in Docker for different Linux distributions. The instructions are applicable to both amd64 and arm64 architectures, including devices such as the Raspberry Pi.

The latest Docker image can be found here:

https://github.com/anyone-protocol/ator-protocol/pkgs/container/ator-protocol

From Anon version 0.4.9.7-live it is required to accept terms and conditions to run the client.

Step by step installation

Type all the commands in a terminal window. Each code block can be pasted in full.

1. Add Docker repository

sudo apt-get install ca-certificates curl gnupg -y 
sudo install -m 0755 -d /etc/apt/keyrings
. /etc/os-release
sudo curl -fsSL https://download.docker.com/linux/$ID/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
sudo echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/$ID \
  $(. /etc/os-release && sudo echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo dnf -y install dnf-plugins-core
sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo -y

2. Install the Docker packages

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
sudo systemctl enable --now docker

3. Prepare directories and fetch files

sudo mkdir /opt/compose-files/
sudo mkdir -p /opt/anon/etc/anon/
sudo mkdir -p /opt/anon/run/anon/
sudo mkdir -p /root/.nyx/
sudo chmod -R 700 /opt/anon/run/anon/
sudo chown -R 100:101 /opt/anon/run/anon/
sudo touch /opt/anon/etc/anon/notices.log
sudo chown 100:101 /opt/anon/etc/anon/notices.log
sudo useradd -M anond
sudo wget -O /opt/compose-files/relay.yaml https://raw.githubusercontent.com/anyone-protocol/anon-install/refs/heads/main/docker/anon-relay/relay.yaml
sudo wget -O /opt/anon/etc/anon/anonrc https://raw.githubusercontent.com/anyone-protocol/anon-install/refs/heads/main/docker/anon-relay/anonrc
sudo wget -O /root/.nyx/config https://raw.githubusercontent.com/anyone-protocol/anon-install/refs/heads/main/docker/anon-relay/config

4. Create and start the Docker container

sudo docker compose -f /opt/compose-files/relay.yaml up -d

Done!


Commands for updating, testing and monitoring:

Edit relay configuration

sudo nano /opt/anon/etc/anon/anonrc

Update relay to run latest version

sudo docker container rm --force anon-relay
sudo docker pull svforte/anon:latest
sudo docker compose -f /opt/compose-files/relay.yaml up -d

Install Nyx monitor

sudo apt-get install nyx
sudo dnf install nyx

Monitor relay with Nyx

sudo nyx -s /opt/anon/run/anon/control

Check status for containers

sudo docker ps

Start, stop and restart the relay container

sudo docker start anon-relay
sudo docker restart anon-relay
sudo docker stop anon-relay

Check systemctl logs for anon service

sudo docker logs anon-relay

Monitor anon log

sudo tail -f /opt/anon/etc/anon/notices.log

Remove the relay container

sudo docker rm anon-relay --force

Last updated 8 months ago

🔷