How to Use Vultr’s Supabase Marketplace Application.

Updated on February 21, 2025
How to Use Vultr’s Supabase Marketplace Application. header image

Supabase is an open-source Backend-as-a-Service (BaaS) platform that simplifies backend development with a scalable architecture. It is built on top of PostgreSQL and provides an ecosystem of tools and features to streamline backend management while reducing complexity. Its architecture is designed to scale from small projects to enterprise applications, ensuring seamless growth without major reconfigurations.

Follow this guide to use Vultr’s Supabase Marketplace Application. You will deploy a Supabase marketplace application on Vultr and explore its dashboard.

Deploy the Vultr Marketplace Application for Supabase

Deploying Supabase on Vultr allows you to leverage a fully managed backend with PostgreSQL, authentication, buckets for storage, and serverless functions. Using the Vultr Marketplace, you can quickly deploy a Supabase instance and start building applications without complex configurations. Follow the steps below to Deploy Supabase.

  1. Log in to your Vultr Customer Portal.

  2. Navigate to the Products section, select Compute, and then click Deploy Server.

    Vultr Compute

  3. Choose Dedicated CPU as the server type.

    Deploy a Vultr Server

  4. Select a server location closest to your target audience from Vultr’s 32 global locations.

    Server Location

  5. Select a server plan that meets your application requirements.

    Server Plan

  6. Click the Configure button to proceed.

    Configure Server

  7. Under Marketplace Apps, search for Supabase and select it as the Marketplace Application.

    Vultr Marketplace Application

  8. Add any additional features as required.

    Additional Features

  9. Review your configurations and click the Deploy button to start deployment.

    Deploy Supabase Marketplace

  10. After the deployment is completed, go to the Compute section under Products to view your Supabase instance.

    View Deployed Instance

  11. Click the server to view its details and scroll down to the app instructions section.

    App Instructions

    The app instructions section provides essential details for your Supabase Marketplace application.

Supabase Core Features and Benefits

Supabase provides a range of services to streamline backend development. The following are the core features and benefits of Supabase.

  1. Database Management: Supabase offers a fully managed PostgreSQL database with SQL query support, advanced indexing a built-in query editor, and schema visualization tools.

  2. Authentication: Secure user authentication with support for email/password, OAuth providers, and third-party authentication integrations.

  3. Real-time Capabilities: Supabase offers real-time data synchronization using PostgreSQL's replication engine.

  4. Storage: Provides scalable file storage with secure access and seamless integration into applications.

  5. API Auto-generation: Automatically generates RESTful APIs for all database tables and views. This saves time by using APIs that are instantly ready for CRUD (Create, Read, Update, Delete) operations.

  6. GraphQL Support: Supabase supports GraphQL for flexible and efficient queries of complex data structures.

Configure Supabase

After deploying Supabase on Vultr, you must configure essential settings to secure and optimize your instance. This includes updating API keys to enhance security and ensure proper authentication for database access. Supabase generates default keys during deployment, but regenerating them prevents potential security risks.

Update Supabase API Keys

Supabase generates a JWT Secret during deployment, which you can use to regenerate the Anon and Service Role API keys. These keys authenticate your requests to Supabase and provide secure access to your database. You need to regenerate the keys to ensure security and proper authentication, as the default keys can become outdated or compromised. Follow the steps below to update your API Keys.

  1. SSH into your Supabase instance and create a new directory. Replace supabase-project with your preferred name.

    console
    # mkdir supabase-project
    
  2. Navigate to the supabase-project directory.

    console
    # cd supabase-project
    
  3. Update the server's APT package index.

    console
    # apt update
    
  4. Install the Node Package Manager (NPM).

    console
    # apt install npm
    
  5. Install jsonwebtoken.

    console
    # npm install jsonwebtoken
    
  6. Retrieve the Supabase JWT Secret from the App Instructions section in the Vultr Customer Portal.

    Supabase JWT Secret

  7. Create a JavaScript file using a text editor such as nano.

    console
    # nano generate_keys.js
    
  8. Add the following javascript code to the generate_keys.js file. Replace your_jwt_secret with the Supabase JWT secret you have copied.

    javascript
    const jwt = require('jsonwebtoken');
    
    // Replace with the JWT you copied
    const SUPABASE_JWT_SECRET = "your_jwt_secret";  
    
    const payloadAnon = {
      role: "anon",
      iss: "supabase",
      iat: Math.floor(Date.now() / 1000),
      exp: Math.floor(Date.now() / 1000) + 60 * 60 * 24 * 365 
    };
    
    const payloadServiceRole = {
      role: "service_role",
      iss: "supabase",
      iat: Math.floor(Date.now() / 1000),
      exp: Math.floor(Date.now() / 1000) + 60 * 60 * 24 * 365 
    };
    
    // Generate tokens
    const anonKey = jwt.sign(payloadAnon, SUPABASE_JWT_SECRET, { algorithm: "HS256" });
    const serviceRoleKey = jwt.sign(payloadServiceRole, SUPABASE_JWT_SECRET, { algorithm: "HS256" });
    
    
    console.log("ANON_KEY=", anonKey);
    console.log("SERVICE_ROLE_KEY=", serviceRoleKey);
    
  9. Execute the javascript using node.

    console
    # node generate_keys.js
    

    Your output should be similar to the one below:

    ANON_KEY= eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlzcyI6InN1cGFiYXNlIiwiaWF0IjoxNzM5MzE2OTE1LCJleHAiOjE3NzA4NTI5MTV9._paR1mPwH0v_Z87hoLtxXNxL9DDPXq02qP52EnbEJkc
    SERVICE_ROLE_KEY= eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoic2VydmljZV9yb2xlIiwiaXNzIjoic3VwYWJhc2UiLCJpYXQiOjE3MzkzMTY5MTUsImV4cCI6MTc3MDg1MjkxNX0.cr0G2uCroQt0FQs-vvLreU3oHWzVij4Cc5NbKFZQuSc
  10. To update the API keys, navigate to the Supabase docker directory.

    console
    # cd /home/supabase/supabase/docker/
    
  11. Open the .env file with a text editor such as nano.

    console
    # nano .env
    
  12. Find and replace the following keys with the newly generated keys.

    ANON_KEY="your_new_anon_key"
    SERVICE_ROLE_KEY="your_new_service_role_key"

    Save and close the file.

  13. To apply the changes, you have to remove and recreate the Supabase containers.

    1. Remove the Supabase containers.

      console
      # docker compose down
      
    2. Recreate the Supabase containers.

      console
      # docker compose up -d
      

Optional: Access Supabase PostgreSQL Database

When you deploy Supabase Marketplace Application on Vultr, a default PostgreSQL database is automatically created. This database serves as the backend for your application, handling data storage, authentication, and queries. You can find the PostgreSQL login credentials in the App Instructions section of your Vultr instance and use them to connect directly to the database.

  1. Navigate to the App Instructions section of your Supabase instance, and note the PostgreSQL database login credentials.

    Postgres Login Credentials

  2. Connect to the PostgreSQL database using the following PostgreSQL connection string format.

    postgres://<user>.<pooler_tenant_id>:<password>@<host>:<port>/<database>

    Replace the placeholders with your credentials:

    • user: Your PostgreSQL database user
    • pooler_tenant_id: Your tenant ID (found in your Supabase .env file)
    • password: Your PostgreSQL database password
    • host: Your Supabase instance IP address
    • port: Default PostgreSQL port, 5432
    • database: Default database, postgres
    Note
    The pooler tenant ID is required for authentication when connecting to a Supabase database deployed via Docker, including the Vultr Marketplace version. Without it, authentication will fail.
  3. To find or update your pooler tenant ID, navigate to your Supabase docker directory:

    console
    # cd /home/supabase/supabase/docker/
    
  4. Open the .env file.

    console
    # nano .env
    
  5. Look for the POOLER_TENANT_ID variable and update it with your preferred ID.

    POOLER_TENANT_ID=your-tenant-id
  6. To apply the changes, you need to remove and recreate the Supabase containers.

    1. Remove the Supabase containers.

      console
      # docker compose down
      
    2. Recreate the Supabase containers.

      console
      # docker compose up -d
      

    You can use this connection string in database clients like pgAdmin, DBeaver, or directly in your application.

Explore Supabase Dashboard

This section guides you through the Supabase dashboard and its key features. You will manage your database, tables, run SQL queries, create storage buckets, and set up user authentication.

  1. Open a browser tab and enter http://<ip-address>:8000. Replace <ip-address> with your Supabase instance's IP address.

  2. Enter the username and password from the App Instructions to log in to the Supabase Admin dashboard.

    Login

  3. After logging in, the Supabase dashboard displays.

    Supabase Admin Dashboard

Manage the Database

  1. Navigate to the Database section in the side menu and click Tables.

  2. Click New Table to create a new table.

    New Table

  3. Enter a name and description for the table.

    Create Table

  4. Click Add Column, and specify the name, datatype, and constraints.

    Add Column

    Click Save to create the table.

Run SQL Queries

  1. Supabase allows you to run SQL queries via the dashboard. To insert values into the created table, navigate to the SQL Editor section in the side menu.

  2. In the SQL Editor, enter the following query and click Run.

    sql
    INSERT INTO vultr_table (name, phone_no)  
    VALUES ('John Doe', '1234567890');
    

    SQL-Query.png

    Output:

    Success. No rows returned

Manage Storage

  1. To manage your files, navigate to the Storage section in the side menu.

  2. Click New Bucket to create a new storage bucket.

    New Bucket

  3. Enter a Bucket Name, configure access permissions, and set a file size limit. Click Save.

    Bucket creation interface

  4. Upload a file.

    Failed-To-Upload-File.png

    If the upload fails with "Failed to upload 1 file!" update the configuration to resolve the issue:

    1. Access your server and navigate to your Supabase docker directory.

      console
      # cd /home/supabase/supabase/docker/
      
    2. Open the .env file

      console
      # nano .env
      
    3. Look for the SUPABASE_PUBLIC_URL variable and update it with your Supabase instance public IP:

      console
      SUPABASE_PUBLIC_URL=http://<ip-address>:8000
      

      Replace <ip-address> with your actual public IP.

    4. To apply the changes, you need to remove and recreate the Supabase containers.

      1. Remove the Supabase containers.

        console
        # docker compose down
        
      2. Recreate the Supabase containers.

        console
        # docker compose up -d
        
    5. Try uploading the file again.

      Uploaded-File-Successfully.png

Configure Authentication

  1. Supabase allows you to create and manage users for authentication and access control. To add a new user, navigate to the Authentication section in the side menu.

    Authentication

  2. Click Add User, then Create New User.

  3. Enter an email address and password, then click Create User.

    Create new user

    Your user will be created.

Conclusion

You have deployed Vultr's Supabase Marketplace Application and explored its core features such as database management, storage, and authentication. You can save setup time and focus on actual application development using multiple Supabase features on your server.