Running charm
as a systemd service is fairly straightforward. Create a file
called /etc/systemd/system/charm.service
:
[Unit]
Description=The mystical Charm Cloud 🌟
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=1
Environment=CHARM_SERVER_DATA_DIR=/var/lib/charm
ExecStart=/usr/bin/charm serve
[Install]
WantedBy=multi-user.target
- Set the proper
charm
binary path inExecStart=
- Set where the data should be stored at in
CHARM_SERVER_DATA_DIR
If you’re using TLS, don’t forget to set the appropriate environment variables in the systemd service file as described below.
See TLS for more information.
Part of Charm.
Charm热爱开源 • Charm loves open source