2.8 KiB
Hosting
Installation
Due to the maturity of the project, we haven't yet created a release strategy. In order to install DSFX, we recommend building the project from source.
Dependencies
In order to build the project from source, you will need to have git installed on your system, as well as the go compiler. You can install these dependencies using your system's package manager. For example, on Ubuntu, you can run:
sudo apt-get install git golang
Git Setup
Currently we are hosted on gitea cloud, which hides everything from the
public internet by default. This means that you will need to authenticate with
your gitea account as if you were cloning a private repository, even though our
repository is public. An easy way to do this is with the .netrc
file combined
with a personal access token. You can create a .netrc
file in your home directory
with the following contents:
machine koti.casa login <your username> password <gitea personal access token>
Finally, you'll need to set the GOPRIVATE
environment variable to allow go to fetch
private repositories. You can do this by running the following command:
export GOPRIVATE=koti.casa
If you want to persist this setting across sessions, you can add the above line to your
~/.bashrc
or ~/.bash_profile
.
Installation
Now that you have the go toolchain set up with access to our repository, you can simply install the
project by using the go install
command.
go install koti.casa/numenorlabs/dsfx/cmd/dsfx@main
Running
You can run the DSFX server using the dsfx
command, which will be available in your $GOPATH/bin
directory after installation. If you have added $GOPATH/bin
to your PATH
, you can run the server
directly from the command line:
dsfx
Optionally, you can run the command directly via the go run
command if you prefer not to install
the project globally. This can be done with the following command:
go run koti.casa/numenorlabs/dsfx/cmd/dsfx@main
Configuration
The application accepts the following cli flags:
- -h: Show help message
- -host: The host on which the DSFX server will run (default:
0.0.0.0
) - -port: The port on which the DSFX server will listen (default:
8000
) - -logLevel: The log level to use. One of (error, warn, info, debug) (default:
info
) - -dataDir: The directory where the DSFX data files are stored (default:
/etc/dsfx/data
) - -configDir: The directory where the DSFX configuration files are stored (default:
/etc/dsfx/config
)
Local Files
The DSFX server uses local files for configuration and storage. The default directories for these files are specified in the -configDir and -dataDir cli flags. You can change these directories by specifying the flags when you run the server.