Self Hosting logo

Self Hosting

OrganizationPopular
live-codes
self-hosting

Deploy LiveCodes to static servers, GitHub Pages, or Docker. Configure SDK appUrl, BASE_URL for subdirectories, and handle share/broadcast services. Load this skill when self-hosting LiveCodes or using a custom app URL.

Overview

Publisherlive-codes
Repositorylivecodes
Skill nameself-hosting
Stars
1.5K
Forks
271
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by live-codes on GitHub. Read the source before you install it.

Installation

Install the Self Hosting AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/live-codes/livecodes/tree/develop/.agents/skills/livecodes/self-hosting
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/live-codes/livecodes.git /tmp/livecodes
mkdir -p .claude/skills
cp -r /tmp/livecodes/.agents/skills/livecodes/self-hosting .claude/skills/self-hosting
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Self Hosting in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Self Hosting on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Self Hosting is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

This skill requires sdk-embedding. Read it first for foundational concepts.

LiveCodes — Self-Host LiveCodes

LiveCodes runs entirely client-side. Host it on any static file server or CDN.

Deployment Options

Download Release

  1. Download from GitHub releases
  2. Extract the build folder
  3. Serve from any static host
bash
# Files to serve
build/
├── index.html
├── livecodes/
│   ├── assets/
│   └── ...
└── docs/ (optional)

Build from Source

bash
git clone https://github.com/live-codes/livecodes.git
cd livecodes
npm install
npm run build      # Build to build/ directory
npm run serve      # Local preview at http://localhost:8080
npm run deploy      # Build + deploy to GitHub Pages

GitHub Pages (Built-in)

bash
# Setup
npm install
npm run deploy      # Deploys to gh-pages branch

Configure CNAME file for custom domain if needed.

Docker

bash
docker-compose up -d

Docker setup includes:

  • HTTPS with auto-certificates
  • Share service (short URLs)
  • Broadcast server
  • Open Graph meta tags
  • Custom 404 page
yaml
# docker-compose.yml
# See: docs/docs/advanced/docker.mdx for customization

Other Static Hosts

  • Cloudflare Pages: Connect repo, npm run build, serve build/
  • Netlify: Connect repo, npm run build, serve build/
  • Firebase Hosting: firebase init hosting, deploy build/

Configure SDK for Self-Hosted App

javascript
import { createPlayground } from 'livecodes';

createPlayground('#container', {
  appUrl: 'https://playground.example.com',
  template: 'react',
});

The appUrl tells the SDK where to load the playground iframe from.

Custom Build

Subdirectory Hosting

By default, LiveCodes expects to be at the root of a domain. For subdirectories:

bash
# Host at https://example.com/playground/
npx cross-env BASE_URL="/playground/" npm run build

This sets <base href="/playground/"> and adjusts all asset paths.

Skip Building Docs

To link documentation to livecodes.io instead of building locally:

bash
npx cross-env DOCS_BASE_URL=null npm run build:app

Docs links will point to https://livecodes.io/docs/ instead of local docs.

Services

Self-hosted apps use fallback services:

ServiceDefault HostedSelf-Hosted
Share (short URLs)dpaste.com (365 days)dpaste.com or Docker setup
BroadcastLiveCodes serverDocker setup required
GitHub IntegrationLiveCodes OAuthYour GitHub App

Docker for Full Services

Docker setup provides all services:

bash
docker-compose up -d
# Serves at https://livecodes.localhost

See docs/docs/advanced/docker.mdx for configuration.

Permanent URL for Stable Embeds

Use versioned URLs to prevent breaking changes:

javascript
// Version-specific URL (never changes)
createPlayground('#container', {
  appUrl: 'https://v48.livecodes.io',
  template: 'react',
});

// Pin SDK version
import { createPlayground } from 'livecodes@0.13.0';
// or
import { createPlayground } from 'https://cdn.jsdelivr.net/npm/livecodes@0.13.0';

Permanent URLs format: https://v{VERSION}.livecodes.io

Common Mistakes

MEDIUM Not configuring BASE_URL for subdirectories

Wrong:

bash
# Build default, serve at /playground/
npm run build
# Results in broken asset paths

Correct:

bash
# Set BASE_URL for subdirectory
npx cross-env BASE_URL="/playground/" npm run build

Without BASE_URL, the app expects to be at root (/) and asset paths will be wrong.

Source: docs/docs/features/self-hosting.mdx — Custom Build section

MEDIUM Self-hosted share URLs expire

javascript
// dpaste.com deletes share URLs after 365 days
// For permanent self-hosted share:
// 1. Use Docker setup for own share service
// 2. Or use permanent URL pattern for embeds

The default dpaste.com service deletes shared URLs after one year. For permanent sharing, use Docker setup with your own share service.

Source: docs/docs/features/self-hosting.mdx — Services section

Examples

GitHub Pages

bash
# Fork live-codes/livecodes
# Enable GitHub Pages in repo settings
npm install
npm run deploy

# Access at https://your-username.github.io/livecodes/

Cloudflare Pages

bash
# Build command: npm run build:app
# Output directory: build
# Environment: NODE_VERSION=18

# Access at https://your-subdomain.pages.dev/

Docker VPS

bash
git clone https://github.com/live-codes/livecodes.git
cd livecodes
docker-compose up -d

# Access at https://livecodes.localhost
# Configure domain in docker-compose.yml

Frequently asked questions

What does the Self Hosting AI skill do?

Deploy LiveCodes to static servers, GitHub Pages, or Docker. Configure SDK appUrl, BASE_URL for subdirectories, and handle share/broadcast services. Load this skill when self-hosting LiveCodes or using a custom app URL.

Why use Self Hosting on TypingMind?

Because you install it once and use it with any model. Self Hosting is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Self Hosting in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/live-codes/livecodes/tree/develop/.agents/skills/livecodes/self-hosting. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Self Hosting?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Self Hosting?

As many as you like. As long as a model supports skills, you can use Self Hosting with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Self Hosting AI skill free?

Yes. It is published on GitHub by live-codes under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇