Skip to content

Commit 0d22d6b

Browse files
authored
Add new page on self-hosted sdks (#434)
1 parent 0296a99 commit 0d22d6b

File tree

3 files changed

+57
-12
lines changed

3 files changed

+57
-12
lines changed

fern/products/sdks/guides/self-host-fern-generators.mdx

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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+
autonumber
41+
participant F as Fern
42+
participant C as Customer
43+
participant S as Customer Server
44+
F->>C: Provides Docker image
45+
C->>S: Uploads fern folder
46+
C->>S: Runs Docker command
47+
S->>S: Output partial SDK
48+
F->>F: Checks organization registration
49+
F->>S: Completes SDK generation
50+
F->>C: Releases updated Docker image
51+
C->>C: Evaluates new version
52+
C->>S: Deploys updated image
53+
```

fern/products/sdks/sdks.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,15 +202,14 @@ 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
208-
- page: Self-host Fern's SDK Generators
209-
hidden: true
210-
path: ./guides/self-host-fern-generators.mdx
211-
slug: self-host-generators
212208
- page: Retries with Backoff
213209
path: ./guides/retries-with-backoff.mdx
210+
- page: Self-Hosted SDKs
211+
path: ./guides/self-hosted.mdx
212+
slug: self-hosted
214213
- section: Reference
215214
contents:
216215
- page: generators.yml

0 commit comments

Comments
 (0)