Host the vote page on your own domain

You host the page, VoteScript keeps the votes, callbacks and rewards.

What you need

  • Web hosting
  • PHP 8.1 for the PHP version, Node for the Next.js version

Download the files

Open Publish, then Your hosting, and choose HTML, PHP or Next.js. The files are filled in with your server.

Set it up

Open the settings file of your version.

config.js
window.VOTESCRIPT = {
  VOTESCRIPT_URL: 'https://votescript.voterank.net',
  VOTESCRIPT_SERVER: 'your-server',
};
.env
VOTESCRIPT_URL="https://votescript.voterank.net"
VOTESCRIPT_SERVER="your-server"
VOTESCRIPT_KEY="YOUR_KEY"
.env.local
VOTESCRIPT_URL="https://votescript.voterank.net"
VOTESCRIPT_SERVER="your-server"
VOTESCRIPT_KEY="YOUR_KEY"

HTML version: allow your domain

Browsers may start votes only from websites you allowed. Add the domain under Publish, then API. The PHP and Next.js versions use the key instead and do not need this.

Upload and vote once

Upload the folder, open it in the browser, enter your name and vote.

You should now see: The same state as on your hosted page.

If it does not work

Votes cannot be started
HTML: the domain is not allowed. PHP and Next.js: the key is missing or wrong.
Can the key be in config.js?
Never. Everyone can read that file. The HTML version needs no key.

Next

Give your players one place to vote

Your page is live as soon as you create your server. You can connect the rest step by step.