Metabase setup and login

Hi Team,

I am new to Metabase and yesterday i have installed in my local system. and i did setup the metabase using localhost:3000/setup url. after setup i have created few dashboards and reports as well and saved in my personal folder. what i noticed is after shuting down my laptop when again in the morning i am trying to usse metabase using localhost:3000 again its asking for setup.

so my question is if metabase shutdowns or server or system shutdowns then all the work and settings done so far in metabase will be gone? if, so then why it asks user name and password while setting up the metabase.

Also, 2nd time when i am trying to setup again it is not able to connect to SQL database. but yesterday it connected and i did some work also.

if this is the behavior of metabase then how can we make sure my work is saved and i can get my work again if server shutdowns or metabase shutdowns. and is there a way i can bypass the setup again and again and login to metabase using the username and password.

Any help on this much appriciated.

Hi @Sundas
Without knowing how you’re running Metabase, it’s hard to help, but make sure that you are not using H2 for the application database inside of a Docker container, which you then destroy, when you shutdown your laptop.
Read the documentation in details: https://www.metabase.com/docs/latest/operations-guide/installing-metabase.html

Thank you for replying. I am running metabase using metabase.jar file which downloaded from metabase site. Then using cmd running the command and starting metabase on windows 10.

Let me check the documentation also if you can suggest something.

@Sundas Either you need to point to the same H2 application database or even better, migrate to Postgres/MySQL instead:
https://www.metabase.com/docs/latest/operations-guide/configuring-application-database.html

thank you that helps. we will think about migrating the to Postgres or MySQL

@Sundas If you are going to run Metabase in production, then there’s nothing to think about, then it’s a requirement. The H2 database can become corrupted if you machine crashes.

thank you so much. i think same thing is happening in my local as well. so i did setup and connected my SQL database and when i shutdown my system and again turn on its not connecting to the same DB and throwing the same error. definitely we will migrate the data to Postgres or MySQL. one more thing can we connect to Aurora DB in AWS in production?

@Sundas No, you haven’t seen a corruption yet.

You are probably having problems with file permissions, so it’s writing the H2 to a temporary location or something like that.
Either use Postgres/MySQL or use Docker instead on Windows (if you know how to use Docker):
https://metabase.com/docs/latest/operations-guide/running-metabase-on-docker.html

Metabase supports the following databases:
https://www.metabase.com/docs/latest/faq/setup/which-databases-does-metabase-support.html

1 Like

thank you again.

I just want to mention, that I had the same problems some time ago.
It seems, that the file-permission was a problem and also the fact, that I created a link to the cmd-file and started via link.
The migration did help for me.
Here is a example from my migration (windows-server and H2 to postgresl via *.cmd-file, the savelog-file have to exist): This example can be done better, I’m sure. But it works for me and maybe it helps you.

Blockquote
set SAVELOG=D:\200_Logs\log_Metabase.txt
set MetabasePFAD=D:\400_Programme\Metabase
set H2PFAD=D:\400_Programme\Metabase\anfangsH2-DB\metabase.db
echo ***************************************************************** >> %SAVELOG%
echo %date% %time% %COMPUTERNAME% %0 : %WOCHENTAG% - Start metabase >> %SAVELOG%
set MB_DB_TYPE=postgres
set MB_DB_DBNAME=metabase
set MB_DB_PORT=5432
set MB_DB_USER=postgres
set MB_DB_PASS=[your password]
set MB_DB_HOST=localhost
java -jar %MetabasePFAD%\metabase.jar load-from-h2 %H2PFAD%
echo %date% %time% %COMPUTERNAME% %0 : %WOCHENTAG% - Fertig >> %SAVELOG%

Please remender to modify your metabase-start to log in in the new database!
For example:

Blockquote
set SAVELOG=D:\200_Logs\log_gesamt.txt
set MetabasePFAD=D:\400_Programme\Metabase
echo ***************************************************************** >> %SAVELOG%
echo %date% %time% %COMPUTERNAME% %0 : %WOCHENTAG% - Start Metabase >> %SAVELOG%
set MB_DB_TYPE=postgres
set MB_DB_DBNAME=metabase
set MB_DB_PORT=5432
set MB_DB_USER=postgres
set MB_DB_PASS=[your password]
set MB_DB_HOST=localhost
java -jar %MetabasePFAD%\metabase.jar
echo %date% %time% %COMPUTERNAME% %0 : %WOCHENTAG% - Fertig >> %SAVELOG%