Appearance
Export code & self-host
In this article, you'll learn:
- How to export a project
- How to self-host a project
Export a project
Code export is available on the Essential workspace plan and higher. Learn more about workspace plans →
- Click the
Publishbutton in the top right of the editor. - Select
Export, then clickGenerate code export. - In
Name your export, give your export a name, for examplev2 before the redesign. - Choose what the export creates:
Push code to GitHub: sends the code to the GitHub repositories you connected, one for the interface and one for the serverSource code: the original code, which needs a build step before you host itBuilt code: the compiled files, ready to host as they are
- Click
Generate code export.

Once the export is ready, download its files from the Export panel, or from the Deployments tab of your project, in the editor or the dashboard. Click the three dots at the end of the version with the Exported status, then choose the files you need: Download built Interface files, Download built Server files, Download source Interface files or Download source Server files. The Server files are there when your project uses the WeWeb backend.
Learn more about the Deployments tab →
Code export example
You can download an example project here with both raw and built files.

Self-host a project
You can self-host WeWeb projects anywhere you like!
If your project only uses the interface, you can export the built interface files and host them on your own infrastructure.
As examples, we've documented how you might:
- Self-host a WeWeb project on Cloudflare for interface-only hosting
- Self-host a fullstack WeWeb project on AWS
What runs on your own infrastructure
When you self-host a fullstack project, the exported backend runs on your server and connects to your own PostgreSQL database. It does not need WeWeb's servers to run:
- WeWeb Auth runs inside your backend. Users, sessions and roles are stored in your own database.
- Integrations like Stripe, Notion, Airtable or Google Sheets connect directly to each service from your backend.
- File uploads go to your own storage, like an AWS
S3bucket.
API keys and secrets are not included in the export. You add them yourself in the exported .env file, including the keys of each integration and a secret for authentication.
A few things that WeWeb provides on its hosting need your own setup once you self-host:
- AI features — Add your own API key for each AI provider you use. WeWeb AI credits can't be used in a self-hosted app.
- Emails sent by WeWeb — WeWeb's built-in email sending is not available. Send emails with an email integration like Resend or SendGrid and your own API key.
- Your data and files — The export contains the structure of your tables, not the records in them. Files already uploaded to WeWeb are not moved either. Move your data and files to your own database and storage separately.
Frequently Asked Questions
I have a Free WeWeb Cloud plan, will the self-host option be limited by my WeWeb Cloud plan's limits?
No. The exported code will run on your infrastructure, so none of the WeWeb Cloud plan limits apply.
How many times can I export my code?
You can export your code as many times as you want, for as long as you have an active workspace plan subscription.
Where can I self-host the exported application from WeWeb?
You can host the app on cloud hosting platforms like Amazon Web Services, Google Cloud Platform, Microsoft Azure, Cloudflare or Digital Ocean, as well as on managed hosting services platforms like Netlify.
Or you can self-host on your on-premise infrastructure—basically anything that can run a web server; an internet connection is not mandatory.
Will my backend still work after I export the code and self-host the app?
Yes, as long as the backend your project depends on is still hosted and reachable.
If you are only self-hosting the interface, the exported interface will continue to call your backend or external services just as it did before.
What files are included in the code export?
What is included depends on the export type and the parts of your project you are hosting.
Built files (Built code):
- These are the compiled files of your app.
- They are ready to deploy to a web server or hosting platform.
- The built interface files are what you usually use for interface-only hosting.
Source files (Source code):
- This is the original code of your project, generated by WeWeb.
- It needs a build step before you can host it.
- Useful if you want to run your own build process or analyze the code.
Each type comes as Interface files and, when your project uses the WeWeb backend, Server files. The server files are hosted separately from the interface.
Can I make edits to my exported code outside WeWeb?
While it's technically possible to edit the exported code from WeWeb, it's not easy or recommended.
The code is structured by a machine for a machine and is not organized like a human developer would organize it.
Editing these files safely requires in-depth knowledge of WeWeb's internal logic. This approach isn't feasible if you're planning to build a project in WeWeb and then maintain it independently outside the platform.
Can I host my application in an air-gapped environment?
Yes, WeWeb applications can be hosted in networks with no internet access. You can export the code and host it in your network alongside your own backend.
Can I still use WeWeb's CDN when self-hosting?
No. Files uploaded to WeWeb's CDN before self-hosting will not be preserved when you self-host.
For self-hosting scenarios, it's best to set up file uploads to your own storage solution from the beginning to ensure continuity when you transition to self-hosting.
Files that are part of your app's structure (like images embedded in the design) will be included in the export.
Can I export only part of my WeWeb project?
No, the export includes the entire project.
Can I import my exported code back into WeWeb?
No, this feature is currently not available.
Does WeWeb provide server requirements for self-hosting?
With WeWeb, you can self-host your project in any standard web server.
How does WeWeb handle custom domains for self-hosted projects?
The setup of a custom domain is handled through your hosting provider, not WeWeb.
Can I host my application on a root domain and do white label hosting?
Yes, all of that is possible when you self-host.
Can I still use WeWeb's UI components library in a self-hosted project?
Yes, WeWeb's UI components will be included in the exported files.
What's WeWeb's approach to version control for exported projects?
WeWeb itself doesn't provide version control for exported projects. However, once you have exported your project, you can implement version control yourself using systems like Git.
Does WeWeb provide tools for monitoring self-hosted projects?
No. You'll need to use third-party solutions for that.
Is it possible to add multiple subdomains to a self-hosted project?
Yes. You can deploy to multiple domains if you self-host.

