[GH-ISSUE #214] How to run mailpit in backgroud ? #144

Closed
opened 2026-03-15 12:50:25 +03:00 by kerem · 5 comments
Owner

Originally created by @imrostom on GitHub (Dec 1, 2023).
Original GitHub issue: https://github.com/axllent/mailpit/issues/214

I installed Mailpit on my Ubuntu 20.04 LTS DigitalOcean droplet using a Bash script. Following the installation, I executed the application with "./mailpit", and it functioned correctly. However, I observed that when I closed the terminal, the application stopped working.

Originally created by @imrostom on GitHub (Dec 1, 2023). Original GitHub issue: https://github.com/axllent/mailpit/issues/214 I installed Mailpit on my Ubuntu 20.04 LTS DigitalOcean droplet using a Bash script. Following the installation, I executed the application with "./mailpit", and it functioned correctly. However, I observed that when I closed the terminal, the application stopped working.
kerem closed this issue 2026-03-15 12:50:30 +03:00
Author
Owner

@axllent commented on GitHub (Dec 1, 2023):

Hi @imrostom. I'm afraid you will need to be much more specific for me to try give you an answer to this. What operating system are you using, and how did you "install" Mailpit?

<!-- gh-comment-id:1835387947 --> @axllent commented on GitHub (Dec 1, 2023): Hi @imrostom. I'm afraid you will need to be much more specific for me to try give you an answer to this. What operating system are you using, and how did you "install" Mailpit?
Author
Owner

@jure965 commented on GitHub (Dec 1, 2023):

@imrostom please detail your use case. If you want to run in the background temporarily, you can use tmux or screen. For more permanent solution with start-at-boot capabilities, you can set up a systemd service around Mailpit.

<!-- gh-comment-id:1836706796 --> @jure965 commented on GitHub (Dec 1, 2023): @imrostom please detail your use case. If you want to run in the background temporarily, you can use [tmux](https://manpages.ubuntu.com/manpages/trusty/man1/tmux.1.html) or [screen](https://linux.die.net/man/1/screen). For more permanent solution with start-at-boot capabilities, you can set up a systemd service around Mailpit.
Author
Owner

@axllent commented on GitHub (Dec 5, 2023):

@imrostom Sorry, I did not realise you had edited your original comment as that does not send a notification / alert. It sounds to me like you should simply set up a systemd service to start Mailpit. Here is a link (one of many) that explains how to do it. Obviously you will need to modify the service script to suit your Mailpit startup options, and, assuming you are not intending to run it as root, you will have to add those options to the service script too. There are plenty articles on the internet of how to achieve what you are after though, Google will help.

<!-- gh-comment-id:1840102203 --> @axllent commented on GitHub (Dec 5, 2023): @imrostom Sorry, I did not realise you had edited your original comment as that does not send a notification / alert. It sounds to me like you should simply set up a systemd service to start Mailpit. [Here is a link](https://linuxhandbook.com/create-systemd-services/) (one of many) that explains how to do it. Obviously you will need to modify the service script to suit your Mailpit startup options, and, assuming you are not intending to run it as root, you will have to add those options to the service script too. There are plenty articles on the internet of how to achieve what you are after though, Google will help.
Author
Owner

@imrostom commented on GitHub (Dec 5, 2023):

Sorry for the late reply, I solved my issue using nohup command. Thank you @axllent for your instant support.

<!-- gh-comment-id:1840113885 --> @imrostom commented on GitHub (Dec 5, 2023): Sorry for the late reply, I solved my issue using **nohup** command. Thank you @axllent for your instant support.
Author
Owner

@axllent commented on GitHub (Dec 8, 2023):

Just for future reference to others, I have added some documention for auto-starting a native installation (non-docker) of Mailpit on Linux.

<!-- gh-comment-id:1846518842 --> @axllent commented on GitHub (Dec 8, 2023): Just for future reference to others, I have added [some documention](https://mailpit.axllent.org/docs/install/systemd-integration/) for auto-starting a native installation (non-docker) of Mailpit on Linux.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/mailpit#144
No description provided.