Getting Started
hostedat is a self-hosted static site hosting platform. Upload a zip of your built frontend and it's live at a subdomain — like Cloudflare Pages, but on your own server.
How it works
The platform has two binaries:
- hostedat-server — the hosting server that serves sites, manages users, and handles HTTPS
- hostedat — the CLI client for deploying sites from your terminal or CI/CD
Install the CLI
Download the latest binary for your platform from the downloads page, or use curl:
# Linux (amd64)
curl -fsSL https://docs.hostedat.ditto.moe/downloads/hostedat-linux-amd64 -o hostedat
chmod +x hostedat
sudo mv hostedat /usr/local/bin/
# macOS (universal binary)
curl -fsSL https://docs.hostedat.ditto.moe/downloads/hostedat-darwin-universal -o hostedat
chmod +x hostedat
sudo mv hostedat /usr/local/bin/ Verify the installation:
hostedat version Authenticate
The CLI authenticates via your browser. Run login and a browser window will open for you to sign in.
An API key is generated and saved to ~/.hostedat/config.json.
hostedat login You can also pass credentials directly:
# Via flags
hostedat --server https://hostedat.ditto.moe --api-key hd_... sites list
# Via environment variables
export HOSTEDAT_SERVER=https://hostedat.ditto.moe
export HOSTEDAT_API_KEY=hd_... Create a site
Create a new site to get a subdomain:
hostedat sites create my-portfolio
# Site created!
# ID: abc123
# Name: my-portfolio
# Subdomain: my-portfolio Want a custom subdomain? Use the --subdomain flag:
hostedat sites create "My Portfolio" --subdomain portfolio Deploy
Build your frontend, then deploy the output directory:
# Build your project
npm run build
# Deploy
hostedat deploy my-portfolio ./dist
# Deployed! Version: v1
# Live at https://my-portfolio.hostedat.ditto.moe Each deploy creates a new version. The latest version is served immediately.
CI/CD Integration
Add deploy to your CI pipeline. Set HOSTEDAT_API_KEY as a secret:
name: Deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci && npm run build
- run: |
curl -fsSL https://docs.hostedat.ditto.moe/downloads/hostedat-linux-amd64 -o hostedat
chmod +x hostedat
./hostedat deploy my-portfolio ./dist
env:
HOSTEDAT_API_KEY: ${{ secrets.HOSTEDAT_API_KEY }}
HOSTEDAT_SERVER: https://hostedat.ditto.moe Next: CLI Reference for all available commands.