Skip to content

Onionmine installation

System requirements

Installing Onionmine requires a GNU/Linux-like system and some knowledge of [command line][].

Downloading

Get Onionmine source code and it's submodules directly from the repository by either downloading/unpacking a release or clone using Git:

git clone --recursive https://gitlab.torproject.org/tpo/onion-services/onionmine.git

Running

Onionmine can run in some ways:

  1. As a local software: just install the system-wide dependencies and run Onionmine straight from the repository in your current system.
  2. As a containerized application: by using a container runtime such as Podman or Docker.

Running as a local software

System compatibility

Running Onionmine from source code is currently tested only on Debian GNU/Linux systems.

Onionmine requires some software to be already installed in the system. A basic dependency check can be invoked with

./onionmine check-dependencies

The following command installs the needed system-wide dependencies (requires sudo privileges):

./onionmine install-dependencies

You might run it on a dedicated environment, such as an Raspberry Pi mini-server or a dedicated virtual machine.

Finally, create and alias to run Onionmine from the cloned repository:

alias onionmine="`pwd`/onionmine"

If you want, adapt this this alias and add it in your command line profile, so this command become always available.

Now you should have a working Onionmine installation! Just type onionmine to run it:

onionmine

Running as a container

Container images for runtimes like Docker and Podman are available through Onionmine's container registry, an can be downloaded with a command like

docker pull containers.torproject.org/tpo/onion-services/onionmine/onionmine

Running Onionmine to generate a key is as simple as doing

mkdir pools
docker run --mount type=bind,src=pools,target=/app/onionmine/pools \
  onionmine generate test

Details in how this image is built are in Onionmine's Dockerfile.

Finally, let's make an alias to invoke Onionmine (if you're using Podman instead of Docker, change docker to podman in the following command):

alias onionmine="docker run -it --mount type=bind,src=`pwd`/pools,target=/app/onionmine/pools onionmine"

If you want, adapt this this alias and add it in your command line profile, so this command become always available.

Now you should have a working Onionmine installation! Just type onionmine to run it:

onionmine

Running as a container with Compose

Onionmine can also run as a container using either Podman Compose or Docker Compose (if you're using Podman instead of Docker, change docker-compose to podman-podman in the following command):

docker-compose up -d
docker-compose exec onionmine onionmine

Details on the Compose configuration are in the docker-compose.yml file.

Finally, let's make an alias to invoke Onionmine:

alias onionmine="cd `pwd` && docker-compose exec onionmine onionmine"

If you want, adapt this this alias and add it in your command line profile, so this command become always available.

Now you should have a working Onionmine installation! Just type onionmine to run it:

onionmine