Running
Once your Horizon database and Captive Core configuration is set up properly, you're ready to run Horizon. Run stellar-horizon
with the appropriate parameters set (or stellar-horizon-cmd serve
if you installed via the package manager, which will automatically import your configuration from /etc/default/stellar-horizon
), which starts the HTTP server and starts logging to standard out. When run, you should see output similar to:
- Example
INFO[...] Starting horizon on :8000 pid=29013
Note that the numbers may naturally be different for your installation. The log line above announces that Horizon is ready to serve client requests.
Next, you can confirm that Horizon is responding correctly by loading the root resource. In the example above, that URL would be http://127.0.0.1:8000/, and simply running curl http://127.0.0.1:8000/
would show you that the root resource loads correctly:
- JSON
{
"_links": {
"account": {
"href": "http://127.0.0.1:8000/accounts/{account_id}",
"templated": true
},
"accounts": {
"href": "http://127.0.0.1:8000/accounts{?signer,sponsor,asset,cursor,limit,order}",
"templated": true
}
}
// etc.
}