Logs and terminal
On this page
You can follow your app's output live while it builds and runs, and open a shell in the container or on your server without leaving the dashboard.
Live container logs#
To follow your app's container logs, open the project's Container Logs tab. When the stream opens, Dokwe shows the last 200 lines, with timestamps, and then keeps streaming new lines as they arrive.
Where the logs come from depends on how the app runs:
- On Dokwe Cloud, Dokwe reads the container's output directly.
- On your own server, the agent streams the logs to Dokwe. See bring your own server.
- For native (non-container) deploys, the agent follows the systemd journal for the service. See container or native.
Build logs#
Each deployment keeps its build log. You can open a build while it's running and still see everything printed so far, then keep following it live. When the build finishes, the log is saved with the deployment.
Logs from the CLI#
dokwe logs streams logs for the latest deployment of the current project. It keeps streaming until the deployment's stream ends.
# Container logs
dokwe logs
# Build logs
dokwe logs --build
# A specific project
dokwe logs -p <project>See the CLI reference for setup.
Share logs without a login#
A log share token lets someone watch a project's container and build logs without a Dokwe account. This is handy for a contractor or a support thread.
dokwe logs share --label "support ticket 142"Open the project and choose Share Logs (no login required).The token is shown only once, so copy it right away. Dokwe keeps only a hash of it. Anyone with the token can open the shared page at:
/share/logs/<project-slug>/<token>A token works only for the project it was made for. It never expires unless you set an expiry date. Revoke it when you no longer need it.
Treat a share token like a password. Anyone who has it can read your logs, and logs can contain sensitive data.
Terminal in the browser#
Container shell#
To open a shell inside your running app, go to the project's Terminal tab. If your project runs several services, you can pick which one to connect to. Where the shell opens depends on how the app runs:
- On Dokwe Cloud, it opens inside the container.
- On your own server, the agent relays the session. The server must be online.
- For native deploys, the shell opens in the app's current release directory.
Server terminal#
You can open a shell on one of your own servers from its Terminal tab. It's locked down more tightly than the container shell:
- Only workspace owners and admins can open it.
- You need two-factor authentication turned on. Each new session asks for a current code or a recovery code.
- A server allows at most 5 sessions at once.
- A session ends after 15 minutes without activity, and always after 8 hours.
- If your connection drops, you have 90 seconds to reconnect without entering a new code.
Dokwe records each session and the commands run in it.
One-shot command runner#
Sometimes the interactive terminal connects but shows no output. For that case, the server's Terminal tab and the terminal for projects on your own servers also have a simple command runner. It runs a single command and shows the output and exit code.
- Run the command on the host itself, or inside one of your app containers.
- Set a timeout of up to 300 seconds.
- You'll see up to 32 KiB of output.
The command runner is good for quick checks like df -h or docker ps. For anything interactive, use the full terminal.
Log drains#
A log drain sends the container logs of every project in your workspace to an outside service. This covers apps on Dokwe Cloud and on your own servers. To set one up, go to Skills, open Log Drain, and choose a provider, an endpoint URL and an API key.
| Provider | How logs are sent |
|---|---|
| Datadog | To the Datadog logs intake, using your API key |
| Custom | As a JSON array POSTed to your endpoint, with an optional bearer token |
Dokwe sends logs in batches: every 2 seconds, or sooner once 50 lines are waiting. If deliveries fail 5 times in a row, the drain pauses for 5 minutes and then tries again.
Papertrail and Logtail appear in the provider list but don't deliver logs yet. To reach them today, use Custom with their HTTP endpoint.