Skip to content

Add new page on self-hosted sdks #434

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions fern/products/sdks/guides/self-host-fern-generators.mdx

This file was deleted.

53 changes: 53 additions & 0 deletions fern/products/sdks/guides/self-hosted.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
title: Self-Hosted SDKs
description: Fern supports self-hosting SDK generation so that you can run SDK generation
on your own infrastructure.
---

<Note>Self-hosted SDK generation is only available for the enterprise plan.</Note>

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.

## When to use self-hosting

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.

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).

<Warning>
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.
</Warning>

## How it works

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.

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.

The self-hosted process works as follows:

1. **Download the Docker image** - Fern provides the location of the most up-to-date Docker image containing the SDK generation logic
1. **Upload your fern folder** - Add your API definition and other configuration files to the container
1. **Run the container** - Execute SDK generation using standard Docker commands
1. **Partial SDK output** - Core SDK files are generated and saved to your configured output location (local file system, GitHub repository, package registry, etc.)
1. **Organization verification** - Fern verifies your organization registration and completes SDK generation by adding package distribution files like `pyproject.toml`, READMEs, and dependency configurations
1. **Receive updated Docker images** - Fern releases new versions of the Docker image that your team can evaluate and deploy when ready

### Architecture diagram

```mermaid
sequenceDiagram
autonumber
participant F as Fern
participant C as Customer
participant S as Customer Server
F->>C: Provides Docker image
C->>S: Uploads fern folder
C->>S: Runs Docker command
S->>S: Output partial SDK
F->>F: Checks organization registration
F->>S: Completes SDK generation
F->>C: Releases updated Docker image
C->>C: Evaluates new version
C->>S: Deploys updated image
```
9 changes: 4 additions & 5 deletions fern/products/sdks/sdks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,15 +202,14 @@ navigation:
- page: Filter Your Endpoints (Audiences)
path: ./guides/filter-your-endpoints-audiences.mdx
slug: audiences
- page: Customize the README for your SDKs
- page: Customize your README
path: ./guides/configure-readme.mdx
slug: readme
- page: Self-host Fern's SDK Generators
hidden: true
path: ./guides/self-host-fern-generators.mdx
slug: self-host-generators
- page: Retries with Backoff
path: ./guides/retries-with-backoff.mdx
- page: Self-Hosted SDKs
path: ./guides/self-hosted.mdx
slug: self-hosted
- section: Reference
contents:
- page: generators.yml
Expand Down