Afren Hosting is open in beta: run what you build, with its own database
Host a project you built on Afren as a live app with its own database and address. Sleep is included with Pro and Team, Starter keeps an app always on, and a deploy never takes your app down.
Why we built this
People come to Afren to turn an idea into working software, but building is not where the work ends. A working app needs somewhere to run, a database that is looked after, an address its users can find, and clarity about who is responsible for what. Until now, what you built on Afren could be published as a site. Today it can run, end to end, with its API and its own data.
We set ourselves one test for hosting: it should be boring. A deploy should never take your app down. An app nobody is using should not cost you anything. And when something does go wrong, a failed payment, a mistake in a release, a decision to leave, you should already know what happens next. Everything below follows from that test.
How it works for you
Open Hosting in the sidebar and choose Host a project, or press Host this app on the build screen. Pick a project you have built, give it a name and choose a plan. A few minutes later it is live over HTTPS at its own address on demo.afren.ai. If you published the project before, it keeps the same address, so links you have already shared keep working.
In the beta, Afren hosts apps built with Next.js and Express, the stack most Afren projects use. More stacks follow as each one meets the same bar.
Every hosted app has its own page. Overview shows the last hour of visits, CPU time and data sent, with a simple chart of visits per minute. Versions lists every deploy. Activity is a plain-language feed of what happened and when: deploys, restarts, sleeps, wakes. Secrets holds your environment variables, and Domains holds the addresses your app answers on.
Deploys that do not break your app
Press Deploy latest and Afren builds your project's current version into a production release and starts it next to the one that is live. The new version takes traffic only once it answers its health check. Until then, your visitors keep using the version that was already running. If the new one fails to start, nothing changes for them, and the app page shows why it failed.
After a deploy, the previous version stays ready for a short while, so Roll back is close to instant. Later, rolling back simply redeploys it.
Sleep, explained
Most apps are quiet most of the time, so we made quiet cheap. Sleep is included with Pro (one app) and Team (three apps). After 15 minutes without a visitor, the app pauses. The next visit wakes it in about a second, and the request is answered as soon as it is awake. Nothing is lost while it sleeps.
Starter is for apps that should never pause: it keeps one app always on for US$12 a month by card, or ₦16,000 a month in naira. If you live in Nigeria, naira is offered first, and anyone can choose either. People we have invited to the beta get a code to use at checkout.
Your data and your secrets
Every app gets a private database of its own, created for it and connected through an environment variable, so your code needs no extra setup. Apps are isolated from each other and from Afren's own systems.
Secrets are write-only. You can add, replace or delete an environment variable, but once saved its value is encrypted and never shown again, not even to you. That way a value pasted once cannot leak later from a screen, an export or a log.
Teams
In a team workspace, the roles from team workspaces apply to hosting too. Viewers see status and activity. Members deploy, restart, pause and roll back. Owners and Admins also manage secrets, domains and deletion, because those change what the app exposes. Only the Owner starts, stops or pays for a plan, because a team's hosted apps bill to its account holder.
Billing you can predict
Starter is a monthly subscription for one app, under our auto-renewal terms, and each app's plan starts, renews and ends on its own. If a renewal fails, the app keeps running for 7 days while the payment is retried. If it is still unpaid, the app sleeps, and 30 days after the plan ends it is paused.
You can stop renewal at any time from the app's Billing tab. The plan runs to the end of the period you paid for, and you can choose to move the app to Sleep at that point instead of letting it lapse.
Leaving cleanly
Deleting an app stops it at once. Its data, the database, the secrets and the built versions, is deleted 30 days later. If a plan ends and is not restarted, the app is deleted 30 days after a cancellation, or 60 days after an unpaid plan ends, and we email the owner a week before anything is deleted. Your builder project is never touched, so you can always host it again.
The rules
Hosting follows the Hosted Apps section of the Terms of Service. You are responsible for your app's code, content, data and users; in data protection terms you are the controller and Afren is the processor. We are responsible for isolated infrastructure, for backing up your database, and for making reasonable efforts to keep your app available. During the beta we make no uptime commitment.
The Acceptable Use Policy applies to everything you run on Afren. It rules out phishing, malware, spam, crypto mining, attacks, open proxies, illegal content and attempts to reach other customers' apps. Outbound mail ports are closed, so an app that sends email should use a reputable email service. The Privacy Policy explains how long hosted-app data is kept. To report abuse, email business@afren.ai with "Abuse" in the subject.
What comes next
This is a beta, and we are building it in the open. Next are automatic verification and certificates for custom domains, so adding your own domain becomes one step. After that come restores and exports for your app's database, and usage-based plans with more power, with a spending cap you set so that a busy month never turns into a surprise bill. When the cap is reached, the app stays up; only extra usage stops.
Everything about hosting is in the docs, and prices are on the pricing page. Pick a project and host it.