File size: 1,983 Bytes
d086025
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# Systemd Service Configuration

> Detailed guide for configuring and managing Guts nodes with systemd.

## Service File

### Basic Service


### Production-Hardened Service


## Service Management

### Basic Commands


### Viewing Logs


### Checking Service Health


## Multiple Instances

Run multiple Guts nodes on the same machine using template units:

### Template Unit


### Managing Instances


## Socket Activation

For faster startup and better resource management:

### Socket Unit


### Socket-Activated Service


## Resource Management with cgroups

### CPU Limits


### Memory Limits


### I/O Limits


### Combined Resource Slice



## Environment Files

### Using Environment File



### Secure Credentials


## Watchdog Integration

### Enable Watchdog


### Application Support

The application must periodically notify systemd:


## Integration with Other Services

### Dependency on Database


### Start After Network


### Ordering Multiple Services


## Maintenance Operations

### Scheduled Maintenance



### Backup Timer


## Debugging

### Analyze Boot Time


### Debug Mode


### Common Issues


## Security Verification

### Verify Hardening


### Audit Service Capabilities


## Reference

### Service States

| State | Description |
|-------|-------------|
| active (running) | Service is running |
| active (exited) | Service ran and exited |
| inactive (dead) | Service is stopped |
| failed | Service failed to start |
| activating | Service is starting |
| deactivating | Service is stopping |

### Exit Codes

| Code | Description | Restart Behavior |
|------|-------------|------------------|
| 0 | Success | Restart=on-failure: No |
| 1-255 | Failure | Restart=on-failure: Yes |
| SIGTERM | Normal stop | Restart=always: Yes |
| SIGKILL | Force stop | Restart=always: Yes |

## Next Steps

- [Configure networking](../configuration/networking.md)
- [Set up monitoring](../operations/monitoring.md)
- [Configure backups](../operations/backup.md)