Skip to content

Installation

Learn how to install nuxt-coolify in your Nuxt application.

bash
pnpm add nuxt-coolify
bash
npm install nuxt-coolify
bash
yarn add nuxt-coolify

INFO

The module is currently in alpha and only available over NPM/PNPM/Yarn.

Getting started

  1. You'll need to add nuxt-coolify to your modules.
ts
export default defineNuxtConfig({
  modules: ['nuxt-coolify'],
  
})
  1. Add the required Coolify environment variables in your .env file.
bash
NUXT_COOLIFY_INSTANCES_DEFAULT_BASE_URL=<your-coolify-url>
NUXT_COOLIFY_INSTANCES_DEFAULT_API_TOKEN=<your-coolify-api-token>
NUXT_COOLIFY_PROVIDERS_HETZNER_BASE_URL=<your-hetzner-api-url>
NUXT_COOLIFY_PROVIDERS_HETZNER_API_TOKEN=<your-hetzner-api-token>

Note: To get your Coolify API token, go to the API section in your Coolify Dashboard and create one there.

vue
<script setup>
const { data: instances, status: status, error: error, refresh: refreshInstanceList } = useFetch('/api/_v1/_coolify/instances')
</script>

<template>
  <div>
    <h2>Instances</h2>
    <div v-if="status === 'pending'">
      Loading Instances...
    </div>
    <div v-else-if="error">
      Error: {{ error.message }}
    </div>
    <div v-else>
      Instances: {{ instances }}
    </div>
  </div>
</template>