Chirpstack V4 container password

Hello everyone,

I have raised the Docker-Compose for Chirpstack V4, now I am trying to modify the chirpstack.toml file from the Chirpstack container terminal (network server) but not having permissions neither to install a text editor nor to overwrite the file I get it is impossible. So I would like to know what the password is.

Thanks for the attention.
All the best.

sounds more like a computer/server permission error.

if you’re using linux here are some things you can try…
add your user to the docker group…
make sure all the files etc are owned by your user and group
standard terminal editors are vi/vim and maybe nano depending on the distro you’re using.

Hello again,

I think that would not be the solution, if I’m not mistaken when you create a container it’s like you create a totally different partition from the server, therefore you don’t need to give server permissions to docker.
I’ll explain it again in case I haven’t made it very clear, I’m working on a docker container that was built with the Docker-Compose provided by Chirpstack V4. My goal is to create the PostgreSQL integration and for this I need to change the Chirpstack.toml document, so I get into the network server container but since I don’t have text editors installed I need to install them with permissions. My problem is that I don’t know the password to be able to become superuser. Could someone help me please?

Many thanks for everything.
All the best.

well thats not exactly the question you asked lol… but nevertheless…

this password is set in your main docker-compose file (this snippet is from gh)

    image: postgres:14-alpine
    restart: unless-stopped
      - ./configuration/postgresql/initdb:/docker-entrypoint-initdb.d
      - postgresqldata:/var/lib/postgresql/data

in this case your password is root to get into postgres… you need to exec interactively into the container.
here my chirpstack postgres container is called chirpstack-docker_postgres_1 you can use docker ps -a to find the name of yours if you do not know.

docker exec -it chirpstack-docker_postgres_1 /bin/bash

to get into the postgres db now you should have a shell in that container…

psql -U postgres

if it prompts you for the password enter it here now

now follow the steps to initialise the integration from the docs…

Hello again,

It’s not what I’m referring to either, sorry, that part I know how to do it.
As I have already said, specifically what I want is to modify the chirpstack.toml file that is located in the chirpstack-docker_master_chirpstack_1 container, but I do not have the necessary permissions to do so.

Thank you very much for the help.
All the best.

just edit the file on your regular host you run the container on, the container loads/maps the file on your host as the container config file. if you cannot edit it then we’ve circled back to the permissions problem.

Hello again,

Thank you very much for the quick answer. But do I have to edit it before launching the docker-compose or can I edit it once I have done it? I would be more interested in the second option.

All the best.

yes because you are mapping a volume… use-this-file-on-my-mahine:as-this-file-in-the-container

Hello again,

Many thanks for everything. I have managed to solve it by creating a new user with all permissions from outside the container, then I go inside as superuser and install some text editor. Finally, I edit the .toml file with the container running and restart all the containers.

All the best

this might “work”, but you will need to do this every time you rebuild or update the container. as containers are throw away commodities this is why you map volumes for configuration files and storage locations that you mount between container updates, rebuilds and or version changes.

see if you can find some resources on how to use docker/docker-compose there are some good ones out there.