I have only none to basic information about hosting with a VPS. I would like to deploy a smart contract and build a website to interact with the contract. Normally I use shared hosting which is very easy to install and use. But now my question is: Do I need to rent a Linux VPS and install web3 and an ethereum client on it to interact with my contract? Or could I even use a shared hosting offer, as I want to use MetaMask as a verifier? Thank you for information.


No, you do not need a VPS to host a web front-end for a dapp. Web3.js is needed as a static JavaScript file, and you can write your own JS code that checks on the client-side that the user has connected to the network via MetaMask. But no code needs to run on the server and the website can use static hosting.

For a simple example of a web-based dapp, take a look at the Truffle Framework Pet Store tutorial. Although this requires 'server' resources on your development machine to build and test the website and its contract interactions, the end result can be deployed to a simple webserver without requiring any server-side processing.

  • Thank you, I'll do that. But just to clarify, so I do not need a wallet/node if I develop the contract correctly? Could I use shared hosting too?
    – dkb
    Feb 16 '18 at 21:49
  • You don't need a node, the code included in the Truffle tutorial uses a web3 object injected by MetaMask, which acts as a "lightweight" node for the purposes of your Dapp. Your users will need to have the MetaMask extension installed in their browsers to make use of the site, and this functions as their wallet. You will also need funds in a wallet in order to deploy the contract to Mainnet. But none of these things prevents you using static hosting for the website. Feb 17 '18 at 18:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.