accesing to my gunicorn console

Hi, i have a running python + flask app runing in my digital ocean droplet, and it is running with ngninx and gunicorn, and so if i start my app, i can see my “gunicorn console output”

[2019-01-28 16:34:13 +0000] [3010] [INFO] Starting gunicorn 19.9.0
[2019-01-28 16:34:13 +0000] [3010] [INFO] Listening at: (3010)
[2019-01-28 16:34:13 +0000] [3010] [INFO] Using worker: sync
[2019-01-28 16:34:13 +0000] [3013] [INFO] Booting worker with pid: 3013
[2019-01-28 16:35:03 +0000] [3010] [CRITICAL] WORKER TIMEOUT (pid:3013)
[2019-01-28 16:35:03 +0000] [3013] [INFO] Worker exiting (pid: 3013)
[2019-01-28 16:35:03 +0000] [3110] [INFO] Booting worker with pid: 3110

but if i close taht ssh connection, my gunicorn will still running and working correctly but im not able to see again that console, is there a way to access to that console whit out killing gunicorn process? i want this in order to see the errors and warnings that my gunicorn will show me

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

DigitalOcean Employee
DigitalOcean Employee badge
January 28, 2019
Accepted Answer


Great question. There are many schools of thought and preferences on this. What I consider to be the more professional approach is to create a systemd script for starting it up and then having it write any output to a log file. That said, many people are content with the simplest answer:

screen -S gunicorn
[start command here]
control + a, then d

Then to return:

screen -r gunicorn

The “control +a, then d” part has you holding CTRL on your keyboard while pressing A, releasing A, then pressing D, and then releasing D. After releasing D, you can release CTRL. This is basically a saved shell session that persists beyond your SSH session, and can be recalled at any time.


Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel