How to let grin wallet listen/owner_api run in the server background?

I turned on SSH and after running grin wallet listen / owner_api for a while, it was always disconnected.
I donot know if there is a command to let grin miner run in the server background.

Important: you need to enter your password to perform grin wallet listen/owner_api

use screen,
so “screen ./grin wallet listen”

You can use tmux or systemd script to control your wallet listen/owner_api.
Here is a systemd script sample for grin wallet:

[Unit]
Description=Grin Wallet
After=network-online.target

[Service]
User=<Your username of running grin node and wallet>
ExecStart=grin wallet -p '<you password>' listen
Type=simple

[Install]
WantedBy=multi-user.target