# How to Self-Host Affine in One Click with Kuberns

> Deploy AFFiNE open-source workspace on a production-ready server in minutes, with no DevOps experience required.
- **Author**: vamsi-mullapudi
- **Published**: 2026-02-20
- **Modified**: 2026-03-06
- **Category**: Open Source
- **URL**: https://kuberns.com/blogs/how-to-self-host-affine/

---

AFFiNE is one of the most ambitious open-source workspace tools available today. It combines documents, whiteboards, and databases into a single connected knowledge platform, positioning itself as a self-hostable alternative to Notion and Miro. Unlike cloud-only collaboration tools, self-hosting AFFiNE gives you complete control over your team's data, no per-seat pricing, and the ability to keep sensitive knowledge entirely within your own infrastructure. But getting AFFiNE running on your own server has traditionally meant configuring a PostgreSQL database, setting up Redis, managing build steps, and handling SSL before your team writes a single document.

[Kuberns](https://kuberns.com/) is an AI-Powered deployment platform which removes all of that. With the [AFFiNE one-click self-hosting template](https://kuberns.com/deploy/affine), you can have a fully operational AFFiNE workspace running on a production-grade server in under ten minutes, with zero manual infrastructure work.

This guide walks you through every step of the process using the [Deploy AFFiNE in One Click](https://kuberns.com/) template on Kuberns.

## Step 1: Select the AFFiNE Template on Kuberns

![affine-template-page](https://kuberns-blogs.s3.ap-south-1.amazonaws.com/affine-template-page.png)
Start by visiting Kuberns and navigating to the [template library](https://kuberns.com/deploy). Search for AFFiNE and you will find the [one-click self-hosted deployment template](https://kuberns.com/deploy/affine). Click on it to begin.

The [template page](https://kuberns.com/deploy/affine) gives you a clear overview of what is being deployed: AFFiNE with a PostgreSQL database for storing your workspace data, documents, and whiteboards, along with Redis for caching and session management. You also get a one-minute demo video if you want to see the process before committing.

Unlike setting up AFFiNE from scratch on a VPS, where you would manually install dependencies, configure a Postgres database, wire up Redis, build the application from source, and handle SSL, this template has already solved every one of those problems. The entire stack is pre-configured and production-ready from the first click.

## Step 2: Sign Up on Kuberns

![onboarding-for-kuberns](https://kuberns-blogs.s3.ap-south-1.amazonaws.com/affine-onboarding.png)
If you do not already have a Kuberns account, this is where you create one. Sign up with your email address, or connect instantly using your GitHub or Google account. The onboarding process takes about two minutes.

During onboarding, Kuberns will ask a few brief questions: your name, what best describes you, and what you plan to deploy. This helps the platform tailor your experience. Once complete, you are taken directly to your workspace and you are ready to deploy.

There is no credit card required to get started. You can deploy AFFiNE immediately on the free tier and decide later whether to upgrade as your team's usage grows.

## Step 3: Fill in Basic Project Details

![project-details-kuberns](https://kuberns-blogs.s3.ap-south-1.amazonaws.com/affine-project-details.png)
After signing up, you will be taken to the project setup screen for your AFFiNE deployment. This is where you give your project a name and select a deployment region.

You will notice the form is intentionally simple. Enter a project name such as affine-production and choose the hosting region closest to your team. That is all Kuberns needs from you at this stage.

No infrastructure decisions are required here. You are not asked to choose a machine size, configure a database connection string, or set up a Redis cluster. All of that is handled automatically behind the scenes by Kuberns AI, which understands what AFFiNE needs to run reliably and configures the environment accordingly.

## Step 4: Launch the Deployment

![affine-instance-getting-deployed](https://kuberns-blogs.s3.ap-south-1.amazonaws.com/affine-deployment.png)
Once your project details are filled in, click Deploy. This is where AFFiNE on Kuberns becomes meaningfully different from every other self-hosting approach. There are no environment variables to generate, no secrets to manage, and no additional configuration screens to work through.

Kuberns AI will automatically handle everything from this point: building the AFFiNE application, provisioning infrastructure including the PostgreSQL database and Redis cache, configuring networking and SSL/TLS certificates, enabling secure HTTPS connections, and starting the AFFiNE service with proper health checks.

You will see a live progress screen as each stage completes. The whole process typically finishes in five to eight minutes, and no manual configurations are needed at any point. Kuberns AI handles everything automatically.

## Step 5: Access Your AFFiNE Workspace

![kuberns-dashboard-to-access-your-affine-workspace](https://kuberns-blogs.s3.ap-south-1.amazonaws.com/affine-kuberns-dashboard.png)
Once deployment is complete, your Kuberns dashboard will show a live URL. This is your AFFiNE workspace, running over HTTPS, ready for your team to use immediately.

The URL follows a format like [https://your-app-name.kuberns.cloud](https://your-app-name.kuberns.cloud). SSL is enabled automatically. There is no certificate setup, no reverse proxy configuration, and no nginx rule to write. You click the link and you are in AFFiNE.

From your dashboard, you can also monitor your server's RAM usage, storage consumption, active database connections, and recent activity logs. Everything you need to understand the health of your deployment is in one place.

Once you land in the AFFiNE interface, you are ready to start building. Create your first document, open a whiteboard, set up a database, and invite your team. The infrastructure is stable, monitored, and production-ready. You only need to think about the work you want to do.

## Why Use Kuberns to Self-Host AFFiNE?

AFFiNE is a powerful platform, but it was designed to run in a properly maintained multi-service environment. When you install it manually, you take on responsibility for that environment over time. That means keeping PostgreSQL healthy, managing Redis, handling application builds when new versions release, renewing SSL certificates, and ensuring the platform stays available when your team needs it most.

For many teams, especially those moving away from Notion or Confluence to avoid escalating per-seat costs, this infrastructure maintenance becomes its own ongoing burden.

Kuberns changes that experience. Instead of reasoning about database connection pooling and Redis cache configurations, you [deploy AFFiNE through an AI-powered system](https://kuberns.com/) that prepares the entire runtime automatically. The platform understands what AFFiNE requires and configures every layer of the infrastructure correctly from the start.

On Kuberns, the infrastructure supporting your workspace is managed automatically. The runtime environment is stable, HTTPS is enabled by default, and the system is monitored for reliability. You get the full power of a self-hosted AFFiNE deployment, with complete data ownership and no per-seat pricing, without the operational overhead that usually comes with it.

## AFFiNE Self-Hosting: Kuberns vs Manual VPS Setup

If you have ever tried to self-host a collaborative workspace tool on a raw VPS, you know how many moving parts are involved. Here is a direct comparison of what each approach requires.

| **What You Need**      | **Manual VPS Setup**            | **Kuberns One-Click**     |
| ---------------------- | ------------------------------- | ------------------------- |
| PostgreSQL database    | Install and configure manually  | Provisioned automatically |
| Redis cache            | Install and connect to AFFiNE   | Provisioned automatically |
| Application build      | Clone repo, install deps, build | Handled by platform       |
| SSL certificate        | Let's Encrypt + nginx config    | Enabled by default        |
| Process management     | PM2 or systemd setup            | Managed by platform       |
| Time to first document | 2 to 4 hours                    | Under 10 minutes          |

The difference is not just in setup time. It is in the ongoing cost of maintenance. A manual VPS deployment requires you to revisit these configurations every time AFFiNE releases a new version, a certificate expires, or a dependency changes. On Kuberns, that surface area simply does not exist.

## What Can You Build with Self-Hosted AFFiNE?

Deploying AFFiNE on Kuberns is the starting point, not the end goal. Once your instance is live, your team has access to a unified workspace that combines the flexibility of a document editor, the spatial freedom of a whiteboard, and the structure of a database, all in one tool.

### Team Knowledge Base and Documentation

AFFiNE gives you a powerful document editor for writing and organizing team knowledge. Self-hosting means your internal documentation, runbooks, product specs, and company wiki never leave your infrastructure. You can structure information with linked pages, nested documents, and rich formatting without worrying about hitting storage limits or paying per editor.

### Visual Planning and Diagramming

The AFFiNE whiteboard lets teams brainstorm, map out systems, create flowcharts, and run visual planning sessions with the same freeform freedom as a physical whiteboard. Because documents and whiteboards live in the same workspace, you can link a whiteboard directly to the document that explains it.

### Project Tracking and Database Views

AFFiNE's database blocks let you build structured views of your projects, tasks, and resources. You can switch between table, kanban, and calendar views on the same dataset, giving different team members the perspective that works best for them without duplicating data.

### Research and Personal Knowledge Management

Individuals and research teams use AFFiNE as a second brain for collecting notes, linking ideas, and building a connected body of knowledge over time. Self-hosting ensures that personal notes, research findings, and sensitive analysis stay entirely within the infrastructure you control.

## Conclusion

Self-hosting AFFiNE gives you a complete, connected workspace platform that your team owns entirely. Your documents, whiteboards, and databases stay on your infrastructure, your costs stay flat regardless of team size, and you are not dependent on a third-party service for your team's most important knowledge.

The reason most teams avoid self-hosting workspace tools is not the software itself. It is the infrastructure complexity that comes with setting up and maintaining a multi-service environment over time. AFFiNE requires a database, a cache layer, an application build, and SSL, and getting all of those working together reliably is a real investment.

Kuberns eliminates that investment entirely. The [one-click AFFiNE template](https://kuberns.com/deploy/affine) handles every layer of infrastructure automatically, so your team can go from zero to a live, collaborative workspace in under ten minutes, with no server management required now or in the future.

If you are evaluating AFFiNE as an alternative to Notion or Confluence, or if you are already using AFFiNE Cloud and want to move to self-hosted to gain full data ownership and eliminate per-seat costs, this is the path that makes it straightforward.

[Get started with AFFiNE on Kuberns](https://kuberns.com/deploy/affine) and have your workspace live today.

## Frequently Asked Questions About Self-Hosting AFFiNE

### Is it free to self-host AFFiNE on Kuberns?

Kuberns offers a free tier that lets you deploy AFFiNE and start using your workspace immediately. The free plan includes two deployments per day and services are paused after two hours of inactivity. For team workspaces that need to be available continuously, a paid plan is recommended.

### Do I need to configure any environment variables to deploy AFFiNE?

No. AFFiNE is one of the simplest deployments on Kuberns precisely because it requires no environment variables from you at all. You provide a project name, select a region, and click Deploy. Kuberns handles all configuration automatically.

### Do I need to know Docker or Kubernetes to deploy AFFiNE on Kuberns?

No. Kuberns abstracts all container and infrastructure management away from you. You do not need to write a Dockerfile, configure a Kubernetes cluster, or understand how containers work. The platform handles all of that behind the one-click deployment.

### What database does AFFiNE use on Kuberns?

Kuberns provisions a PostgreSQL database automatically for your AFFiNE deployment. PostgreSQL stores all your workspace data including documents, whiteboards, and database content. It is configured and connected to your AFFiNE instance without any manual setup required.

### Can I use a custom domain with my AFFiNE workspace on Kuberns?

Yes. After deployment, you can configure a custom domain through your Kuberns dashboard. By default, your workspace will be available on a Kuberns-provided subdomain with SSL enabled. Adding your own domain follows the same simple configuration flow.

### How is self-hosted AFFiNE different from AFFiNE Cloud?

AFFiNE Cloud is the managed version, which handles all infrastructure for you but stores your data on AFFiNE's servers and may come with usage limits on the free tier. Self-hosted AFFiNE gives you full control over your data, no storage limits beyond your server capacity, and no per-seat costs. The trade-off is that you are responsible for the infrastructure, which is where Kuberns removes the friction entirely.

### How many team members can use a self-hosted AFFiNE instance?

A self-hosted AFFiNE instance can support as many team members as your server resources allow. Unlike AFFiNE Cloud, there are no per-seat restrictions. You can invite your entire team without any additional cost.

Ready to get started? Visit [kuberns.com](https://kuberns.com/) and deploy AFFiNE in minutes.

---
- [More Open Source articles](https://kuberns.com/blogs/category/open-source/1/)
- [All articles](https://kuberns.com/blogs/)