How to self-host your Weweb project

2 min read 8 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

  1. Go to the self-hosting tab of your workspace.
  2. Download the web server available on GitHub and refer to the documentation for server setup.
  3. Create a server and a database, and use the provided variables to connect your server to the database.

Step 2: Configure the Server

  1. Put the URL to test if the server is correctly configured.
  2. Generate a public key and a private key.
  3. Set these keys as environment variables inside your server configuration.

Step 3: Prepare for Project Hosting

  1. Ensure the server is running and connected to the database.
  2. Connect the file storage and set the public and private keys.
  3. Go to your projects in the dashboard and access the self-hosting tab.

Step 4: Publish Your Project

  1. Publish your project after setting up the server for the first time.
  2. Once publishing is complete, check the self-hosting tab to find the file version.
  3. Download the associated files, extract them, and send them to your server storage (e.g., S3).
  4. Respect the values you set for the file path variable.

Step 5: Update Project Versions

  1. Create a project folder on your server and a subfolder with the project ID for each version.
  2. Upload the downloaded files to the respective version folders on your server.
  3. Refresh the file versions on Weweb to confirm the files are found in your server storage.
  4. Activate the new version once the files are on your server.

Step 6: Access Your Website

  1. Assign a domain name to access your website.
  2. Save the domain name configuration.
  3. Visit the URL to view your published server.

Step 7: Update Project Versions

  1. To update project versions, repeat the process:
  2. Publish your website.
  3. Download the new version files.
  4. Create a new version folder on your server and upload the files.
  5. 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.