Systemd
For production deployments, DoubleDino can run as a systemd service.
Systemd provides:
- Automatic startup after reboot.
- Process monitoring.
- Automatic restarts.
- Standard Linux service management.
Create environment file
Create:
sudo mkdir -p /etc/doubledino
sudo nano /etc/doubledino/env
Example:
DD_MODE=proxy
DD_SOURCE_URL=postgres://user:password@localhost:5432/database
DD_SECRET_KEY=your-secret-key
DD_AUTH_KEY=your-api-key
DD_HTTP_PORT=8080
Create service
Create:
sudo nano /etc/systemd/system/doubledino.service
Example:
[Unit]
Description=DoubleDino
After=network.target
[Service]
Type=simple
WorkingDirectory=/opt/doubledino
ExecStart=/opt/doubledino/doubledino
EnvironmentFile=/etc/doubledino/env
Restart=always
RestartSec=5
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target
Adjust the paths to match your installation.
Enable service
Reload systemd:
sudo systemctl daemon-reload
Enable startup on boot:
sudo systemctl enable doubledino
Start DoubleDino:
sudo systemctl start doubledino
Check status
sudo systemctl status doubledino
Example:
● doubledino.service
Loaded: loaded
Active: active (running)
DoubleDino
Mode: proxy
Source: postgres
Status: online
View logs
DoubleDino writes logs to standard output and error.
View logs:
sudo journalctl -u doubledino
Follow live logs:
sudo journalctl -u doubledino -f
Restart
Restart after configuration changes:
sudo systemctl restart doubledino
Stop
sudo systemctl stop doubledino
Notes
- DoubleDino does not require a systemd service.
- Running directly is suitable for temporary workflows.
- Systemd is recommended for long-running infrastructure deployments.