Skip to content

Commit 887e269

Browse files
committed
update self-hosting guide
1 parent 95b25c3 commit 887e269

File tree

3 files changed

+90
-49
lines changed

3 files changed

+90
-49
lines changed

.env.template

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ POSTGRES_DB=pad
1212
# Keycloak Configuration
1313
KEYCLOAK_ADMIN=admin
1414
KEYCLOAK_ADMIN_PASSWORD=admin123
15+
16+
# Fill this after you have created a realm and client in keycloak
1517
OIDC_REALM=your_realm
1618
OIDC_CLIENT_ID=your_client_id
1719
OIDC_CLIENT_SECRET=your_client_secret
1820

19-
# Docker Configuration
21+
# Docker group id for coder, get it with: getent group docker | cut -d: -f3
2022
DOCKER_GROUP_ID=your_docker_group_id
2123

2224
# Coder Configuration

README.md

Lines changed: 87 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,86 @@
1-
# 🚀 pad.ws: Your Whiteboard IDE 🚀
1+
# pad.ws - whiteboard as an IDE 🎨
2+
3+
4+
5+
[![Pad.ws Canvas IDE](docs/canvas_ide.png)](https://pad.ws)
6+
7+
[pad.ws](https://pad.ws) is a whiteboard app that acts as a dev environment in your browser
8+
9+
## ✨ Features
10+
11+
* 🎨 **Interactive Whiteboard** - Draw, sketch and visualize your ideas with Excalidraw
12+
* 💻 **Fully fetched IDE** - Access terminals and VS Code directly within the whiteboard
13+
* ☁️ **Browser friendly** - Access your dev env from any device
14+
* 🔄 **Seamless Workflow** - Switch between visual ideation and coding
15+
* 🛠️ **Use your own tools** - Access your VM from your desktop client (VS Code & Cursor supported)
16+
17+
This uses [Excalidraw](https://github.com/excalidraw/excalidraw) for the whiteboard interface while [Coder](https://github.com/coder/coder) powers the cloud development environments.
18+
19+
20+
## Try it online 🌐
21+
22+
Visit [pad.ws](https://pad.ws) for an official managed instance. During this beta, we offer free ubuntu dev environments without any setup
23+
24+
## Self-Hosting 🛠️
25+
26+
⚠️ IMPORTANT NOTICE: This repository is in early development stage. The setup provided in `docker-compose.yml` is for development and testing purposes only.
27+
This simplified example lets you host pad on `localhost` but is not safe for real-life use without further configurations ⚠️
228

3-
Welcome to `pad.ws`, the innovative whiteboard environment integrated right into your IDE!
429

5-
## 🛠️ Self-Hosting Guide 🛠️
630

7-
Ready to host your own `pad.ws` instance? Follow these steps:
831

932
### ✅ Prerequisites
33+
* **Linux Host** (This was tested on Ubuntu only)
34+
* **Docker & Docker Compose:** Ensure you have both installed. [Install Docker](https://docs.docker.com/get-docker/) / [Install Docker Compose](https://docs.docker.com/compose/install/)
35+
1036

11-
* **Docker & Docker Compose:** Ensure you have both installed and running. [Install Docker](https://docs.docker.com/get-docker/) / [Install Docker Compose](https://docs.docker.com/compose/install/)
37+
### 1️⃣ .env
1238

13-
### 1️⃣ Step 1: Start PostgreSQL 🐘
39+
* Copy and review the default values
40+
```bash
41+
cp .env.template .env
42+
```
1443

15-
* Run the PostgreSQL container using the provided configuration (e.g., in your `docker-compose.yml`).
44+
### 2️⃣ PostgreSQL 🐘
45+
> Ensure persistence for the whole deployment (canvases and configs)
1646

17-
```bash
18-
# Example command (adjust based on your setup)
19-
docker compose up -d postgres
20-
```
47+
* Run the PostgreSQL container using the provided configuration (e.g., in your `docker-compose.yml`)
2148

22-
### 2️⃣ Step 2: Configure Keycloak 🔑
49+
```bash
50+
docker compose up -d postgres
51+
```
2352

24-
* Run the Keycloak container.
25-
* Access the Keycloak admin console.
26-
* **Create a Realm:** Name it appropriately (e.g., `pad-ws`).
53+
### 3️⃣ Keycloak 🔑
54+
> OIDC provider for access and user management (within coder and pad app)
55+
* Run the Keycloak container
56+
```bash
57+
docker compose up -d keycloak
58+
```
59+
* Access the Keycloak admin console http://localhost:8080
60+
* **Create a Realm:** Name it appropriately (e.g., `pad-ws`)
2761
* **Create a Client:**
28-
* Give it a `Client ID` (e.g., `pad-ws-client`).
29-
* Enable **Client Authentication**.
30-
* Leave other settings as default for now.
62+
* Give it a `Client ID` (e.g., `pad-ws-client`)
63+
* Enable **Client Authentication**
64+
* Add * to the valid redirect urls
65+
* You can leave other settings as default for now
3166
* **Get Credentials:**
32-
* Navigate to `Clients` -> `[Your Client ID]` -> `Credentials` tab.
67+
* Navigate to `Clients` -> `[Your Client ID]` -> `Credentials` tab
3368
* Note the **Client secret**.
3469
* Update your environment variables file (`.env`) with:
3570
```dotenv
71+
OIDC_REALM=your_oidc_realm
3672
OIDC_CLIENT_ID=your_client_id
3773
OIDC_CLIENT_SECRET=your_client_secret
3874
```
3975
* **Create a User:**
40-
* Navigate to `Users` -> `Create user`.
41-
* Fill in the details.
42-
* **Important:** Tick `Email verified`.
43-
* Go to the `Credentials` tab for the new user and set a password.
76+
* Navigate to `Users` -> `Create user`
77+
* Fill in the details
78+
* **Important:** Tick `Email verified`
79+
* Go to the `Credentials` tab for the new user and set a password
4480

45-
### 3️⃣ Step 3: Set Up Coder 🧑‍💻
81+
### 4️⃣ Coder 🧑‍💻
4682

47-
* **Find Docker Group ID:** You'll need this to grant necessary permissions.
83+
* **Find Docker Group ID:** You'll need this to grant necessary permissions
4884
```bash
4985
getent group docker | cut -d: -f3
5086
```
@@ -53,49 +89,52 @@ docker compose up -d postgres
5389
DOCKER_GROUP_ID=your_docker_group_id
5490
```
5591
* Run the Coder container.
56-
* **Access Coder UI:** Open `http://localhost:7080` in your browser.
57-
* **First Login:** Create an administrator user (e.g., `admin`).
92+
```bash
93+
docker compose up -d coder
94+
```
95+
* **Access Coder UI:** Open [localhost:7080](http://localhost:7080) in your browser
96+
* **First Login:** Create an administrator user (e.g., `admin`)
5897
* **Create a Template:**
5998
* Use the "Start from template" option.
60-
* Choose a base image (e.g., `docker-containers` or a simple Ubuntu). Configure it as needed.
99+
* Choose a base image (e.g., `docker-containers` or a simple Ubuntu). Configure it as needed
61100
* **Generate API Key:**
62-
* Click your profile picture (top right) -> `Account` -> `API Keys`.
63-
* Generate a new token.
64-
* Update your `.env`:
101+
* Click your profile picture (top right) -> `Account` -> `API Keys`
102+
* Generate a new token
103+
* Update your `.env`
65104
```dotenv
66105
CODER_API_KEY=your_coder_api_key
67106
```
68107
* **Get Template ID:**
69-
* Visit `http://localhost:7080/api/v2/templates` in your browser (or use `curl`).
70-
* Find the `id` of the template you created.
71-
* Update your `.env`:
108+
* Visit `http://localhost:7080/api/v2/templates` in your browser (or use `curl`)
109+
* Find the `id` of the template you created
110+
* Update your `.env`
72111
```dotenv
73112
CODER_TEMPLATE_ID=your_coder_template_id # Example: 85fb21ba-085b-47a6-9f4d-94ea979aaba9
74113
```
75114
* **Get Default Organization ID:**
76-
* Visit `http://localhost:7080/api/v2/organizations` in your browser (or use `curl`).
77-
* Find the `id` of your organization (usually the default one).
115+
* Visit `http://localhost:7080/api/v2/organizations` in your browser (or use `curl`)
116+
* Find the `id` of your organization (usually the default one)
78117
* Update your `.env`:
79118
```dotenv
80119
CODER_DEFAULT_ORGANIZATION=your_organization_id # Example: 70f6af06-ef3a-4b4c-a663-c03c9ee423bb
81120
```
82121
83-
### 4️⃣ Step 4: Build & Run the Pad App 📝
122+
### 5️⃣ Pad App 📝
123+
> The fastAPI app that both serves the build frontend and the backend API to interface with Coder
84124
85-
* **Build the Docker Image:**
86-
```bash
87-
docker build -t pad .
88-
```
89125
* **Run the Application:**
90-
* Ensure all environment variables in your `.env` file are correctly set.
91-
* Run the `pad` application container (e.g., using `docker compose up pad`).
126+
* Ensure all environment variables in your `.env` file are correctly set
127+
* Run the `pad` application container
128+
129+
```bash
130+
docker compose up -d pad
131+
```
132+
133+
🎉 **Congratulations!** You should now be able to access and login to your self-hosted pad at [localhost:8000](http://localhost:8000)
92134
93-
```bash
94-
# Example command (adjust based on your setup)
95-
docker compose up -d pad
96-
```
135+
🚧 *Did you have any issue while following this guide?*
136+
*Please [let us know](https://github.com/pad-ws/pad.ws/issues) so we can improve the onboarding flow*
97137
98-
🎉 **Congratulations!** You should now have your self-hosted `pad.ws` instance up and running! 🎉
99138
100139
101140

docs/canvas_ide.png

1.28 MB
Loading

0 commit comments

Comments
 (0)