Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Daemon Mode #3953

Open
admtech opened this issue Apr 26, 2024 · 0 comments
Open

Feature: Daemon Mode #3953

admtech opened this issue Apr 26, 2024 · 0 comments
Labels
feature New feature or request good first issue Good for newcomers

Comments

@admtech
Copy link

admtech commented Apr 26, 2024

There is no daemon mode to start SurrealDB in the background, e.g. under Linux (there is also no way to use a config file #2042). It would be easier if there was an option like --daemon. Otherwise you have to work with "nohup" and others. These are the basics a DB should have.

On Ubuntu, we currently make do with a systemd config. However, a daemon mode would be nicer and easier.

File: /etc/systemd/system/surrealdb.service

[Unit]
Description=SurrealDB Server
After=network.target

[Service]
Type=simple
User=<username>
ExecStart=/usr/local/bin/surreal start --log info --bind 0.0.0.0:8000 file:///opt/surrealdb/data/
StandardOutput=append:/var/log/surrealdb.log
StandardError=inherit
Restart=on-failure

[Install]
WantedBy=multi-user.target

Activate and start the service:

sudo systemctl enable surrealdb.service
sudo systemctl start surrealdb.service

Stop and check status:

sudo systemctl stop surrealdb.service
sudo systemctl status surrealdb.service

Greetings
Frank

SurrealDB version

Running 1.4.2 for linux on x86_64 (Ubuntu LTS)

@admtech admtech added feature New feature or request triage This issue is new labels Apr 26, 2024
@sgirones sgirones added good first issue Good for newcomers and removed triage This issue is new labels May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants