# Prvotní konfigurace VPS skriptem, cloud-init a NixOS / Initial VPS configuration with script, cloud-init and NixOS

**URL:** https://discourse.vpsfree.cz/t/prvotni-konfigurace-vps-skriptem-cloud-init-a-nixos-initial-vps-configuration-with-script-cloud-init-and-nixos/317
**Category:** Announcements
**Tags:** api, vps, vpsadmin
**Created:** [March 16, 2025, 1:54pm UTC](https://discourse.vpsfree.cz/t/prvotni-konfigurace-vps-skriptem-cloud-init-a-nixos-initial-vps-configuration-with-script-cloud-init-and-nixos/317 "2025-03-16T13:54:25Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![aither](https://discourse.vpsfree.cz/user_avatar/discourse.vpsfree.cz/aither/32/130_2.png) [@aither](https://discourse.vpsfree.cz/u/aither)
#### Post date: [March 16, 2025, 1:54pm UTC](https://discourse.vpsfree.cz/t/prvotni-konfigurace-vps-skriptem-cloud-init-a-nixos-initial-vps-configuration-with-script-cloud-init-and-nixos/317/1 "2025-03-16T13:54:25Z")

</div>

Read in [English](#p-786-english-1) below.

Při vytvoření nové VPS a reinstalaci můžete přes vpsAdmin do VPS nahrát skript nebo konfiguraci pro [cloud-init](https://cloud-init.io/) a systém tak při prvním spuštění automaticky nastavit. Podporujeme tyto způsoby prvotní konfigurace:

- Skript, který vpsAdmin integruje do systému VPS tak, že se při startu VPS automaticky spustí a potom se smaže
- YAML/config data pro cloud-init
- Skript spuštěný přes cloud-init
- Konfigurace pro NixOS
- NixOS flake nebo flake URI

Skripty a konfigurace je možné vložit při vytváření/reinstalaci VPS, nebo si je můžete do vpsAdminu předem uložit a potom jen vybrat, jakou konfiguraci použít.

Více informací a ukázky použiti viz [znalostní báze](https://kb.vpsfree.cz/navody/vps/userdata).

# English

When creating a new VPS or reinstalling, you can upload a script or configuration for [cloud-init](https://cloud-init.io/) via vpsAdmin to automatically configure the system on its first startup. We support the following initial configuration methods:

- A script that vpsAdmin integrates into the VPS system, which runs automatically at startup and is then deleted
- YAML/config data for cloud-init
- A script executed via cloud-init
- Configuration for NixOS
- NixOS flake or flake URI

Scripts and configurations can be provided during VPS creation/reinstallation, or you can save them in vpsAdmin beforehand and simply select the desired configuration when needed.

For more information and usage examples, see the [knowledge base](https://kb.vpsfree.org/manuals/vps/userdata).
