Hi, I'm using Signoz v.0.93 on ECS in AWS. I would...
# support
k
Hi, I'm using Signoz v.0.93 on ECS in AWS. I would like to replace the SQLite DB from ephemeral storage with something different. Can I use PostgreSQL DB for the backend?
v
Yes
k
but in open source version is also supported?
v
Yes
k
Oh, cool 🙂 do you have some documentation for that how it should be setuped?
v
All you need is:
Copy code
SIGNOZ_SQLSTORE_PROVIDER: postgres
SIGNOZ_SQLSTORE_POSTGRES_DSN: <postgres://signoz:your_password@postgres:5432/signoz?sslmode=disable>
k
cool, thanks, I will check! 🙂
Hi, I created postgres 15 instance and I added these 2 parameters, but in logs I have:
Copy code
025-09-15T08:05:16.315Z
{
  "timestamp": "2025-09-15T08:05:16.315119835Z",
  "level": "INFO",
  "code": {
    "function": "<http://github.com/SigNoz/signoz/pkg/sqlstore/sqlitesqlstore.New|github.com/SigNoz/signoz/pkg/sqlstore/sqlitesqlstore.New>",
    "file": "/home/runner/work/signoz/signoz/pkg/sqlstore/sqlitesqlstore/provider.go",
    "line": 44
  },
  "msg": "connected to sqlite",
  "logger": "<http://github.com/SigNoz/signoz/pkg/sqlitesqlstore|github.com/SigNoz/signoz/pkg/sqlitesqlstore>",
  "path": "/var/lib/signoz/signoz.db"

2025-09-15T08:05:16.323Z
{
  "timestamp": "2025-09-15T08:05:16.322935195Z",
  "level": "INFO",
  "code": {
    "function": "<http://github.com/SigNoz/signoz/pkg/sqlmigrator.(*migrator).Migrate|github.com/SigNoz/signoz/pkg/sqlmigrator.(*migrator).Migrate>",
    "file": "/home/runner/work/signoz/signoz/pkg/sqlmigrator/migrator.go",
    "line": 43
  },
  "msg": "starting sqlstore migrations",
  "logger": "<http://github.com/SigNoz/signoz/pkg/sqlmigrator|github.com/SigNoz/signoz/pkg/sqlmigrator>",
  "dialect": "sqlite"
}

2025-09-15T08:05:16.323Z
{
  "timestamp": "2025-09-15T08:05:16.323248382Z",
  "level": "ERROR",
  "code": {
    "function": "main.runServer",
    "file": "/home/runner/work/signoz/signoz/cmd/enterprise/server.go",
    "line": 89
  },
  "msg": "failed to create signoz",
  "error": "unable to open database file: no such file or directory"
it looks like by default still tryign to connect to sql lite, but I removed:
Copy code
# {
    #  name = "SIGNOZ_SQLSTORE_SQLITE_PATH"
    #  value = "/var/lib/signoz/signoz.db"
    # },
     

   mountPoints = [
    {
     sourceVolume = "signoz-config"
     containerPath = "/root/config"
    }
    # ,
    # {
    #  sourceVolume = "signoz-sqlite"
    #  containerPath = "/var/lib/signoz"
    # }
   ]
these varbiales from task definition (ECS). (e
v
Can you dump your env once here?
From the task definitions?
k
Copy code
environment = [
        {
          name  = "SIGNOZ_ALERTMANAGER_PROVIDER"
          value = "signoz"
        },
        {
          name  = "SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN"
          value = "<tcp://clickhouse.xxx.global.yyy.cloud:9000>"
        },
        # {
        #   name  = "SIGNOZ_SQLSTORE_SQLITE_PATH"
        #   value = "/var/lib/signoz/signoz.db"
        # },
        {
          name  = "STORAGE"
          value = "clickhouse"
        },
        {
          name  = "TELEMETRY_ENABLED"
          value = "true"
        },
        {
          name  = "SIGNOZ_JWT_SECRET"
          value = "secret"
        },

        ## Signoz Emailing configuration

        {
          name  = "SIGNOZ_EMAILING_ENABLED"
          value = "true"
        },
        {
          name  = "SIGNOZ_EMAILING_SMTP_ADDRESS"
          value = "smtp.domena.tools:25"
        },
        {
          name  = "SIGNOZ_EMAILING_SMTP_TLS_ENABLED"
          value = "false"
        },
        {
          name  = "SIGNOZ_EMAILING_SMTP_FROM"
          value = "signoz@domena.com"
        },

        ## Alert manager configuration

        {
          name  = "SIGNOZ_ALERTMANAGER_SIGNOZ_GLOBAL_SMTP__REQUIRE__TLS"
          value = "false"
        },
        {
          name  = "SIGNOZ_ALERTMANAGER_SIGNOZ_GLOBAL_SMTP__SMARTHOST"
          value = "smtp.domena.tools:25"
        },
        {
          name  = "SIGNOZ_ALERTMANAGER_SIGNOZ_GLOBAL_SMTP__TLS__CONFIG_INSECURE__SKIP__VERIFY"
          value = "true"
        },
        {
          name  = "SIGNOZ_ALERTMANAGER_SIGNOZ_GLOBAL_SMTP__FROM"
          value = "signoz@domena.com"
        },

        ## Configuration for SQL Store 
        {
          name  = "SIGNOZ_SQLSTORE_DRIVER"
          value = "postgres"
        }
        ,
        {
          name  = "SIGNOZ_SQLSTORE_POSTGRES_DSN"
          value = "<postgres://user:password@signoz-db.xxxx.eu-west-1.rds.amazonaws.com:5432/signoz?sslmode=disable>"
        }
      ]
v
Its not DRIVER
Its PROVIDER
Let me know how it works out
k
It's better. Now I have:
Copy code
server error: FATAL: no pg_hba.conf entry for host \"10.x.x.x\", user \"user\", database \"signoz\", no encryption (SQLSTATE 28000)
It's working now! 🙂
Copy code
sslmode=require
i had to midify this part 🙂
thanks ! 🙂
v
🔥 Nice!
k
I have one more question 🙂 I have successfully configured postgres db, but I wanted to modify some parameters in table alertmanager_config.
Copy code
select * FROM alertmanager_config

update alertmanager_config 
set config = replace(config, '"smtp_require_tls":true', '"smtp_require_tls":false');
we reported some time ago problem with that, that even if we have:
Copy code
{
          name  = "SIGNOZ_ALERTMANAGER_SIGNOZ_GLOBAL_SMTP__REQUIRE__TLS"
          value = "false"
        },
in global configuration by default is overrited. So as a workarround we wanted to replace this configuration in postgres db. But after every restart signoz it's overrited by some migration scripts probably. Do you know how we can modify this table in postgres to have these changes permanently?
v
Right, that is a problem. Please upvote: https://github.com/SigNoz/signoz/issues/8478