Development Environment Setup
The Dogebox exclusively runs on NixOS as its linux-base.
Install NixOS in a VM
There are multiple ways of accomplishing this. The easiest way by far is to use Orbstack which supports NixOS VMs natively, and provides useful filesystem and host-network sharing.
The rest of this guide will assume you are using Orbstack, or a VM solution that lets you bind to your hosts network interfaces.
Clone required repositories
There are 3 repositories that provide the foundational building blocks for Dogebox. Please git clone
all of these.
- Dogeboxd -
https://github.com/Dogebox-WG/dogeboxd.git
- DPanel -
https://github.com/Dogebox-WG/dpanel.git
- DKM -
https://github.com/Dogebox-WG/dkm.git
Please note: dogeboxd
& dpanel
must be cloned into the same parent directory. You can clone DKM
anywhere.
Configure your Nix environment
As we're running a development environment, some things must be configured manually.
Example modified configuration file
Rebuild
Once you've added the above, you can rebuild your VM to ensure it's in a proper state to execute everything.
Please run: sudo nixos-rebuild switch
. Assuming this succeeds, you're ready to rock and roll.
Starting Services
You need to be running dogeboxd
and dkm
at the same time to have things working. dpanel
is served via dogeboxd
automatically, assuming they've been cloned into the same parent directory.
Both services contain a nix flake, which provide pre-configured devshells that have all the necessary dependencies for executing the service.
Both services also contain a Makefile
that provides a dev
command that run things in a "default" development mode.
Starting dogeboxd
Starting dkm
dogeboxd
should now be listening on two ports:
- Dogeboxd API will be listening at http://127.0.0.1:3000
- Dpanel UI will be listening at http://127.0.0.1:8080 and should be ready in setup mode.
After initial setup has completed, you will need to re-run make dev
for dogeboxd
to launch it again in normal-mode. Please see below for more details.
Things to note
- In development mode, any time the service would trigger a
shutdown
orrestart
, the dogeboxd process willexit
instead. - In development mode your dogeboxd/dpanel sessions will persist across service restarts. This will not happen in non-development mode.
- You can run
make recovery
to force dogeboxd into recovery mode. - All data for both
dogeboxd
andDKM
is written to~/data
. Deleting this directory will reset your state.