{"slug":"static-sites-quickstart","title":"Static Sites quick start","description":"Deploy a static website on DanubeData in under 5 minutes. This guide walks you through building a simple site and deploying it step by step.","section":"Features","url":"https://docs.danubedata.ro/static-sites-quickstart","markdown_url":"https://docs.danubedata.ro/static-sites-quickstart.md","breadcrumbs":[{"title":"Features","slug":null},{"title":"Static Sites","slug":"static-sites"},{"title":"Quick Start","slug":"static-sites-quickstart"}],"headings":[{"level":1,"title":"Static Sites quick start","id":"static-sites-quick-start"},{"level":2,"title":"Prerequisites","id":"prerequisites"},{"level":2,"title":"What you will build","id":"what-you-will-build"},{"level":2,"title":"Step 1: Create your website files","id":"step-1-create-your-website-files"},{"level":2,"title":"Step 2: Package your site as a ZIP file","id":"step-2-package-your-site-as-a-zip-file"},{"level":2,"title":"Step 3: Create a static site in the dashboard","id":"step-3-create-a-static-site-in-the-dashboard"},{"level":2,"title":"Step 4: Upload your ZIP file","id":"step-4-upload-your-zip-file"},{"level":2,"title":"Step 5: Wait for deployment","id":"step-5-wait-for-deployment"},{"level":2,"title":"Step 6: Visit your site","id":"step-6-visit-your-site"},{"level":2,"title":"Step 7: Update your site","id":"step-7-update-your-site"},{"level":2,"title":"Next steps","id":"next-steps"},{"level":3,"title":"Add a custom domain","id":"add-a-custom-domain"},{"level":3,"title":"Switch to Git deployment","id":"switch-to-git-deployment"},{"level":3,"title":"Deploy from CI/CD","id":"deploy-from-cicd"},{"level":3,"title":"Enable password protection","id":"enable-password-protection"},{"level":3,"title":"Roll back to a previous version","id":"roll-back-to-a-previous-version"},{"level":2,"title":"Quick reference","id":"quick-reference"},{"level":2,"title":"Troubleshooting","id":"troubleshooting"},{"level":3,"title":"Build failed","id":"build-failed"},{"level":3,"title":"Site shows \"404 Not Found\"","id":"site-shows-404-not-found"},{"level":3,"title":"Custom domain not working","id":"custom-domain-not-working"},{"level":3,"title":"Git webhook not triggering builds","id":"git-webhook-not-triggering-builds"},{"level":2,"title":"Related guides","id":"related-guides"}],"format":"markdown","word_count":1140,"content":"# Static Sites quick start\n\nDeploy a static website on DanubeData in under 5 minutes. This guide walks you through building a simple site and deploying it step by step.\n\n## Prerequisites\n\n- A DanubeData account ([sign up at danubedata.ro](https://danubedata.ro))\n\n## What you will build\n\nA personal portfolio page with your name, a short bio, and links — hosted at `https://your-slug.pages.danubedata.ro` with automatic HTTPS.\n\n## Step 1: Create your website files\n\nCreate a folder on your computer called `my-site` with a single `index.html` file:\n\n```html\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  <title>Jane Doe — Developer</title>\n  <style>\n    * { margin: 0; padding: 0; box-sizing: border-box; }\n    body {\n      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;\n      background: #0f172a;\n      color: #e2e8f0;\n      min-height: 100vh;\n      display: flex;\n      align-items: center;\n      justify-content: center;\n    }\n    .card {\n      text-align: center;\n      max-width: 480px;\n      padding: 3rem 2rem;\n    }\n    h1 { font-size: 2rem; margin-bottom: 0.5rem; color: #f8fafc; }\n    .subtitle { color: #94a3b8; margin-bottom: 1.5rem; }\n    p { line-height: 1.7; color: #cbd5e1; margin-bottom: 2rem; }\n    .links { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }\n    .links a {\n      color: #38bdf8;\n      text-decoration: none;\n      padding: 0.5rem 1.25rem;\n      border: 1px solid #38bdf8;\n      border-radius: 6px;\n      transition: all 0.2s;\n    }\n    .links a:hover { background: #38bdf8; color: #0f172a; }\n  </style>\n</head>\n<body>\n  <div class=\"card\">\n    <h1>Jane Doe</h1>\n    <div class=\"subtitle\">Full-Stack Developer</div>\n    <p>I build web applications with modern tools.\n       Currently exploring cloud infrastructure and open source.</p>\n    <div class=\"links\">\n      <a href=\"https://github.com/janedoe\">GitHub</a>\n      <a href=\"https://linkedin.com/in/janedoe\">LinkedIn</a>\n      <a href=\"mailto:jane@example.com\">Email</a>\n    </div>\n  </div>\n</body>\n</html>\n```\n\nOpen `index.html` in your browser to preview it locally.\n\n> **Tip:** You can also use an AI assistant like Claude or ChatGPT to generate your site. See the [Build with AI](https://docs.danubedata.ro/static-sites-ai) guide for prompts and examples.\n\n## Step 2: Package your site as a ZIP file\n\nSelect all files inside your `my-site` folder and compress them into a ZIP file.\n\n**macOS:**\n```bash\ncd my-site\nzip -r ../my-site.zip .\n```\n\n**Windows:**\nRight-click the files inside the folder > **Send to** > **Compressed (zipped) folder**.\n\n**Linux:**\n```bash\ncd my-site\nzip -r ../my-site.zip .\n```\n\nImportant: the `index.html` must be at the **root** of the ZIP, not nested inside a subfolder.\n\n## Step 3: Create a static site in the dashboard\n\n1. Log in to the DanubeData dashboard\n2. Click **Static Sites** in the sidebar\n3. Click **Create Static Site**\n4. Fill in the form:\n   - **Site name** — `my-portfolio` (or any name you like)\n   - **Slug** — auto-generated from the name; this becomes your URL\n   - **Description** — optional\n5. Choose a plan:\n\n| Plan | Storage | Bandwidth | Sites | Custom domains | Price |\n|------|---------|-----------|-------|----------------|-------|\n| **Free** | 100 MB | 10 GB | 2 | 2 | EUR 0.00/mo |\n| **Starter** | 500 MB | 100 GB | 10 | 10 per site | EUR 2.99/mo |\n| **Pro** | 2 GB | 500 GB | 50 | 50 per site | EUR 9.99/mo |\n\n6. Select **ZIP Upload** as the deployment method\n7. Click **Create Static Site**\n\n## Step 4: Upload your ZIP file\n\n1. On the site detail page, click the **Upload** button\n2. Select your `my-site.zip` file\n3. The upload starts and a build is triggered automatically\n\n## Step 5: Wait for deployment\n\nWatch the status on the dashboard — it updates in real time:\n\n1. **Pending** — Build queued\n2. **Building** — Your site is being built\n3. **Deploying** — Rolling out your site\n4. **Active** — Your site is live\n\nMost builds complete in 1-2 minutes.\n\n## Step 6: Visit your site\n\nOnce the status shows **Active**, click the URL on the site detail page:\n\n```\nhttps://{your-slug}.pages.danubedata.ro\n```\n\nYour site is now live with automatic HTTPS.\n\n## Step 7: Update your site\n\nTo deploy a new version:\n\n1. Edit your local files\n2. Create a new ZIP file\n3. On the site detail page, click **Upload** and select the new ZIP\n4. The previous version stays live until the new build succeeds\n\n## Next steps\n\nNow that your site is deployed, here are some things you can do:\n\n### Add a custom domain\n\nPoint your own domain (e.g., `www.janedoe.com`) to your static site with automatic TLS:\n\n1. Go to the site detail page > **Domains** tab\n2. Click **Add Domain** and enter your domain\n3. Add the DNS TXT record shown in the dashboard for verification\n4. After verification, add a CNAME record pointing to `{slug}.pages.danubedata.ro`\n5. A TLS certificate is provisioned automatically\n\nSee the [Custom Domains guide](https://docs.danubedata.ro/static-sites-domains) for detailed DNS instructions.\n\n### Switch to Git deployment\n\nFor continuous deployment from GitHub, GitLab, or Bitbucket:\n\n1. Push your site files to a Git repository\n2. Edit your static site in the dashboard\n3. Change the deployment method to **Git Repository**\n4. Enter your repository URL, branch, and publish directory\n5. Set up a webhook for automatic deploys on push\n\nSee the [Git Deployments guide](https://docs.danubedata.ro/static-sites-git) for step-by-step webhook setup.\n\n### Deploy from CI/CD\n\nUse the API to deploy from any CI/CD pipeline:\n\n```bash\n# Create a tarball of your site files\ntar -czf site.tar.gz -C ./dist .\n\n# Deploy via API\ncurl -X POST \\\n  -H \"Authorization: Bearer YOUR_API_TOKEN\" \\\n  -F \"file=@site.tar.gz\" \\\n  https://api.danubedata.ro/api/v1/static-sites/{site-id}/deploy\n```\n\n### Enable password protection\n\nRestrict access to your site (useful for staging or client previews):\n\n1. Go to the site detail page > **Edit**\n2. Enable **Password Protection**\n3. Enter a username and password\n4. Click **Save**\n\n### Roll back to a previous version\n\nIf something goes wrong after a deploy:\n\n1. Go to the site detail page > **Deployments** tab\n2. Find the version you want to restore\n3. Click **Activate**\n\nRollbacks are instant — no rebuild required.\n\n## Quick reference\n\n| Operation | How |\n|-----------|-----|\n| Upload new version | Site detail page > **Upload** > select ZIP file |\n| Trigger rebuild | Site detail page > **Redeploy** |\n| View build logs | Site detail page > click on a build entry |\n| Roll back | **Deployments** tab > **Activate** on a previous deployment |\n| Add custom domain | **Domains** tab > **Add Domain** |\n| Enable password protection | **Edit** > toggle **Password Protection** |\n| Delete site | Site detail page > **Delete** |\n\n## Troubleshooting\n\n### Build failed\n\n- Check the build logs on the site detail page for error details\n- Ensure your ZIP file contains valid static files (HTML, CSS, JS)\n- Verify the ZIP is not corrupted and is within your plan's upload limit (100 MB on Free, 500 MB on Starter and Pro)\n- Make sure `index.html` is at the root level of the ZIP, not in a subfolder\n\n### Site shows \"404 Not Found\"\n\n- Ensure your site has an `index.html` file at the root of the publish directory\n- For SPAs, verify that the publish directory setting matches your build output folder\n\n### Custom domain not working\n\n- Verify the DNS TXT record is in place and verification status shows **Verified**\n- Ensure you have added a CNAME record pointing to `{slug}.pages.danubedata.ro`\n- DNS changes may take up to 24 hours to propagate, though most take only minutes\n\n### Git webhook not triggering builds\n\n- Verify the webhook URL and secret match what is shown in the dashboard\n- Check that the webhook is configured for push events\n- Ensure **Auto-deploy on push** is enabled in the site settings\n\n## Related guides\n\n- [Build with AI](https://docs.danubedata.ro/static-sites-ai) — Use Claude, ChatGPT, or other AI assistants to generate your website\n- [Static Sites product documentation](https://docs.danubedata.ro/static-sites) — Full feature reference\n- [Custom Domains](https://docs.danubedata.ro/static-sites-domains) — DNS verification and TLS setup\n- [Git Deployments](https://docs.danubedata.ro/static-sites-git) — Webhooks and auto-deploy\n\n---\n\n**Questions?** Contact support at support@danubedata.ro\n","prev":{"title":"Static Sites","slug":"static-sites","url":"https://docs.danubedata.ro/static-sites","markdown_url":"https://docs.danubedata.ro/static-sites.md","json_url":"https://docs.danubedata.ro/static-sites.json"},"next":{"title":"Build with AI","slug":"static-sites-ai","url":"https://docs.danubedata.ro/static-sites-ai","markdown_url":"https://docs.danubedata.ro/static-sites-ai.md","json_url":"https://docs.danubedata.ro/static-sites-ai.json"},"index_url":"https://docs.danubedata.ro/index.json"}