As of now Speculare Server does not provide easy setup solution such as a one-line installer (but it's planned). The current recommanded way to install Speculare Server is to build it from source. But don't be afraid, it's easy and straightforwards.
Speculare Server is a Rust project that rely on some dependencies to be able to be built correctly. Much of them are default deps in most servers.
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Install APT dependencies
sudo apt-get install libssl-dev libpq-dev pkg-config build-essential
You can build the binary using:
cargo build --release
The resulting binary will be located in
The server binary depends on a
Server.tomlfile whose path will be passed as arguments to the binary.
You can create your
Server.example.tomlgiven in the source code or using the following template:
BINDING = "0.0.0.0:8080"
DATABASE_URL = "postgres://postgres:[email protected]/speculare?sslmode=disable"
DATABASE_MAX_CONNECTION = 10 # (optional [default = 10])
KEY_PRIV = "key.pem" # (optional, depends on HTTPS)
KEY_CERT = "cert.pem" # (optional, depends on HTTPS)
HTTPS = true # (optional [default = false])
# Will be used in Speculare-client
# > need to be generated by you.
API_TOKEN = "secret_password"
RUST_LOG = "info,server=info,actix_server=info,actix_web=info" # (optional)
For this step you will have to methods:
This is the easiest solution... Just do nothing and the migrations will be applied automatically. Once you launch the binary, it will check if all the lastest migrations has been applied, and will applied them if not.
CREATE DATABASE database_name;
This method is recommended if you want to work on the development of Speculare.
# Install the diesel_cli tool
cargo install diesel_cli --no-default-features --features postgres
# For diesel setup to works you need to be at the root of the project
diesel setup --database-url="postgres://xxx"