Spectrum of online tools
- Head to the releases page.
- Download the latest release for your platform.
- Extract the archive to somewhere like
/opt/spectra. - Go to the directory where you extracted the archive.
- Run
./Spectra initto generate the configuration file. - Edit the configuration file to your liking.
- Run
./Spectrato start the server.
On Linux distros, you can use the systemd unit file to manage the service. Spectra provides a command for generating the unit file.
sudo ./Spectra systemd
sudo systemctl daemon-reloadAfter that you can enable and start the service:
sudo systemctl enable --now spectraImportant
For security reasons, it is highly recommended to run the server as a non-root user like spectra.
This is not required and can be ignored, but you'll take risks.
You can add spectra user like this:
sudo useradd -M -U spectra
# don't forget to replace /opt/spectra with your own path
sudo chown -R spectra:spectra /opt/spectra And then uncomment the User line in the unit file created above:
- # User=spectra
+ User=spectraSpectra itself does not support SSL. Using a reverse proxy software like Nginx is recommended.
Sample configuration block for nginx:
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name spectra.example.com;
ssl_certificate "/path/to/cert.pem";
ssl_certificate_key "/path/to/key.pem";
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 10m;
ssl_ciphers PROFILE=SYSTEM;
ssl_prefer_server_ciphers on;
include /etc/nginx/default.d/*.conf;
location / {
proxy_pass http://127.0.0.1:3000/;
client_max_body_size 1024M;
}
}Before continuing, make sure you have these installed:
- Rust toolchain
- Node.js & pnpm (it would be better if your pnpm is installed using npm)
- Windows Terminal
Then create a .env under the root directory.
Write the content below:
DATABASE_URL=sqlite:./data.dbYou can name the database file whatever you want, but make sure it is an SQLite URL.
And run the command below:
pnpm install
cargo install sqlx-cli
sqlx database setupFinally run the command below to run the project under development mode:
pnpm devCargo might fail to locate the cmake binary on Windows.
You can find its path by running the command below in "Developer PowerShell for VS 20xx":
where.exe cmakeThen add the path to spectra/.cargo/config.toml like below:
[env]
CMAKE = "C:\\path\\to\\cmake.exe"