You build in Lovable, Cubli runs the app. GitHub sits in between: Lovable puts your code in a repository, and Cubli builds it on every push. You don’t need a Dockerfile. Cubli recognises a Lovable app and builds it as a server.
You need Standard or higher, because a Lovable app runs on a server. Static is only for sites made of files.
1. Connect Lovable to GitHub
- Open your project in Lovable and go to the project settings, under Git or GitHub. Lovable changes its menus often; the current steps are in Lovable’s GitHub guide.
- Choose Connect and give Lovable access to your GitHub account or organisation.
- Lovable creates a new repository and keeps it in sync both ways. You cannot pick an existing repository.
Only an owner or admin of the Lovable project can connect it. Your site on lovable.app does not change.
2. Connect the repo to Cubli
- Open your project in Cubli. In an empty project, choose GitHub repo.
- The first time, click Connect GitHub. In GitHub, give Cubli access to the repository Lovable just created, and come back.
- Find the repo. Not in the list? Click Give Cubli access in GitHub and add it there.
- Pick the Branch (usually
mainfor Lovable) and a Name for the app. - Click Deploy.
Cubli builds the latest commit and puts it live on a Cubli address. The first build usually takes a few minutes; the build log is in the Deploys tab.
Prefer your own computer: the CLI
This is another way instead of step 2. Choose it if you don’t want to deploy on every push, or don’t want to give Cubli access to GitHub. You get the code from the repository Lovable created (step 1) and put it live yourself from your computer. You need Node.js 20 or newer.
- Get your code and go to the folder.
git clone <your repository>
cd <your repository folder>
- Install the CLI and log in. Logging in happens in your browser.
npm install -g @cubli/cli
cubli login
- See what Cubli sees. This reads your folder and changes nothing. It shows what kind of app it is and which variables it needs.
cubli check
- Link the folder to your project.
cubli projectslists your projects with their id. If no service with that name exists yet, Cubli creates it.
cubli projects
cubli link --project <project-id> --service <name>
- Set your keys (see step 3) and check they are in. The
.envfile does not go to Cubli, so you set the values yourself. Do this before you go live:VITE_values go into the app when it is built.
cubli vars set VITE_SUPABASE_URL=<value> VITE_SUPABASE_PUBLISHABLE_KEY=<value>
cubli vars list
- Put your app live. Cubli builds it, shows the build log and gives you the address.
cubli up
Changed something in Lovable? Get the new code and put it live:
git pull
cubli up
Back to the previous version? Find the deploy and roll back to it. Nothing is built again.
cubli deployments
cubli rollback <id>
With the CLI, a change from Lovable only goes live when you run cubli up. Every command is in CLI commands.
3. Set your keys
Lovable apps usually talk to Supabase. Which values you set depends on your backend.
- Cubli fills in a few values itself from the public values in your repo:
SUPABASE_URLandSUPABASE_PUBLISHABLE_KEY. Check in the Variables tab that they point to the right Supabase project. - Values starting with
VITE_are baked into the app when it is built. Not in Variables? Add them. You find the names in the.envfile in your repo, such asVITE_SUPABASE_URL; the values come from your Supabase project. Then build again: Settings, Source, Deploy latest commit. SUPABASE_SERVICE_ROLE_KEY: if your app uses it on the server, Cubli warns you. Cubli never fills it in. With your own Supabase you find it in the Supabase dashboard; set it as a variable in Cubli, never in your code.
More in Variables and How Cubli builds your code.
4. Make sign-in work
Does your app sign people in through Supabase, with a magic link or Google for example? Add the new address as an allowed redirect URL. With your own Supabase you do that in the Supabase dashboard under Authentication, URL Configuration. Set the Site URL to your Cubli address there too, not just the redirect URLs. First the Cubli address, later your own domain.
If you use Lovable Cloud
With Lovable Cloud the backend stays at Lovable: the database, sign-in and edge functions keep running there. Your app on Cubli talks to it the same way your site on lovable.app does.
- You cannot get Lovable Cloud’s service key (
SUPABASE_SERVICE_ROLE_KEY). Code that needs it on the server does not work on Cubli. Cubli warns you when your app uses it. - Want everything in your own place? Move to your own Supabase. That means exporting and importing; Lovable explains it under Lovable Cloud.
- Put the values from
.envin Variables. The.envfile in your repository holds your backend’s address and public key, such asVITE_SUPABASE_URLandVITE_SUPABASE_PUBLISHABLE_KEY. Set each value twice in Variables: withVITE_in front and without (SUPABASE_URL,SUPABASE_PUBLISHABLE_KEY). The browser uses theVITE_version, the server the one without. Then build again. - Add your Cubli address as a redirect URL. With Lovable Cloud you do that in Lovable itself, in your project’s user settings. Put
/**after the address so every page is included. The menu changes often; the current steps are in Lovable’s guide to authentication. Skip this and the confirmation link after sign-up sends people to the wrong address. - The database can stop while your site keeps running. According to Lovable, the backend pauses when your credits run out, and after about 7 days without activity. Visitors to your site don’t wake it up. You do that in Lovable, with Wake up in your project. So keep an eye on your credits. See pausing and resuming at Lovable.
- Your data and its backups are at Lovable. According to Lovable, Lovable backs up the database every day and keeps the backups for about 14 days. See backups at Lovable. Cubli does not back up that database.
- Lovable and your live site share one database. According to Lovable, your project in Lovable and your published app use the same database. So whatever you change in the database in Lovable applies to your site on Cubli right away. Don’t remove or rename a column the live version still uses: the new code only arrives with the next deploy. Lovable refuses such changes by default, unless you allow them in a setting. See the database at Lovable.
Every change from Lovable
Lovable pushes your changes to GitHub, and Cubli builds every push. If you leave Deploy on every push on, every change from Lovable goes live. If a build fails, the previous version stays online.
Prefer to check first? Pick one of these:
- Turn off Deploy on every push in your app under Settings, Source. You then go live yourself with Deploy latest commit.
- Use staging: see Staging, promote and roll back.
Careful with staging: VITE_ values are inside the build itself. Promoting sends that same build to production. If staging and production point to different Supabase projects, don’t promote; build production again with Deploy latest commit.
Publishing in Lovable does not change your site on Cubli. Your site on lovable.app stays until you take it offline there.
Your own domain
Once your app works on its Cubli address, connect your domain. See Connect your own domain. Is your domain at Lovable now? Only remove it there once it works on Cubli.
Then add your domain as a redirect URL for sign-in too (step 4).
If something goes wrong
| What you see | What is going on |
|---|---|
| The error “Invalid API key” or status 401 from Supabase | A key in Variables is wrong: it belongs to another project, or it has a character too many or too few. Copy it again with the copy button in Supabase, paste it in Variables and click Save and Apply. |
The confirmation link goes to localhost or the wrong address |
The Site URL and redirect URLs don’t point to your Cubli address yet. See step 4. |
| “email rate limit exceeded” when signing up | Supabase’s built-in mail only sends a few emails an hour. For a real app, set up your own email sending (SMTP) in Supabase. |
| The page loads, but data is missing | Look at your app’s Logs and your browser’s console. Using Lovable Cloud? Check in Lovable that the backend isn’t paused. |
Thank you for your feedback.What was missing? Mail it to info@cubli.io
Read next
Stuck? Click Help in your dashboard, or mail info@cubli.io.





