Skip to content

Cookie settings

Choose which kinds of cookies you allow. You can change your choice at any time via Cookie settings at the bottom of every page. Privacy statement

Necessary

Always on

Needed to log in, keep your cart and remember your choices. These are always on.

Which cookies?
  • weboke_sessie, weboke_klant, weboke_remember: your session and staying logged in
  • weboke_basket: your cart
  • wkBtwIncl: showing prices with or without VAT
  • wok_cookies: your cookie choice, 12 months

Measures which ad leads to a visit or order, so we do not pay for ads that do nothing.

Which cookies?
  • Google Ads via Google Tag Manager (_gcl_au, _gcl_aw), up to 90 days
  • OpenAI Ads, ads in ChatGPT
  • wok_aff: which partner referred you to us (affiliate programme), 60 days

4.6

Country and language

Each country has its own site, with prices and VAT for that country.

View

Using your own cloud-init when installing your VPS

When installing or reinstalling your VPS, you can provide your own cloud-init. Your VPS runs that file itself on first boot: it installs your packages, creates your users and runs your commands. You don't need an API or a terminal for it.

The root password or the SSH key is still required, even with a custom cloud-init. That way you can always get in, including via the console.

1. Opening the field

  1. Log in to My WebOké, go to My Products and click your VPS.
  2. New VPS: you'll see the Install your VPS block. Reinstalling: choose the Advanced tab and, under Reinstall, click Reinstall....
  3. Choose the operating system and enter the root password and, optionally, your SSH key.
  4. Below the SSH key, click Custom cloud-init and paste your file into the field.
  5. Click the button to install, or click Erase everything and reinstall.

2. What can the file contain?

  • A file that starts with #cloud-config (settings in YAML) or a script that starts with #!. #cloud-boothook and ## template: jinja also work.
  • A maximum of 256 KB and text only (UTF-8).
  • In YAML, indent with spaces, never with tabs.
  • WebOké takes care of the network (IPv4 and IPv6). A custom network-config is not used.

3. An example

This file installs htop and fail2ban, creates the user anna with an SSH key and sudo, and then runs a command:

#cloud-config
hostname: web1
fqdn: web1.example.com
package_update: true
packages:
  - htop
  - fail2ban
users:
  - default
  - name: anna
    shell: /bin/bash
    sudo: "ALL=(ALL) NOPASSWD:ALL"
    ssh_authorized_keys:
      - ssh-ed25519 AAAAC3Nza... anna@laptop
runcmd:
  - timedatectl set-timezone Europe/Amsterdam

Replace the key with your own public key. The example is for Debian and Ubuntu: on AlmaLinux and Rocky Linux, install htop and fail2ban via runcmd, after dnf install -y epel-release.

4. What takes precedence?

WebOké itself provides the hostname, the root password (as a hash) and your SSH key. Your file is merged with these. If you set users, password, chpasswd or ssh_authorized_keys yourself, yours take precedence.

If you set ssh_authorized_keys or password at the top level yourself, they replace the key and the password from the form. In that case, also include the key you want to log in with. In users, keep the line - default at the top.

5. Checking whether it worked

cloud-init runs once, on the first boot of your VPS. Then log in and check:

  1. cloud-init status --long shows status: done if everything worked, or error along with the error.
  2. The output of your packages, commands and scripts is in /var/log/cloud-init-output.log. Details are in /var/log/cloud-init.log.
  3. Use sudo cloud-init schema --system to check your file. If the YAML is invalid, cloud-init skips parts of it.

Good to know

  • It works for all operating systems in the list: Ubuntu 24.04 and 26.04, Debian 12 and 13, AlmaLinux 9 and 10, and Rocky Linux 9 and 10.
  • Your file is passed on encrypted and is not stored in your VPS's task history. Still, don't put any secrets in it that you don't need.
  • A VPS is unmanaged. Support does not help with the contents of your cloud-init. All options can be found at docs.cloud-init.io.

Detailed explanation with more examples: Custom cloud-init: set up your VPS automatically on first boot in the VPS manual.

See also: Mount your own ISO or reinstall your VPS and Logging in to your VPS with SSH (and creating an SSH key).

Was this article helpful?

← Back to VPS hosting

One moment…

Set up your domains

For each domain, arrange the nameservers, the link to your hosting and who becomes the owner.

Loading your domains…