# Satellite does not respect database URL?

**URL:** <https://forum.storj.io/t/satellite-does-not-respect-database-url/4605>\
**Category:** Developer Discussions\
**Tags:** docker\
**Created:** [February 12, 2020, 10:45pm UTC](https://forum.storj.io/t/satellite-does-not-respect-database-url/4605 "2020-02-12T22:45:58Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Derkades](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/derkades/32/64_2.png) [@Derkades](https://forum.storj.io/u/Derkades)\
**Post date:** [February 12, 2020, 10:45pm UTC](https://forum.storj.io/t/satellite-does-not-respect-database-url/4605/1 "2020-02-12T22:45:58Z")

</div>

I have the docker services `storj_postgres` and `storj_satellite` in my compose file. For the satellite, the `STORJ_DATABASE` env is set to ‘postgres://postgres:passwordhere@storj\_postgres/satellite?sslmode=disable’. Usually that connects to the `storj_postgres` service container, but for some reason the satellite seems to connect to localhost:

```auto
storj_satellite_1 | 2020-02-12T22:39:15.444Z	INFO	Configuration loaded from: /root/.local/share/storj/satellite/config.yaml
storj_satellite_1 | 2020-02-12T22:39:15.457Z	DEBUG	db	Connected to:	{"db source": "postgres://postgres:2aiFrcrwPweAoxrL947iqoYrTbqDV3yLU6br4dSmpz7@storj_postgres/satellite?sslmode=disable&application_name=Satellite"}
storj_satellite_1 | 2020-02-12T22:39:15.459Z	DEBUG	Unrecoverable error	{"error": "Error creating revocation database: dial tcp 127.0.0.1:5432: connect: connection refused", "errorVerbose": "Error creating revocation database: dial tcp 127.0.0.1:5432: connect: connection refused\n\tmain.cmdRun:214\n\tstorj.io/storj/pkg/process.cleanup.func1.2:307\n\tstorj.io/storj/pkg/process.cleanup.func1:325\n\tgithub.com/spf13/cobra.(*Command).execute:826\n\tgithub.com/spf13/cobra.(*Command).ExecuteC:914\n\tgithub.com/spf13/cobra.(*Command).Execute:864\n\tstorj.io/storj/pkg/process.ExecWithCustomConfig:84\n\tstorj.io/storj/pkg/process.ExecCustomDebug:66\n\tmain.main:455\n\truntime.main:203"}
storj_satellite_1 | Error: Error creating revocation database: dial tcp 127.0.0.1:5432: connect: connection refused

```

Why does this happen? Is this a bug?

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [February 12, 2020, 11:52pm UTC](https://forum.storj.io/t/satellite-does-not-respect-database-url/4605/2 "2020-02-12T23:52:53Z")

</div>

Environment variables usually handled in the entrypoint script. Do you have one in your image?

---

<div class="post-metadata">

**Author:** ![Derkades](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/derkades/32/64_2.png) [@Derkades](https://forum.storj.io/u/Derkades)\
**Post date:** [February 12, 2020, 11:56pm UTC](https://forum.storj.io/t/satellite-does-not-respect-database-url/4605/3 "2020-02-12T23:56:22Z")

</div>

I am using storjlabs/satellite version 0.33.2 with pretty much the same setup as in the docker compose file on the GitHub repo. I can try editing the configuration file instead.

---

<div class="post-metadata">

**Author:** ![heunland](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/heunland/32/6076_2.png) [@heunland](https://forum.storj.io/u/heunland)\
**Post date:** [February 13, 2020, 1:40am UTC](https://forum.storj.io/t/satellite-does-not-respect-database-url/4605/4 "2020-02-13T01:40:26Z")

</div>

Afaik this versions has not yet been released or deployed. The current release is 0.31.12

---

<div class="post-metadata">

**Author:** ![Derkades](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/derkades/32/64_2.png) [@Derkades](https://forum.storj.io/u/Derkades)\
**Post date:** [February 13, 2020, 1:24pm UTC](https://forum.storj.io/t/satellite-does-not-respect-database-url/4605/5 "2020-02-13T13:24:06Z")

</div>

The config.yaml file contains the correct postgres address, so it seems that the environment variables are applied correctly. I’ll try the current version.

EDIT: 0.31.12 has the same issue.

---

<div class="post-metadata">

**Author:** ![Derkades](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/derkades/32/64_2.png) [@Derkades](https://forum.storj.io/u/Derkades)\
**Post date:** [February 14, 2020, 10:24pm UTC](https://forum.storj.io/t/satellite-does-not-respect-database-url/4605/6 "2020-02-14T22:24:42Z")

</div>

It does seem like a bug. Does anyone know what I am doing wrong here?

---

<div class="post-metadata">

**Author:** ![Derkades](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/derkades/32/64_2.png) [@Derkades](https://forum.storj.io/u/Derkades)\
**Post date:** [February 19, 2020, 9:32pm UTC](https://forum.storj.io/t/satellite-does-not-respect-database-url/4605/7 "2020-02-19T21:32:03Z")

</div>

Further discussion here: [https://github.com/storj/storj/issues/3782](https://github.com/storj/storj/issues/3782)
