How to self-host your Weweb project
2 min read
7 months ago
Published on Apr 22, 2024
This response is partially generated with the help of AI. It may contain inaccuracies.
Table of Contents
How to Self-Host Your Weweb Project
Step 1: Set up the Self-Hosting Feature
- Go to the self-hosting tab of your workspace.
- Download the web server available on GitHub and refer to the documentation for server setup.
- Create a server and a database, and use the provided variables to connect your server to the database.
Step 2: Configure the Server
- Put the URL to test if the server is correctly configured.
- Generate a public key and a private key.
- Set these keys as environment variables inside your server configuration.
Step 3: Prepare for Project Hosting
- Ensure the server is running and connected to the database.
- Connect the file storage and set the public and private keys.
- Go to your projects in the dashboard and access the self-hosting tab.
Step 4: Publish Your Project
- Publish your project after setting up the server for the first time.
- Once publishing is complete, check the self-hosting tab to find the file version.
- Download the associated files, extract them, and send them to your server storage (e.g., S3).
- Respect the values you set for the file path variable.
Step 5: Update Project Versions
- Create a project folder on your server and a subfolder with the project ID for each version.
- Upload the downloaded files to the respective version folders on your server.
- Refresh the file versions on Weweb to confirm the files are found in your server storage.
- Activate the new version once the files are on your server.
Step 6: Access Your Website
- Assign a domain name to access your website.
- Save the domain name configuration.
- Visit the URL to view your published server.
Step 7: Update Project Versions
- To update project versions, repeat the process:
- Publish your website.
- Download the new version files.
- Create a new version folder on your server and upload the files.
- Refresh the file versions on Weweb and activate the new version.
By following these steps, you can successfully self-host your Weweb project and update versions as needed.