Openstatus www.openstatus.dev

add guide self-hosting (#1595)

* add guide self-hosting

* ci: apply automated fixes

* add image

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

authored by

Thibault Le Ouay
autofix-ci[bot]
and committed by
GitHub
2aa970b7 6ed72ad5

+113
+4
apps/docs/astro.config.mjs
··· 138 138 label: "How to deploy probes on Cloudflare Containers ", 139 139 slug: "guides/how-to-deploy-probes-cloudflare-containers", 140 140 }, 141 + { 142 + label: "How to self-host openstatus", 143 + slug: "guides/self-hosting-openstatus", 144 + }, 141 145 ], 142 146 }, 143 147 {
apps/docs/src/assets/guides/self-hosting-openstatus/local-openstatus.png

This is a binary file and will not be displayed.

+109
apps/docs/src/content/docs/guides/self-hosting-openstatus.mdx
··· 1 + --- 2 + title: How to self host openstatus 3 + description: Learn how to self host openstatus in your own infra. 4 + --- 5 + import { Image } from 'astro:assets'; 6 + 7 + import localOpenstatus from '../../../assets/guides/self-hosting-openstatus/local-openstatus.png'; 8 + 9 + 10 + If you want to self host openstatus, we provide a [docker-compose](https://www.github.com/) file to get you started quickly. 11 + 12 + 13 + ## Known limitations 14 + 15 + - It only works with private locations. You have to deploy our probes to the cloud provider of your choice. 16 + 17 + ## Get started 18 + 19 + 1. Clone the repository 20 + 21 + ```bash 22 + git clone 23 + ``` 24 + 25 + 2. Copy the `.env.example` file to `.env` and modify the environment variables as needed. 26 + 27 + ```bash 28 + cp .env.docker.example .env.docker 29 + ``` 30 + 31 + 3. Build the containers 32 + ``` 33 + export DOCKER_BUILDKIT=1 34 + docker compose up -d 35 + ``` 36 + 37 + 4. Migrate the database 38 + 39 + ```bash 40 + cd packages/db 41 + pnpm migrate 42 + ``` 43 + 44 + 5. Create Tinybird datasources, pipes and endpoints 45 + 46 + ```bash 47 + cd packages/tinybird 48 + tb --local deploy 49 + ``` 50 + 51 + 7. Access Tinybird local UI and get your TOKEN 52 + 53 + ```bash 54 + tb --local open 55 + ``` 56 + 57 + 8. Update the `.env.docker` file with your Tinybird TOKEN 58 + 59 + 9. Connect to your OpenStatus instance and create a new workspace. 60 + 61 + 10. Update your newly created workspace with the following limits: 62 + 63 + ```json 64 + { 65 + "monitors": 100, 66 + "periodicity": ["30s", "1m", "5m", "10m", "30m", "1h"], 67 + "multi-region": true, 68 + "data-retention": "24 months", 69 + "status-pages": 20, 70 + "maintenance": true, 71 + "status-subscribers": true, 72 + "custom-domain": true, 73 + "password-protection": true, 74 + "white-label": true, 75 + "notifications": true, 76 + "sms": true, 77 + "pagerduty": true, 78 + "notification-channels": 50, 79 + "members": "Unlimited", 80 + "audit-log": true, 81 + "private-locations": true 82 + } 83 + ``` 84 + 85 + 11. Create a new private location in the dashboard. 86 + 87 + 12. Deploy the private location to your cloud provider of choice with they API key 88 + 89 + 13. Create monitors and start monitoring your services! 90 + 91 + 92 + <Image 93 + src={localOpenstatus} 94 + alt="Openstatus running locally" 95 + /> 96 + 97 + 98 + ## Our services Services 99 + 100 + | Service | Port | Purpose | 101 + |---------|------|---------| 102 + | workflows | 3000 | Background jobs | 103 + | server | 3001 | API backend (tRPC) | 104 + | dashboard | 3002 | Admin interface | 105 + | status-page | 3003 | Public status pages | 106 + | private-location | 8081 | Monitoring agent | 107 + | libsql | 8080 | Database (HTTP) | 108 + | libsql | 5001 | Database (gRPC) | 109 + | tinybird-local | 7181 | Analytics |