How to Set Up a Self‑Hosted Development Environment on Your Own Infrastructure (Step‑by‑Step Guide)
Source: Dev.to
Prerequisites
Before you start, make sure you have:
- One Linux server (physical or virtual) with sudo/root access.
- A ZFS pool available on that server for storing development disks and snapshots.
- Network access from your developers to this server (or to a reverse proxy in front of it).
Step 1 – Prepare a Linux Host with ZFS
-
Start with a clean Linux machine that will act as your dev‑environment host.
-
Choose a modern distribution such as Ubuntu, Debian, or CentOS, and ensure it has enough CPU, RAM, and disk space to run multiple development environments simultaneously.
-
Install ZFS if it is not already present, and create a ZFS pool dedicated to your development workloads.
# Example: create a pool named "tank" sudo zpool create tank /dev/sdX # Create a dataset for Velovol sudo zfs create tank/velovol -
ZFS gives you copy‑on‑write snapshots and efficient cloning, which is exactly what we need for quickly spinning up reproducible dev environments.
Step 2 – Download and Start velovol‑adm
-
Install the Velovol admin service (
velovol‑adm) on your Linux host. This component manages projects, users, base disks, snapshots, and clones. -
Download the binary or package from the official distribution source and place it in a suitable location on your server.
-
Start the service, either directly from the command line or by configuring it as a systemd service so it starts automatically on boot.
# Example systemd unit (/etc/systemd/system/velovol-adm.service) [Unit] Description=Velovol Admin Service After=network.target [Service] ExecStart=/usr/local/bin/velovol-adm Restart=on-failure User=root [Install] WantedBy=multi-user.target -
Verify the service is running by checking the logs (
journalctl -u velovol-adm -f) and, if a web UI is provided, by opening the admin interface in your browser.
Step 3 – Configure Portals
A portal is the entry point through which developers access their environments. It can be a web dashboard, an SSH endpoint, or an integration with tools like VS Code Remote.
-
In the Velovol admin interface, configure one or more portals that match how your team prefers to work.
-
Example: set a primary HTTPS URL and connect it to
velovol‑admthrough a reverse proxy (e.g., Nginx or Caddy).# Nginx example server { listen 443 ssl; server_name dev.yourcompany.com; ssl_certificate /etc/letsencrypt/live/dev.yourcompany.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/dev.yourcompany.com/privkey.pem; location / { proxy_pass http://127.0.0.1:8080; # velovol‑adm listening port proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } } -
Ensure DNS is set up correctly and TLS certificates are configured so developers can securely reach the portal from their own machines.
Step 4 – Connect Velovol to ZFS Storage
-
Register your ZFS storage in Velovol. This tells the system where to create and store base disks, snapshots, and cloned disks.
-
In the storage configuration section, point Velovol to your ZFS pool or dataset, e.g.,
/tank/velovol. -
Specify any quotas or limits you want to enforce per project or per user, and optionally tune ZFS options such as compression or record size based on your workload.
# Example ZFS options sudo zfs set compression=lz4 tank/velovol sudo zfs set recordsize=128K tank/velovol -
Once configured, Velovol will use this ZFS backend to create efficient copy‑on‑write volumes for each development environment.
Step 5 – Create a Project
- Open the Velovol admin interface.
- Create a new project with a clear, descriptive name (e.g., “Payments Service” or “Monorepo‑Platform”).
- Optionally add a description that explains the project’s purpose, tech stack, and owning team.
Having well‑named projects makes scaling easier when you have multiple projects and many users.
Step 6 – Create Users and Assign Roles
-
Within the project, create user accounts for each developer who needs access.
-
Assign roles based on responsibilities:
- Administrators – can manage base disks and settings.
- Developers – can consume environments (use snapshots and clones).
This role‑based model helps keep your environments consistent and secure as the team grows.
Step 7 – Create a Base Disk (Golden Environment)
- Create a fresh environment that will become this base disk.
- Inside that environment, install your standard toolchain: compilers, package managers, build tools, database clients, etc.
- Clone the main repository (or repositories), set up configuration files, and run any initial setup scripts so the environment can build and run the application.
- Once everything is configured to your satisfaction, save this environment as a base disk in Velovol so it can be reused as a template.
Step 8 – Mount the Base Disk and Start Developing
- From the portal or admin interface, a developer selects the project and chooses the base disk as the starting point for a new environment.
- Velovol mounts this disk (or a writable layer on top of it) and exposes it through the configured access method (e.g., SSH or VS Code Remote).
- The developer opens their IDE, connects to the environment, and begins work.
Because the underlying data is shared via ZFS snapshots and clones, each developer gets a lightweight, writable workspace while storage consumption stays minimal.
🎉 You’re all set!
You now have a fully functional, self‑hosted development environment platform powered by ZFS and Velovol. Developers can spin up isolated, reproducible environments in seconds, and administrators retain fine‑grained control over resources, snapshots, and security.
For further reading, troubleshooting, or advanced configurations, refer to the official Velovol documentation at .
Step 9 – Unmount and Create a Snapshot
After configuring the environment to a desired state—e.g., after adding specific dependencies or customizing the project setup—you can capture that state with a snapshot. Snapshots are point‑in‑time, read‑only copies of the disk that ZFS can create quickly and efficiently.
- Ensure all important data is written to disk and that no critical processes are running.
- Unmount the environment or stop any running sessions from the Velovol interface.
- Create a snapshot of the disk.
The snapshot becomes a stable reference that you can always roll back to or use as the source for new cloned environments, without duplicating all the underlying data.
Step 10 – Clone the Snapshot for Other Users
The real power of this setup comes when you clone snapshots for other developers. Instead of each person manually setting up their own environment, you create one snapshot and then clone it as many times as needed.
- In the admin