Becoming a Provider
Setting up a DeWeb provider instance allows you to provide an access to decentralized websites through your own domain. Follow these steps to get started.
Depending on your country and jurisdiction, serving on-chain content publicly might have legal implications. We strongly recommend you getting to know your local regulations to ensure proper compliance.
Providers operate independently and can set their own content policies. Each provider can use the blocklist/whitelist system to comply with local regulations by selecting the websites they wish or not to serve.
Step 1: Download the Binary
Visit the DeWeb Releases page on GitHub.
Download the binary file matching your operating system and architecture:
- Linux:
deweb-server-linux-{arch}
- Windows:
deweb-server-windows-{arch}
- MacOS (Darwin):
deweb-server-darwin-{arch}
For Apple Silicon (M1,M2,...), choosearm64
, and for Intel, chooseamd64
.
If your target or architecture is missing, please open an issue to request it.
- Linux:
Step 2: Extract the Binary
- Extract the downloaded file if it is in a zip format.
Step 3: Configure the Server
- Create a configuration file named
deweb_server_config.yaml
in the same directory as the server binary. - At a minimum, set the
domain
field in the configuration file. For example, if you own the domainexample.com
and will make your DeWeb instance available on it, set thedomain
toexample.com
.
Example Configuration
domain: "example.com"
network_node_url: "https://buildnet.massa.net/api/v2"
api_port: 8080
allow_list:
- "massaNameService"
- "AS1S...19b3"
block_list:
- "massaNameService"
- "AS1S...4x3o"
The allow/block lists allow you to control which websites are accessible through your provider. If there is any website in the allow list, all other websites are blocked. You can use MNS domain names or smart contract addresses in these lists.
For more detailed settings and options, refer to the Server Configuration page.
We recommend running your own node and using your node's URL as the network_node_url
.
For instructions on how to run a node, refer to the Run a Node documentation.
Step 4: DNS Configuration
To serve DeWeb properly, you need to configure your DNS provider to handle subdomains for MNS domains. In your domain provider panel, set the following DNS records:
- A Record for IPv4:
*.example.com
pointing to your server's IPv4 address. - AAAA Record for IPv6:
*.example.com
pointing to your server's IPv6 address.
Step 5: Set Up HTTPS and Web Server
DeWeb requires HTTPS to be properly served. You will need an HTTPS certificate for *.example.com
and a web server (like Nginx, Apache, etc.) to handle the HTTPS and proxy the requests to your DeWeb server.
General Steps
- Obtain an HTTPS Certificate: Get an SSL certificate for
*.example.com
. You can use services like Let's Encrypt to get a free certificate. - Configure Your Web Server: Set up your web server to:
- Listen on port 80 and redirect HTTP requests to HTTPS.
- Listen on port 443 for HTTPS requests.
- Proxy requests to your DeWeb server running on
localhost:8080
.
For specific configurations, refer to the documentation of the web server you are using (e.g., Nginx, Apache).
Step 6: Copy the Files to the Server
Copy the extracted binary and the configuration file (deweb_server_config.yaml
) to your server.
You can use tools like scp
or any other method you prefer to transfer files to your server.
Step 7: Run the Server
Open your terminal.
Navigate to the directory where the binary and configuration file are located.
Run the server with the following command:
./deweb-server
(On Windows, use
deweb-server.exe
instead of./deweb-server
)
Step 8: Access the Server
Your DeWeb instance will be accessible from the domain you configured. For example, if you set the domain to example.com
,
you can access your DeWeb welcome page by visiting http://deweb.example.com
.
Optional: Step 9 - Register Your Provider
You can register your DeWeb provider in the Provider Registry. This registry allows users to find DeWeb providers easily, offering a more decentralized solution as they can choose the provider they want. Additionally, it facilitates communication on important updates to providers.
DeWeb is still a work in progress, and we are actively listening to feedback. If you encounter any issues or have suggestions, please let us know through our issue tracker.