Home Install Torq Install Torq with Podman

Install Torq with Podman

Last updated on Jan 19, 2024

Torq is just a simple binary, which means it can be run using Podman just like any other container solution. We also have a container on docker hub at lncapital/torq:latest.

Note: Only run with host network when your server has a firewall and doesn't automatically open all port to the internet. You don't want the database to be accessible from the internet!

Torq only requires a Postgres data base with the TimescaleDB plugin. Use this command to run the database via host network:

podman run -d --name torqdb --network=host -v torq_db:/var/lib/postgresql/data -e POSTGRES_PASSWORD="<YourPostgresPasswordHere>" timescale/timescaledb:latest-pg14

Then create your TOML configuration file and store it in ~/.torq/torq.conf (or another location you choose, but remember to change the location of the config variable bellow).

# Name of the database
#name = "torq"
# Name of the postgres user with access to the database
#user = "postgres"
# Password used to access the database
password = "runningtorq"
# Port of the database
#port = "5432"
# Host of the database
host = "<YourDatabaseHost>"

# Password used to access the API and frontend
password = "<YourUIPassword>"
# Network interface to serve the HTTP API"
#network-interface = ""
# Port to serve the HTTP API
port = "<YourPort>"
# Specify different debug levels (panic|fatal|error|warn|info|debug|trace)
#debuglevel = "info"

# Mempool custom URL (no trailing slash)
#mempool.url = "https://mempool.space"

You can see the full configuration options here: https://github.com/lncapital/torq/blob/main/docker/example-torq.conf

Then you can run Torq via host network like this:

podman run -d --name torq --network=host -v ~/.torq/torq.conf:/home/torq/torq.conf lncapital/torq:latest --config=/home/torq/torq.conf start

You should now be able to see the Torq frontend running on port 8080.

Bitcoin Network: Be aware that when you try Torq on testnet, simnet or some other type of network that you must use the network switch when trying to browse the web interface. The network switch is the globe icon in the top left corner, next to the Torq logo.