Move / migrate nocodb to coolify

Hey NocoDB Community!

We’ve been running NocoDB on a server set up with auto-install, but now we’re switching to Coolify and want to get NocoDB running on it too. Anyone know the best way to move all our data over to the new server/installation?

Coolify has a NocoDB package, but we could also go the Docker Compose route if that’s easier.

Recreating everything manually would be a big task since we’ve got 30 tables with a lot of columns, and most of them are linked to each other. The scheme is in an own postgres database I created and connected during the initial setup.

Any help or advice would be awesome!

Cheers!

First up, we are not familiar with coolify.

Auto-upstall is just docker-compose behind the scenes. If you can take pg_dump from installed NocoDB postgres to coolify postgres with rest of the environment variables. It should work out of the box.

Below is answer from AI

Reasoned about migrating NocoDB to Coolify for 16 seconds

You can avoid having to rebuild your entire project manually by migrating your existing Postgres database. Since NocoDB stores its schema, tables, relationships, and other settings in the database you connected during setup, the easiest approach is to back up that database and then point your new NocoDB instance (whether running via Coolify’s package or a Docker Compose setup) to it.

Recommended Steps

  • Backup Your Current Database:
    Use a tool like pg_dump to export your Postgres database. This gives you a complete snapshot of your 30 tables, their columns, and the relationships between them.
  • Restore on the New Server:
    Set up a new Postgres instance (if needed) and restore your backup using psql or another restore tool. This ensures all your data and schema definitions are carried over intact.
  • Configure the New NocoDB Instance:
    In your new NocoDB installation, update the environment variables or configuration settings to point to the restored Postgres database. Make sure the NocoDB version is compatible with your previous one to avoid any potential issues.
  • Test Thoroughly:
    Before fully switching over, run the new setup in a staging environment to verify that all data, links, and relationships work as expected.

Hi Navi

Thank you! I did it more or less this way. For anyone doing the same here are some instructions / learnings:

Install nocodb on Coolify

  • I’ve installed nocodb using the template provided by Coolify.
  • In Coolify I then set the preferred domain to nocodb.mydomain.com
  • Set the persistent storage: Colume Name: nocodb-data (coolify automatically adds the container ID) with the destination path /usr/app/data/
  • Configured the DNS record to point to my server

Create the postgres database
Create a postgres DB with the Coolify template and imported the dump I’ve made from the original server. The commands looked somewhat like this

  • Create dump: docker exec -t nocodb-db-1 pg_dumpall -c -U postgres | gzip > dump_date +%Y-%m-%d"_"%H_%M_%S.sql.gz
  • Get the dump to my local computer using WinSCP
  • Import dump: via Coolify Web GUI → select database → Import backups → choose the dump and check “Backup includes all databases”
  • From docker.env on my old server copied the password and set it on the Coolify web GUI for the new database

Back to nocodb container
I’ve added the following environment variables:

  • NC_DB=pg://CONTAINERIDOFPOSTGRESDBINCOOLIFY:5432?d=nocodb&user=postgres&password=YOURPASSWORD
  • POSTGRES_DB=nocodb
  • POSTGRES_PASSWORD=YOURPASSWORD
  • POSTGRES_USER=postgres
  • Start container

Inside of nocodb
In integrations → Connections I have had a connection configured to postgres and needed tp update it to the new values