Skip to content

Commit 7745713

Browse files
committed
add self-hosted SDKs page
1 parent dac98da commit 7745713

File tree

2 files changed

+55
-1
lines changed

2 files changed

+55
-1
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: Self-Hosted SDKs
3+
description: Fern supports self-hosting SDK generation so that you can run SDK generation
4+
on your own infrastructure.
5+
---
6+
7+
<Note>Self-hosted SDK generation is only available for the enterprise plan.</Note>
8+
9+
Fern SDK generation runs on Fern's infrastructure by default. Self-hosting allows you to run SDK generation on your own infrastructure to meet specific security or compliance requirements.
10+
11+
## When to use self-hosting
12+
13+
Self-hosting is typically required for organizations that operate without internet access, have strict compliance requirements, or need full control over their SDK generation process.
14+
15+
When you self-host, you're responsible for server setup, security, maintenance, and deciding how to distribute your generated SDKs. Self-hosted SDK generation includes [all Fern SDK features](/sdks/capabilities.mdx).
16+
17+
<Warning>
18+
Unless you have specific requirements that prevent using Fern's default hosting, we recommend **using our managed cloud generation solution** for easier setup and maintenance.
19+
</Warning>
20+
21+
## How it works
22+
23+
When you run `fern generate`, Fern uses Docker containers to execute SDK generation logic. By default, Fern runs **cloud generation** by allocating compute space and running the container remotely. With **self-hosted (local) generation**, you download and run the same Docker container on your own infrastructure.
24+
25+
Both approaches generate partial SDK files to your configured output location, then Fern verifies your organization registration and completes the SDK by adding package distribution files.
26+
27+
The self-hosted process works as follows:
28+
29+
1. **Download the Docker image** - Fern provides the location of the most up-to-date Docker image containing the SDK generation logic
30+
1. **Upload your fern folder** - Add your API definition and other configuration files to the container
31+
1. **Run the container** - Execute SDK generation using standard Docker commands
32+
1. **Partial SDK output** - Core SDK files are generated and saved to your configured output location (local file system, GitHub repository, package registry, etc.)
33+
1. **Organization verification** - Fern verifies your organization registration and completes SDK generation by adding package distribution files like `pyproject.toml`, READMEs, and dependency configurations
34+
1. **Receive updated Docker images** - Fern releases new versions of the Docker image that your team can evaluate and deploy when ready
35+
36+
### Architecture diagram
37+
38+
```mermaid
39+
sequenceDiagram
40+
participant F as Fern
41+
participant C as Customer
42+
participant S as Customer Server
43+
F->>C: Provides Docker image
44+
C->>S: Uploads fern folder
45+
C->>S: Runs Docker command
46+
S->>S: Output partial SDK
47+
F->>F: Checks organization registration
48+
F->>S: Completes SDK generation
49+
F->>C: Releases updated Docker image
50+
C->>C: Evaluates new version
51+
C->>S: Deploys updated image
52+
```

fern/products/sdks/sdks.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ navigation:
202202
- page: Filter Your Endpoints (Audiences)
203203
path: ./guides/filter-your-endpoints-audiences.mdx
204204
slug: audiences
205-
- page: Customize the README for your SDKs
205+
- page: Customize your README
206206
path: ./guides/configure-readme.mdx
207207
slug: readme
208208
- page: Self-host Fern's SDK Generators
@@ -211,6 +211,8 @@ navigation:
211211
slug: self-host-generators
212212
- page: Retries with Backoff
213213
path: ./guides/retries-with-backoff.mdx
214+
- page: Self-Hosted SDKs
215+
path: ./guides/self-hosted.mdx
214216
- section: Reference
215217
contents:
216218
- page: generators.yml

0 commit comments

Comments
 (0)